Repository navigation
feat(scans): retain explicit Standard file review receipts - #2688
mldangelo-oai wants to merge 15 commits into
Conversation
Carry the per-file review idea from #829 through the existing draft checkpoint. Preserve the released ability to seal a partial scan with named deferrals and retain previously closed preview receipts.
Codex Review Summary: ✅ CompletedThis 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. |
zcrab-oai
left a comment
There was a problem hiding this comment.
Owner-level merge-safety review of bf5f1aec71804db165848cdc3f397e8d13d2f270.
One P2 persistence issue is inline. No P0/P1 finding. The design otherwise keeps file receipts separate from worklist counts and preserves partial Standard completion. This is an approval candidate for the owner's decision, with that P2 caveat and the testing limits below; no approval is submitted.
Validation passed: 399 MCP recovery/database tests, 8 focused Python migration tests, 21 SDK renderer tests, 2 packaged repository-finding tests, Ruff, CI compilation, SDK types/formatting, plugin build, and the portable source checks. The source checker's 9 self-tests passed after suppressing only the local proxy's unrelated warning. A benign packaged stdio smoke check verified the draft schema and migration 78. All 74 GitHub checks for this head passed.
Local limits: 6 receipt/lifecycle tests stop at the existing output-directory ownership check. Two inventory-wrapper tests also fail locally; diagnostic copies with both the old and new fixture name fail the same assertion while the inventory commands succeed. I did not weaken any checks. The persistence finding is supported by a source trace and a benign unit test with an injected helper rejection; it is not a full lifecycle reproduction. Native Windows/macOS and live-model runs were not performed.
ianw-oai
left a comment
There was a problem hiding this comment.
Found one additional correctness issue at this revision: normal Git line-ending conversion makes valid file-review receipts fail. Details and the synthetic reproduction are inline. The earlier draft-persistence finding is separate and is not duplicated here.
Check each declared file against saved inclusion and exclusion paths before hashing a batch. Share path matching with the registered file count for Git and unversioned scans.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26ecd9452b
ℹ️ 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".
Summary
Standard scans can report how many distinct files their reviewers explicitly finished. A scan that reviews one of three files can save that receipt, name the other two under deferred work, and seal with its actual coverage. This carries forward the per-file review design from #829 for #70. The all-files completion rule remains a separate decision on #829.
Changes
Accept optional repository-relative
reviewState.reviewedFilesin the existing scan draft tool. Validate the entire submitted batch against the registered target and store one path, SHA-256, and first acceptance time per scan and file. Reconciled drafts, reads, progress counts, and mock launches create no receipts.Expose positive
progress.coverage.filesReviewedin compact and saved progress, history, andscans show. Worklist row counts keep their existing meaning. Clients may continue to omit the field.Add migration 78. It imports only closed paths from the original fix(coverage): bind Standard completion to file review receipts #829 schema with their stored timestamps. It also handles that schema after main has reopened it and retains the original records. Existing scans can continue.
Use the saved exclusions from the launch recipe when checking each batch, with the same path matching as the workbench file count.
Testing
Reproduced a receipt for an excluded subtree after merging main. Regression cases cover mixed batches in Git and plain directories, including a permitted filename with the same prefix. Ran 213 focused Python tests with one skip and all five portable checks.
The follow-up passed eleven receipt tests and all five portable checks. Regressions cover
core.autocrlf, nested attributes, binary and changed content, external filters, and saving a draft with a rejected declaration.Ran the same three-file workbench fixture on main, fix(coverage): bind Standard completion to file review receipts #829, and this change. Main and this change prepared and sealed with one closed worklist row and two deferrals. fix(coverage): bind Standard completion to file review receipts #829 rejected both operations at 1/3. On this change an explicit file declaration added exactly one file receipt to both results.
Exercised the packaged MCP server over stdio on main and this change. A bare read recorded zero. On this change the accepted path produced one receipt in both detail and history, even after a subsequent draft omitted it. The receipt digest matched the reviewed bytes. This synthetic fixture used an ownership adapter for process startup.
The targeted Python tests, 318 MCP recovery tests, 81 database tests, 21 SDK renderer tests and two packaged repository-finding cases passed. Checked direct and prepared sealing with Linux Git autocrlf both enabled and disabled. The migration test opened an actual fix(coverage): bind Standard completion to file review receipts #829 database both directly and through main.
Ruff lint and formatting, CI compilation, plugin source compatibility and its nine self-tests, SDK types, and SDK formatting passed. The local seeded SDK suite was stopped after repeated fixture failures. The randomized run stopped on its first failure. The first failing tests from both runs independently hit the same root ownership error on main. No live-model or Desktop scan was run.
On the first published head, all three Ubuntu Python jobs caught an outdated expected-table list. The native macOS and Windows jobs rejected a skipped case-sensitive filename test. Updated the expected table list and made the test exercise exact spelling on both filesystem types. The final focused Python checks passed all 19 cases, including the original database assertion. First hosted run
Ubuntu 26.04 shard 6 had two failures and 4,981 passes. Both failures used the same wrapper fixture. Applied the existing test-only correction from test(sdk): preserve the env utility name in inventory fixtures #2678. Its locally reproduced fallback is sensitive to the surrounding checkout, so hosted Ubuntu is the verification for this fixture. First shard 6 · Source CI for
503ac697Risk and rollout
Git receipts record the SHA-256 of the bytes read from the checkout. For text that Git converts to CRLF, the workbench verifies the corresponding LF content against the registered blob using Git’s EOL metadata. Receipt verification runs without invoking external clean filters. An invalid optional declaration produces a warning while the finding draft is saved. An unversioned target rehashes its registered directory for a nonempty batch.
Migration 78 records explicit file reviews. The Deep Scan reader uses 82–85 and its writer uses 86.
Public disclosure review