Repository navigation
fix(devtools): finish interrupted and refused runs with true receipts - #5802
Merged
Merged
Conversation
Focused runs now turn SIGTERM into a typed interrupted receipt (exit 143) with history and evidence, diagnose missing directories on pytest usage exit 4, and print absolute receipt and artifact paths. Queued slot interruptions keep their start-time worktree provenance. Canonical receipts attribute a source revision only when the ending head equals the executed head. The verifier covers selection, admission and verdict assembly with its interruption handlers, and a refused affected plan still runs the static gates. Abandoned runs adopted as success are republished after an interrupted publication. `devtools test --outliers` read last-pytest-*.json shards that no verifier writes any more; it now reads every pytest lane of the newest completed --all receipt, and the verifier's shard clearing is removed. The Home Manager lane checks the independent capability switches, the pattern gate hashes with usedforsecurity=False, and its help and docs name the context-anchor baseline format. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sinity
enabled auto-merge (squash)
September 29, 2026 04:24
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sinity
added a commit
that referenced
this pull request
Sep 29, 2026
…ity2 Master added a FAILED outcome at the post-publication requiredness recheck. Like every other exception-backed FAILED outcome in this branch, it now names the exception type first and carries transient=_is_transient_failure(exc), with a test. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Salvages ChatGPT fleet worker 15 (Codex review debt, beads polylogue-1tyq5.45, .47, .48, .51, .52: devtools parts 4/6/7, docs, nix). Of 79 findings: 13 fixed here, 56 already fixed on master, 4 stale, 6 not reached. The worker's patch was built on snapshot
e1510b53ea, not master. It was ported hunk by hunk onto current master, keeping the newer OOM attribution and trusted-parent work inverify.py,verify_runs.py,run_tests.pyandpytest_slot.py.Problem
devtools test --outliersglobbedlast-pytest-*.jsonshards. No verifier writes these any more: each pytest step's report is rebound into its run step directory, and onlylast-pytest.jsonis projected. The command therefore read nothing or stale files (45.01, 45.02).devtools testthat got SIGTERM died insubprocess.run. It wrote no terminal receipt, history or evidence (45.06).main()haschdired to ROOT, so the path did not resolve from the caller's directory (45.12).canonical_verification_receiptpreferredfinal_git_head. It attributed passing tests to a head that moved under the run and was never executed (45.14).running(47.03).path:sha1[:count], but the parser requirespath:sha1:context_sha1[:count](48.01). The SHA-1 anchors used the security-default constructor (48.03).Solution
print_outliersselects every pytest lane of the newest completed--allreceipt (tierall, statussuccess,complete_corpus_covered). It refuses when a lane report is missing. The shard glob, its constant and the verifier's_clear_full_run_shardsare removed.devtools testinstalls a SIGTERM handler around the launch. The slot's own handler chains into it after it stops the child. The run finishes with exit 143 andtermination_reason=sigterm, and the prior handler is restored.worktree_provenance.source_revisionis set only when the ending head equals the executed head. It is also unset when the tree is unknown or dirty._mainruns selection, admission, steps and verdict assembly inside the interruption handlers. Publication (_finish_and_record_verification) stays outside so a signal cannot finish a run twice. A refused plan now runs the quick gates through the same path, keeps the first failing gate's exit and diagnosis, and otherwise returns exit 2 withaffected_admission_refused.cfg.mcpEnable*mappings.usedforsecurity=False. The help, catalog, regenerateddocs/devtools.mdanddocs/structured-logging.mdname the context-anchor format.Diverges from the worker: its 47.03 change put publication inside the handler. That could append a second history row for a run already finished. Publication is kept outside, and crash-consistent publication stays with 47.12 (not reached). Its 47.25 change is dropped because master already rejects malformed registries more strictly.
Verification
All through AgentCTL on the pushed head's tree or its immediate predecessor:
agentctl job start polylogue verify_quick --workspace /realm/worktrees/salvage-w15 --wait: job 2319 on75059a9ddc(rebased head):verify: PASSED exit=0.agentctl job start polylogue pytest_focused --workspace /realm/worktrees/salvage-w15 --wait -- tests/unit/devtools/test_verification_terminal_receipts.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_run_tests.py tests/unit/devtools/test_verify_patterns.py tests/unit/devtools/test_agent_integration_module.py tests/unit/devtools/test_verify_runs.py tests/unit/devtools/test_verification_evidence_lane.py tests/unit/devtools/test_pytest_slot.py: job 2300 on4e72110e57:2 failed, both inherited (see residuals); everything else passed.pytest_focused -- tests/unit/devtools/test_verification_terminal_receipts.py tests/unit/devtools/test_verify_patterns.py tests/unit/devtools/test_run_tests.py:devtools test: PASSED exit=0.e14b47662d) with production code unchanged. Every new regression failed: 13 intest_verification_terminal_receipts.py, the sha1 pattern test, the HM lane pass case, bothtest_affected_admission_refuses_without_launching_pytestparams and the adapted outliers test. Theending == executed headcanonical parameter passed there as expected. The same job reproduced the two inherited failures.python -m devtools schema closureon all 8 changed production files, and every one reportedout. The same job regenerateddocs/devtools.mdwithdevtools render devtools-reference.Self-review
docs/structured-logging.mdcarried the same stale anchor spelling (48.01). Both slot interruption writers are fixed (45.08). The verifier's shard clearing was the other half of the dead shard protocol and is removed with the reader.finally. The held slot's handler restores it and re-signals, so the two chain. Verifier publication is outside the handler, which avoids double finishing.runs/*/run.json, which retention already bounds (8 successful runs).source_revision.PYTEST_PARALLEL_REPORT_PATTERNand_clear_full_run_shardshave no remaining references in code, tests or docs.run_tests.main,verify.main,pytest_slot._run_launch,reconcile_and_record_abandoned_verify_runs,verify_patterns.mainand the real lane function. Only host observations (Git, processes, signals) are replaced.Findings
verify._bind_pytest_reports_to_step)_write_interrupted_resultlacked provenanceif rc == 5onlyrun.relative_run_dirprintedfinal_git_head or git_headtryreturn 2beforebuild_verify_steps_rulesraises on every malformed shape, verify_patterns.py:36-63; test_verify_patterns.py::test_malformed_pattern_registry_fails_closedpath:sha1[:count]hashlib.sha1status == "failed"only--recompute/--commit, bootstrap selection, parent-root refusal, graph publication)Derived-identity closure
None. All 8 changed production files are outside the closure (
devtools schema closure, job 2202).Residuals
e14b47662d(job 2242) and are unrelated to this change:tests/unit/devtools/test_verification_evidence_lane.py::test_reconciled_abandoned_run_joins_the_durable_lane: the relocated-cache evidence target conflicts with the test's durable-lane expectation.tests/unit/devtools/test_verify.py::test_zero_exit_without_a_report_is_a_failed_pytest_step: pytest-benchmark options are unrecognized in the free-threaded venv.source_revision. This is intended: the head was never observed at the end.🤖 Generated with Claude Code
https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg