Repository navigation
fix(devtools): honest interruption, hash, reaping and scratch receipts - #5830
Merged
Merged
Conversation
- A focused run interrupted by Ctrl-C or a signal carries its termination reason into the pytest aggregate, and pytest_interrupted counts as an interruption, so the evidence receipt says interrupted, not failed. - The storage idempotency scenario compares the stored session hash with the canonical hash of the normalized session instead of checking only that it is present. - The queued pytest waiter installs its reaping handler before the job exists, so a signal right after job start cancels the job, and it names the captured log at submission so a queued run can be watched. - The suite scratch peak includes the controller's whole-tree walk. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
…makes it 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
Sinity
enabled auto-merge (squash)
September 29, 2026 13:24
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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. |
This was referenced Sep 29, 2026
Merged
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
Fixes five confirmed Codex P2 defects in devtools: interrupted focused runs recorded as failed, a storage-correctness check that could not fail, a waiter that could leak a queued pytest job, queued pytest output that could not be watched, and a suite scratch peak that ignored the one simultaneous measurement.
Problem
devtools testrecordedtermination_reasonin local metadata only. The focused aggregate carried none, and_terminal_statusrecognised only theverification_interrupteddiagnosis. The evidence receipt therefore saidfailed.content_hashwas non-empty, which the table's length CHECK already guarantees. A writer storing any fixed 32-byte digest passed._submitexposed the queued job and wrote the waiting message before it installed the reaping handler. A signal in between killed the waiter under the previous handler and left the job in the pytest pool.agentctl job logs, which never carries pytest output.Solution
run_testscarriestermination_reasoninto the focusedpytest_aggregate.devtools.verification_result.INTERRUPTED_DIAGNOSES(verification_interrupted,pytest_interrupted) is now the one vocabulary that both_terminal_statusand the result summary read.session_content_hash(normalize_session_timestamps(session)), computed independently of the writer.job start. Until the job id is known, the handler removes the launch file, so a job the in-flight start created ends without running pytest. After that it cancels the job by id and reference, as before.No file is in the derived-identity closure; these are devtools modules outside
polylogue/.Verification
agentctl job start --workspace <wt> polylogue pytest_focused -- tests/unit/devtools/test_run_tests.py tests/unit/devtools/test_verify_runs.py tests/unit/devtools/test_verification_evidence_lane.py tests/unit/devtools/test_verification_terminal_receipts.py tests/unit/devtools/test_verification_scenario.py tests/unit/devtools/test_pytest_slot.py tests/unit/devtools/test_pytest_suite_cost_plugin.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_verification_result.py(job 3151, on the rebased head):passed 350, failed 5.Four of those failures are inherited, and fail identically at origin/master 0914f89 (job 3104,
--on-default-branch:4 failed):test_zero_exit_without_a_report_is_a_failed_pytest_step,test_reconciled_abandoned_run_joins_the_durable_lane,test_post_gc_rss_is_read_before_heap_census_allocationsandtest_queued_interruption_keeps_start_time_worktree_provenance.agentctl job start --workspace <wt> polylogue verify_quick(job 3135): succeeded.The fifth failure,
test_verification_result.py::test_projection_uses_the_finalized_step_and_aggregate_counts, also fails at origin/master f88b4a6 (job 3163,--on-default-branch). It is inherited.Self-review
Checklists read:
docs/review/codex-review-guide.md, the worker-contract generic list. Passes: 2. The first pass found two copies of the interruption vocabulary, inverify_runs._terminal_statusand inverification_result._semantic_status. They now shareINTERRUPTED_DIAGNOSES. The second pass was clean.run_tests.mainwith an interrupting runner,run_storage_correctnesswith a patched writer digest,run_pytestagainst a fakeagentctl, andaggregate_suite_costover receipts.git grep 'verification_interrupted'overdevtools/finds three consumers.verify_runs.py:464, the explicit-terminal set, already listedpytest_interrupted. The other two now share one constant. The waiting message is the only pre-wait output in_submit.INTERRUPTED_DIAGNOSESis new, and_terminal_statuskeeps its signature. The waiting line's format is human text with no parser in the repository (git grep 'waiting for the host pytest slot'finds the source and the new test only).AssertionErrorinside the scenario check, and the scenario reports that as a failed check.Findings
termination_reason;pytest_interruptedis an interruptiontest_interrupted_focused_run_publishes_an_interrupted_evidence_receipttest_storage_correctness_rejects_a_non_canonical_stored_content_hash_on_exit(reap_owned_job)wraps job starttest_an_interrupt_right_after_job_start_still_reaps_the_jobpueue followtest_a_queued_run_names_its_output_log_when_it_submitstest_controller_whole_tree_scratch_walk_sets_the_suite_peak🤖 Generated with Claude Code
https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg