Owner chat CI correction: task v12¶
Task: 39b11a5a-d63b-46c0-9c32-c799c6a948e0, exact frozen version 12.
Execution: a05ccf50-688d-4ff7-acd2-da037a38e2a5.
Repository: h8v6/heyaira; branch: heyaira/39b11a5a.
Source: dd001791c264f6fc5bb91c30caa172506cf32924.
Carried candidate and starting HEAD: afc79265022fcd175d4d2503c014e0e33be222f0.
Initial worktree was clean. The assignment was read through task_get version 12.
This correction adds a commit above the candidate; no history was rewritten.
Subagents: none. Result SHA is recorded in the RESULT and receipt after commit.
Cause and correction¶
The previous frozen selection omitted tests/test_docs_contract.py. Its
test_contract_records_every_scope_the_server_checks assertion incorrectly
required the nullable required_scope field to belong to required_scopes.
The exporter uses required_scope only for a scoped require_actor call inside
the tool wrapper. required_scopes follows scope checks into helpers as well.
Owner chat intentionally checks the scope in its helper after execution credential
and current role validation, as required by K4. Its primary scope is therefore
null, while its complete scope list correctly contains tasks:write.
The correction retains the membership assertion for non-null primary scopes.
A new regression asserts both the checked-in and generated owner-chat contracts
have a null primary scope and exactly tasks:write in their complete scope list.
The production implementation, exporter and generated contract are unchanged.
Confidence is high in the reproduced assertion correction; remote CI cannot be
claimed green until Bridge publishes and CI reruns.
Commands and actual results¶
Commands ran in the assigned worktree. Python commands used
TMPDIR="$PWD/.work-tmp"; direct pytest and contract checks also used
PYTHONPATH=src. PostgreSQL tests used disposable databases on the prepared local
server. No installation, production mutation or credential-bearing output occurred.
The Git state reads returned the expected origin, task branch and candidate SHA.
Before correction, at the unmodified candidate:
python -m pytest tests/test_docs_contract.py -q -p no:cacheprovider
exit: 1; 1 failed, 10 passed in 2.78s
FAILED tests/test_docs_contract.py::test_contract_records_every_scope_the_server_checks
AssertionError: decision_record_owner_answer
assert None in ['tasks:write']
After correction:
python -m pytest tests/test_docs_contract.py -q -p no:cacheprovider
exit: 0; 12 passed in 3.74s
python scripts/test_postgres.py tests/test_owner_chat.py tests/test_decisions*.py tests/test_schema_guard.py tests/test_mcp_runtime_contract.py tests/test_docs_contract.py -p no:cacheprovider
exit: 0; 184 passed in 190.83s (0:03:10)
postgres_acceptance=passed: selected tests, zero skipped tests
python -m pytest tests/test_runtime_library.py tests/test_product_name_guard.py tests/test_notification_docs_contract.py tests/test_codex_plugin.py -q -p no:cacheprovider
exit: 0; 39 passed in 2.91s
python scripts/export_mcp_contract.py --check
exit: 0; MCP contract is up to date
python scripts/check_docs_contract.py
exit: 0; documentation contract passed: 48 MCP tools covered
python scripts/check_product_name.py
exit: 0; Product name check passed: use HeyAira in tracked text files
python scripts/validate_runtime.py
exit: 0; runtime_validation=passed
node --test tests/site-consent.test.cjs tests/design-system-copy.test.cjs ops/cloudflare/server-beat-watchdog/test/*.mjs
exit: 0; 57 tests, 57 pass, 0 fail, 0 skipped
The original source regressions are preserved in
docs/reports/39b11a5a-owner-chat-evidence.md: K1 failed on dd00179 with
Unknown tool: decision_record_owner_answer, and K7 failed because said_at
was absent. That source run exited 1 with two failures. It was not repeated
in this correction, which starts from the carried candidate.
CI log access limitations¶
The reported run is https://github.com/h8v6/heyaira/actions/runs/38212972996.
gh run view 38212972996 --repo h8v6/heyaira --log-failed
exit: 1; configuration read refused by the sandbox
curl -sS -L --max-time 20 https://api.github.com/repos/h8v6/heyaira/actions/runs/38212972996
exit: 56; CONNECT tunnel failed, response 403
curl -sS -L --max-time 20 https://github.com/h8v6/heyaira/actions/runs/38212972996 -o .work-tmp/github-ci-page.html
exit: 56; CONNECT tunnel failed, response 403
The exact remote failure log is unavailable. The concrete documentation assertion was reproduced locally and is included in the repository's CI test selection. No permission bypass or remote CI rerun was attempted. Publication and independent verification remain with Bridge.
Broader CI diagnostic¶
The CI test selection was started before the correction. Pytest collected the original documentation assertion before the edit, so this diagnostic reports the original assertion failure. The separate corrected run above is the result for the final patch. This diagnostic is not a successful complete CI run:
python scripts/test_postgres.py --ignore=tests/test_ios_companion_contract.py --deselect=tests/test_workflow_e2e.py::test_workflow_indexed_list_performance_synthetic_tasks -p no:cacheprovider
exit: 1
56 failed, 1404 passed, 492 skipped, 3 deselected, 3 errors in 507.42s (0:08:27)
One failure is the reproduced documentation assertion. The other 55 failures
are three backup statistics tests denied pg_stat_reset/pg_stat_reset_shared
and 52 deployment guard failures amid shell here-document temporary-file denials
(Operation not permitted). The three fixture errors were PostgreSQL permission
denials to terminate a process. Listening-dependent tests skip in this sandbox.
These execution limits are not treated as defects in the owner-chat candidate.
A deployment guard diagnostic passed separately without changing its code:
python scripts/test_postgres.py tests/test_deployment_guard.py::test_successful_release_reports_its_image -p no:cacheprovider
exit: 0; 1 passed in 3.13s; zero skipped tests
The complete hosted CI checks and remote CI log inspection remain unverified. The 184-test frozen decision selection, including the corrected documentation contract, has no skipped test or failure.
Frozen criteria¶
K1¶
Mode 1: admin interactive token records a consent (authorizes=true, owner_list all false) -> decision_list(state=all) shows in_force, confirmed_by=owner_chat, attested_by, quote, session_label, said_at; decision_check(use=true) succeeds once. Fails on dd00179.
Frozen method: python scripts/test_postgres.py <new tests> -p no:cacheprovider; RESULT states base outcome.
criterion_id: K1
outcome: pass
evidence_path: docs/reports/39b11a5a-ci-correction-evidence.md
feedback: Corrected 184-test PostgreSQL command exit 0; admin consent list/continuity attribution, quote/session/said_at round-trip and single consumption passed. Base K1 regression exit 1: Unknown tool.
K2¶
Mode 2: an existing proposed decision answered via decision_id -> in_force without duplicate or conflict; mode 1 with a pending same-key proposal -> decision_record_pending_exists. authorizes=false option -> rejected. Rule: decision_check use=false ok, use=true -> decision_use_not_applicable.
Frozen method: Targeted tests via scripts/test_postgres.py -> passed.
criterion_id: K2
outcome: pass
evidence_path: docs/reports/39b11a5a-ci-correction-evidence.md
feedback: Corrected 184-test PostgreSQL command exit 0; existing proposed ID answered with the original content hash, no duplicate/conflict, pending-key refusal, rejection and rule use semantics passed.
K3¶
Key boundary and type: paid/secret/deletion flags or cost-/secret-/delete- prefixes -> decision_requires_owner_key; misleading generic key + paid=true refused; migration=true allowed; staffing -> decision_record_type_not_allowed; approval param -> decision_record_approval_not_allowed; past valid_until -> decision_record_expired; nothing written on refusal.
Frozen method: Targeted tests -> passed.
criterion_id: K3
outcome: pass
evidence_path: docs/reports/39b11a5a-ci-correction-evidence.md
feedback: Corrected 184-test PostgreSQL command exit 0; paid/secret/deletion flags and all reserved prefixes refused in both modes without writes; migration allowed; staffing, approval and past valid_until refused.
K4¶
Authorization order: execution credential -> decision_record_requires_interactive_session; contributor and viewer -> project_admin_required; no grant-family principal -> principal_unavailable; nothing written.
Frozen method: Targeted tests -> passed.
criterion_id: K4
outcome: pass
evidence_path: docs/reports/39b11a5a-ci-correction-evidence.md
feedback: Corrected 184-test PostgreSQL command exit 0; execution before scope, contributor/viewer before scope, missing grant-family principal and OAuth write scope tested with unchanged decision/event counts.
K5¶
No decision_waiting event and no push delivery row after recording (counts before/after).
Frozen method: Targeted test -> passed.
criterion_id: K5
outcome: pass
evidence_path: docs/reports/39b11a5a-ci-correction-evidence.md
feedback: Corrected 184-test PostgreSQL command exit 0; waiting-event and delivery counts unchanged in both modes; a normal proposal increases both counts with an active Mac and phone.
K6¶
Idempotency: replay before age validation (identical retry after the 7-day window returns the same result), concurrent identical calls -> one record, same key other principal -> idempotency_conflict.
Frozen method: Targeted tests -> passed.
criterion_id: K6
outcome: pass
evidence_path: docs/reports/39b11a5a-ci-correction-evidence.md
feedback: Corrected 184-test PostgreSQL command exit 0; replay after eight-day clock advance, concurrent identical calls producing one decision/event, changed input and other-principal conflicts passed.
K7¶
Migration 060: a valid owner_chat INSERT succeeds (fails on dd00179); refusals for missing note, authenticator present, missing said_at, content_hash mismatch; owner_key/delegate rules and event immutability unchanged.
Frozen method: Targeted migration tests -> passed.
criterion_id: K7
outcome: pass
evidence_path: docs/reports/39b11a5a-ci-correction-evidence.md
feedback: Corrected 184-test PostgreSQL command exit 0; valid direct INSERT and every specified refusal passed; old owner_key/delegate rules and event immutability retained. Base valid INSERT exit 1: missing said_at column.
K8¶
New tests, existing decision suites, schema guard and MCP contract pass with zero skips.
Frozen method: python scripts/test_postgres.py <new tests> tests/test_decisions*.py tests/test_schema_guard.py tests/test_mcp_runtime_contract.py -p no:cacheprovider -> exit 0.
criterion_id: K8
outcome: pass
evidence_path: docs/reports/39b11a5a-ci-correction-evidence.md
feedback: Corrected full command exit 0; 184 passed in 190.83s, zero skips, including the new documentation contract regression. Broader CI has environment limits described above.
K9¶
Scope: only src/heyaira/, tests/, docs/, contracts/mcp-tools.json, migrations/060_decision_owner_chat.sql since dd00179.
Frozen method: git diff --name-only dd00179..HEAD; git merge-base --is-ancestor dd00179 HEAD.
criterion_id: K9
outcome: pass
evidence_path: docs/reports/39b11a5a-ci-correction-evidence.md
feedback: Scope preview is within the authorized paths; only tests/test_docs_contract.py and this evidence file are added above afc79265. Final git diff --name-only dd00179..HEAD, ancestry, SHA, parent and clean status are recorded in RESULT/receipt after commit.