Why: Emergency Codex fallback must not run before Cursor, Antigravity, and PI have each been exhausted.
Evidence: Cursor transport 5e6c93f765c232783a7dccb05544e26c386fb031; 29 config tests, focused emergency controller test, and 449 governance tests passed with 19 skips.
Impact: Emergency-mode implementation, repair, and test roles now require exactly one enabled profile for each normal adapter while preserving configured order.
Refs: .task/feature-agent-cli-enforcement.md
Why: The approved contract requires exactly three safe attempts for Cursor, agy, and PI, then one Codex emergency attempt, never host implementation authority.
Evidence: Routing/config tests were RED for never, max attempts, forbidden adapters, and legacy host fallback; 133 related tests now pass with one opt-in probe skipped.
Impact: Normal emergency-mode roles reject all non-Cursor/agy/PI adapters, project fallback is never, and Codex remains available through emergency/review paths.
Refs: independent Codex review of feature/agent-cli-enforcement
Why: Success-shaped receipts and caller-writable history must not authorize apply/admit without controller-originated provenance.
Evidence: Fabricated, unsigned, tampered-history, and moved-ref tests were RED before HMAC binding; 52 controller/history/admission tests now pass.
Impact: Stores a local 0600 attestation key, signs successful history including transport commit SHA, and verifies it before apply/admit.
Refs: independent Codex review of feature/agent-cli-enforcement
Why: Safe routing must not retry unproven cleanup, ignore worker fail-stop terminals, or lose out-of-scope rename sources.
Evidence: New tests were RED for each Review finding; 44 controller and admission tests now pass with diff-check clean.
Impact: Tightens safety classification and path inventory only; routing order and provenance contract remain unchanged.
Refs: independent Codex review of feature/agent-cli-enforcement
Why: Agents must use configured CLIs for implementation and testing, while remaining free to inspect, plan, test, and iterate within bounded scope.
Evidence: Task-card contract tests and the full 430-test governance discovery pass with 19 existing skips; diff-check passes.
Impact: Defines three safe attempts per normal CLI, one emergency Codex attempt, fail-stop terminals, and mandatory apply/admit integration.
Refs: feature/agent-cli-enforcement
Why: Implementation changes must be mechanically tied to a successful CLI transport instead of relying on agents to follow prose.
Evidence: Admission tests went RED without apply/admit; 10 admission, 41 agent-exec, and 62 task tests now pass with exact staged-content matching.
Impact: Adds validated transport fast-forwarding and rejects unproven implementation commits while exempting task cards and approved plan/spec paths.
Refs: feature/agent-cli-enforcement
Why: Parser hardening requires the emergency fixture to use the real Codex adapter contract instead of a custom adapter.
Evidence: Agent-exec and config suites pass 58 executions with one opt-in probe skipped; validate and diff-check pass.
Impact: Test fixture only; production validation remains strict.
Refs: feature/agent-cli-enforcement
Why: Normal execution roles must exclude Codex while a single enabled Codex adapter remains available for emergency routing and review.
Evidence: Parser invalid-case tests were RED before validation; all 17 config tests and agent_exec validate now pass.
Impact: Enables three attempts per normal profile, stable Cursor routing, and a validated emergency Codex profile.
Refs: feature/agent-cli-enforcement
Why: Codex CLI must run only after every regular profile exhausts its three safe attempts.
Evidence: The focused test records three regular failed-clean attempts and fails because no emergency Codex attempt is launched.
Impact: Adds a RED controller contract test and test helper support only.
Refs: feature/agent-cli-enforcement
Why: The routing controller must retry each safe failed profile three times before advancing.
Evidence: The focused test fails with observed order retryme,thenok instead of three retryme attempts, proving current behavior lacks retries.
Impact: Adds a RED controller contract test only; production behavior is unchanged.
Refs: feature/agent-cli-enforcement
Why: Routing needs an explicit per-profile attempt limit and a named Codex emergency profile before controller enforcement can be implemented.
Evidence: The new parser test failed on unknown keys before implementation; all 15 config test executions now pass and git diff --check is clean.
Impact: Adds backward-compatible optional configuration fields only; routing behavior is unchanged in this commit.
Refs: feature/agent-cli-enforcement
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=dc86a023605d00fccca1b9679b4cdad96373bdee.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: Settings plaintext loses to secret_keys, so replacing the env key did not change the key a conversation actually sent.
Evidence: python3 -m unittest tests.test_svc.SvcDbRecoveryTests.test_seed_replaces_old_system_secret tests.test_svc.SvcDbRecoveryTests.test_seed_warns_when_old_secret_stays_active tests.test_svc.SvcDbRecoveryTests.test_seed_puts_without_credentials_when_auth_off (SELF).
Impact: Embedded databases now compare the active system secret fingerprint after seeding, and the backend gitlink carries the adoption fix.
Refs: fix/model-key-secret-overlay
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Gitea containers may leave SIGKILLed children as zombies until PID 1 reaps them, while kill -0 still reports success.
Evidence: Both timeout tests and the full AgentExecControllerTests suite pass; git diff --check passes.
Impact: Changes test liveness detection only; genuinely running child processes still fail the assertions.
Refs: #567
Why: PR #567 CI runs without a global Git user identity, causing every successful agent transport commit to fail with exit 128.
Evidence: The focused no-identity regression plus AgentExecControllerTests and AgentExecHistoryTests pass (30 executions total); git diff --check passes.
Impact: Supplies a deterministic non-secret identity only to git commit-tree; routing, receipts, and transport validation are unchanged.
Refs: #567
Why: execution history intentionally adds one source-external Git metadata path after every run
Evidence: focused fallback and history tests
Impact: preserves the no-canonical-implementation assertion while accepting the history record
Refs: feature/goal-first-delivery
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=919f75cf7b39ca357e212a08a0ba5ba3d9a79b51.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: retain which CLI handled each task so routing can improve from real outcomes over time
Evidence: AgentExecHistoryTests and git diff --check
Impact: appends sanitized source-external JSONL records without changing run outcomes
Refs: feature/goal-first-delivery
Why: make the three approved CLIs the only active implementation and test routes
Evidence: adapter unit tests, configuration validation, diff check, and real marker probes for all three profiles
Impact: narrows project routing and fixes agy prompt binding for noninteractive execution
Refs: feature/goal-first-delivery
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=692735e91d6a9ab07ddd3686feb60a56b270728a.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: verify configured Agent CLIs one profile at a time before declaring them usable
Evidence: 53 focused tests, agent-exec validation, 397-test governance regression, and diff check
Impact: adds opt-in source-external probes, acceptance checks, and current task records
Refs: U5; docs/superpowers/plans/2026-10-15-project-agent-execution.md
Why: include the current integration baseline before verification.
Evidence: fetched origin/main. The multi-instance account bootstrap conflict keeps main's identity ensure and activation flow.
Impact: integrate upstream changes without rewriting task history. Backend gitlink stays 80bb123.
Refs: task-sync
Co-authored-by: Cursor <cursoragent@cursor.com>