Repository navigation
fix(runtime): reconcile effects before every consent rerun - #295
Conversation
|
Implemented #293 in Every consent-triggered full rerun now uses the existing exit/effect reconciliation guard, including on the same executor. Regression coverage exercises all three answers against changed or unknown effects, clean reruns, unproven exits and telemetry reasons. The full guard conservatively stops on an already dirty workspace, as the issue's fallback scope permits. Agent-reported verification: 1642 full-suite tests passed; 22 recovery tests and 211 driver tests passed; all 16 skills passed package validation. The optional BasedPyright check remains nonzero (111 errors versus 112 at unchanged HEAD, no introduced error messages). An earlier statistics failure did not reproduce in its 42-test suite or the final full run; its cause is unknown. See the PR body for exact commands and limitations. Checks read once for head
The push and PR creation succeeded. Git could not save local upstream tracking because the shared Run: profile |
[CCR-20261020-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Initial review: PR #295 (work item #293)Status: APPROVED for head ScopeAccumulated diff FindingsNo findings. Checks made:
Security triageNo Commands executed (locally, exit status observed)
Dependency preparation (npm, Unverified
CI (policy: parallel, read once, not awaited)All 6 checks of head
Residual risksThe local full suite was not green because of the sandbox. The passing exact-head CI is the evidence for those tests. No other residual risk found. VerdictAPPROVED: no open finding blocks approval, and every check of the reviewed head passed. |
[CCR-20261020-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Initial review: PR #295 (work item #293), recovered-attempt verificationStatus: APPROVED for head ScopeAccumulated diff FindingsNone. Checks made:
Security triageNo Commands executed (locally)
The two narrower test commands in the recovered comment are not in this stage's command table, so I did not rerun them. In the full run, none of the 63 failing tests are in Unverified
CI (policy: parallel, read once, not awaited)All 6 checks of the head were Residual risksThe local full suite was not green because of the sandbox. Passing exact-head CI is the evidence for those tests. No other residual risk. VerdictAPPROVED: no open finding blocks approval, and every check of the reviewed head passed. |
[CCR-20261020-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Initial review — PR #295 (work item #293)Verdict: APPROVED. Head Scope reviewedAccumulated diff FindingsNone. Notes (not findings):
Security triageNo Execution
UnverifiedThe full suite was not green locally because of the two sandbox-caused failures above; the PR's own full-suite run (agent-reported, 1642 tests) and the CI jobs below cover those modules on a normal host. The changed modules passed locally. CI (parallel policy, read once, not waited on)All 6 checks of the reviewed head passed: Residual risks
|
Fix the consent-answer path so a full stage rerun uses the existing effect guard even when it keeps the same executor. A grant or denial can no longer replay a stage that already published or changed its workspace.
Work item: #293.
Diagnosis
The same-executor consent path checked process exit but skipped
reroute_gate(). A synthetic adapter and broker reproduced two dispatches after the first attempt changed publication evidence; the regression expected one dispatch and failed with1 != 2. Reproduction:python3 -m unittest discover -s /tmp/code-cycle-tmp-enx0bu9b -p reproduce.py(exit 1; the targeted assertion failed).Classification: isolated defect; decision: implement. The cause matches the issue. The invariant is that every full rerun must prove exit and reconcile the preceding attempt's effects before redispatch.
Related work was searched beyond the issue links using consent/reconciliation and reroute/publication searches. #268 and merged PR #277 establish the guard; #288/#290 own continuation and verification, #289 owns grant lifecycle, and #187 owns the later stage refactor. This change preserves those boundaries and introduces no grant or continuation mechanism.
The fix reuses the full guard rather than adding separate consent reconciliation. As permitted by the scope clarification, an already dirty workspace also stops conservatively, even if unchanged. Clean snapshots permit rerunning; changed publications, remote refs, commits or workspace, unknown evidence, and unproven exits stop.
permission_answeredretains its meaning for permitted reruns, while stopped reruns record the guard's reason.Work units
scripts/cycle.py,tests/test_environment_recovery.py,tests/test_run_cycle.py,docs/routing.md9690049a44afcb8c2f70c73ebbdd1ff432193dcaVerification (agent-reported)
python3 -m unittest discover -s tests: exit 0, 1642 tests passed in 579.576 seconds on the completed patch.python3 -m unittest discover -s tests -p test_environment_recovery.py: exit 0, 22 tests passed.python3 -m unittest discover -s tests -p test_run_cycle.py -k PermissionConsentTests: exit 0, 8 tests passed.python3 -m unittest discover -s tests -p test_run_cycle.py: exit 0, 211 tests passed.python3 scripts/validate-package.py: exit 0; all 16 skills valid and shared sections/manifests aligned.git diff --check: exit 0.An earlier full run, before the consent fixture correction, also reported one statistics assertion (
10 != 0). It did not reproduce:python3 -m unittest discover -s tests -p test_stats.pypassed all 42 tests, and the final full suite above passed. The earlier failure's cause was not established.Additional type analysis:
basedpyright scripts/cycle.py tests/test_environment_recovery.py tests/test_run_cycle.pyexits 1 with 111 errors and 2948 warnings. The unchanged-HEAD comparison exits 1 with 112 errors and 2866 warnings; matching error messages as multisets finds no introduced errors and one removed optional-member error. The repository has no Pyright configuration; no type-check settings were changed. Warning counts increase with the additional tests. These diagnostics remain a verification reservation, not a claimed type-check pass.The tests use synthetic adapters, isolated telemetry/consent stores and controlled snapshots; they do not grant Docker access or publish synthetic effects. The full suite uses its existing host-environment isolation. No installed native sandbox campaign is needed for this in-process decision change. Setup evidence was prepared, with no failed or incomplete setup item reported.
Run: profile
deep_coder, requested modelopenai/gpt-6.1-sol, effortmedium, resolved model?.Closes #293