Skip to content

fix(devtools): require evidence and fail closed - #4146

Merged
Sinity merged 12 commits into
masterfrom
feature/fix/devtools-systemexit-failclosed-stacked
Aug 25, 2026
Merged

Sinity merged 12 commits into
masterfrom
feature/fix/devtools-systemexit-failclosed-stacked

Conversation

@Sinity

@Sinity Sinity commented Aug 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Require positive complete verification evidence and make every render failure fail closed.

Problem

A process could exit zero after incomplete collection or execution, and callers could record a successful step before durable evidence evaluation rewrote the result. Required gates could also misclassify missing or semantic evidence. Separately, render pages could report failure while the aggregate command exited successfully, SystemExit could bypass ordinary handling, and punctuation could make a recorded diagnosis unreachable from its explanation.

Solution

  • Evaluate pytest selection, terminal outcomes, interruption, and process status at the durable step writer.
  • Make collection-only and unavailable evidence explicit and ineligible for ordinary green receipts.
  • Fail required gates closed on missing executables, inputs, unreadable files, empty populations, and semantic violations.
  • Consolidate duplicate evidence evaluation and provide actionable why explanations.
  • Translate renderer SystemExit, invalid results, inventory failures, and page-builder exceptions into typed non-green outcomes.
  • Bind render stamps to complete input inventories and write them only after successful rendering.
  • Preserve exact diagnosis tokens through receipts and remove the dead duplicate surface-input hash authority.

Verification

  • Verification foundation: 100 focused tests plus live zero-process, collection-only, selector, maxfail, SIGTERM, and missing-executable controls.
  • Render/receipt/why group: 65 passed; real render-all check passed; changed-file Ruff and mypy passed.
  • AgentCTL declared exact-head verify_quick jobs 65be8e27-36ae-4037-b9f7-05141cf839d7 and b1299754-a61b-455c-9e7f-ef6b27e16920: all gates passed.
  • Independent exact-head reviews aab23282-d923-49fc-96d6-7f32a87d49f8 and 1e55a11e-14a6-4307-9973-e09bad238ae0: PASS.
  • Plain selected verification remained unavailable because no compatible testmon graph existed; it refused rather than laundering a partial run.

Ref polylogue-empnr.
Ref polylogue-bsxoh.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7cb73f2d-a562-4593-adec-50845085d37e


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Sinity Sinity changed the title fix(devtools): make render failures fail closed fix(devtools): require evidence and fail closed Aug 25, 2026
@Sinity
Sinity merged commit 936f2ff into master Aug 25, 2026
3 checks passed
@Sinity
Sinity deleted the feature/fix/devtools-systemexit-failclosed-stacked branch August 25, 2026 13:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7741d6b50

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread devtools/verify_mutation_freshness.py Resolved
Comment thread devtools/pytest_evidence.py Resolved
Comment thread devtools/pytest_evidence.py Resolved
Sinity added a commit that referenced this pull request Aug 26, 2026
## Summary
Fixes the two serial-lane corpus failures exposed when corpus run 7
reached step 19 for the first time, and production-shapes the codex-804
fixture's cursor surgery (first half of that storage-scale failure).

## Problem (evidence)
Corpus runs abort at the first failed step, so
`pytest-native-serial-all` (step 19) and `storage-scale` (step 20) had
not executed in any recent run; run 7 (`c53460c8`) was the first to
reach them after the parallel parts went green. Serial failures:
- `test_archive_facets_expose_provider_role_and_material_origin_split`:
runtime-protocol material now carries message type `protocol` (#4173
vocabulary); the test pinned `message == 3`. Its protective core — the
authoredness split — is unchanged.
- `test_select_returns_fzf_choice_in_json_in_a_real_pty`: the enriched
row JSON (#4201: `cost_usd`, `outcome`, `relative_time`) outgrew the
200-column PTY, hard-wrapping mid-token so the JSON parse hit the wrap
control character. PTY widened to 400 columns; expected payload updated
with the three fields.
- Storage-scale `test_sanitized_codex_804_revision_recovery_proof`
(long-red: fails at least back to #4146, invisible for the same
never-reached-step reason): the fixture's rewind cursor passed
`source_revision` for a JSONL file, routing it down the SQLite-snapshot
branch where the NFC content hash was recorded as the byte-prefix
authority — unmatchable by `plan_append`'s sha256-of-bytes proof.
Dropping it restores the JSONL branch, which derives the prefix
authority from the rewound on-disk bytes; the planner now plans all 16
fragments.

## Verification
- `devtools test` on both serial tests → 2 passed; full serial marker
suite locally: 25→27 passed for the fixed pair.
- codex-804: planner phase now completes; the test still fails
downstream (append revision-application decisions missing for deferred
appends) — dispatched to a dedicated fix lane, tracked for corpus
closure.
- `devtools verify --quick` → all 15 gates ok.

## Residuals
- codex-804's remaining ledger gap is the sole known corpus-red; lane in
flight.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

Closing out open Codex review threads on this PR (evidence checked against master at 64a9bd0):

Resolving every thread listed; confirmed defects are fixed under the named bead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant