Repository navigation
fix(rust): file-backed insta snapshot without a committed .snap cannot close a return seam - #12246
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 54 minutes. View limit details
|
There was a problem hiding this comment.
REPAIR_REQUIRED — head 81e8f56
Multi-angle review of the exact head: (1) name resolver and the "certainly missing" rule, (2) cache key and worktree overlay, (3) tests and the honesty-corpus pin. I built ripr at this head and at the merge base and compared ripr check --mode draft --format repo-exposure-json on variants of the field-snapshot-missing-expected subject. I could not link the lib test binaries here (OOM), so I did not run the new tests; I read them and checked their claims with the built binary.
Blocking: a committed binary snapshot is wrongly demoted (reproduced)
insta::assert_binary_snapshot!(".json", bytes) takes the extension as its first argument. expected_snapshot_names treats any two-argument call with a plain-literal first argument as assert_x!("name", value), so it expects a file named .json, finds none, and calls the snapshot certainly missing.
Variant (subject make_record return seam) |
merge base | this head |
|---|---|---|
assert_binary_snapshot!(".json", ..), <mod>__snapshot_field.snap committed |
strongly_gripped | weakly_gripped |
same, no .snap |
strongly_gripped | weakly_gripped (correct) |
assert_json_snapshot!(record.items), .snap committed |
strongly_gripped | strongly_gripped |
assert_json_snapshot!("rec", record.items), rec.snap committed / only the function-named file present |
strongly_gripped / weakly_gripped | strongly_gripped / weakly_gripped (correct) |
This is the failure the PR itself names as the cost of a wrong miss: a real snapshot loses credit. The direction is the conservative one, but the PR's contract is "demote only when certainly missing", and here the rule is certain about the wrong file name. Fix: resolve assert_binary_snapshot! to the unresolved (None) set, or key the two-argument literal rule on the macro name, and add a pin (resolver unit test plus one integration case with a committed .snap). Any macro whose first argument is not a name should also return None rather than a guess.
Resolver and the rule (other findings, not blocking)
- Cases I confirmed against the binary: unnamed (function name, with and without the
test_strip), string-named, named-but-only-function-file-present (demotes, correct), unqualified macro withoutinstain the file (not resolved), repeated or 3-argument forms (unresolved, grade kept),snapshot_path/glob!/INSTA_in the file (unresolved, grade kept). with_settings!({snapshot_suffix => ..})andprepend_module_to_snapshotshapes gradereachable_unrevealedon both base and head, so they are not changed by this PR. The@suffixstem handling is not reached by an observable case today; the resolver unit test covers it, which is fine.INSTA_UPDATE/INSTA_FORCE_PASSset in.cargo/config.tomlorinsta.yaml(not in the Rust file) is not seen. With a missing.snapandINSTA_UPDATE=alwaysthe assertion still fails withoutINSTA_FORCE_PASS, so the demotion stays right in the common case. Non-blocking; worth one line in the doc comment.- A repository over 20,000 files makes the listing
unknown, so the demotion silently turns off. That fails open to today's grade, which is the right side, but I would surface it somewhere (a debug note) rather than leave it implicit.
Cache key and overlay
SnapshotListing::identity()is added toworkspace_manifests_hashwith tracked/untracked/unlisted per path, so adding, removing orgit add-ing a.snapmoves the key. The integration testadding_and_removing_the_expected_file_moves_the_cached_return_gradeexercises add and remove on one workspace; I did not separately re-run add/remove (my probes used a fresh directory per variant).- Overlay:
any_snapshot_input_differsmakes the listingunknownwhen a thread-local overlay serves the root and carries snapshot inputs. That correctly avoids demoting on a state the filesystem does not show. Overlay propagation to workers is the same mechanismtest_grip_evidence.rsalready uses. There is no test for the overlay-unknown branch (see below). - Cost: the key computation walks the tree once and the index cell reads it a second time. The 20,000-file limit bounds the walk, but I did not time a large tree; on the tiny subject run time was unchanged (0.38 s head, 0.50 s base). Reusing one listing for both would remove the duplicate walk; not required.
Tests and the honesty-corpus pin
corpus.json+7 addsexpected_repo_seam_gripforsrc/lib.rs::make_recordrecordasweakly_gripped/ reachyes, and the regenerated report matches it (seams 2, weakly 2, strongly 0,static_limitationwithmissing_discriminator_evidence, headline-eligible true). Consistent with the binary's V0 output.- The pin covers only the plain
assert_json_snapshot!shape, so it would not have caught the binary case above. Add the binary shape to the repair. - Untested: the overlay-unknown path, and any case where a named snapshot is demoted (the resolver unit tests cover names, the integration test covers only the unnamed form).
- Hash re-chain and
CACHE_SCHEMA_VERSIONbump are still due just before merge; a delta review of that head will follow.Ripr Rust Small Resultmust be green on the merged head before any merge; I did not check this head's CI.
Generated by Claude Code
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — head 244b3d8
Delta review of #12246 against 81e8f56 (my REPAIR_REQUIRED). Three commits since: 11b8916 (resolver fix), 916d740 (merge of main 8a3c3b4), 244b3d8 (cache bump and re-chain). I read all three and built ripr at this head to re-run the probes that failed before. I did not run the lib or integration tests (the test binaries cannot be linked here), so the new unit and integration tests are read, not executed.
The blocker is repaired
expected_snapshot_names now returns None unless the macro's leaf name is in NAMED_FORM_MACROS (assert_snapshot, debug, compact_debug, display, json, compact_json, yaml, ron, toml, csv). snapshot_call returns the leaf name, so the whitelist compares like with like. assert_binary_snapshot and any unknown macro are unresolved and keep today's grade. Built-binary results at this head (subject field-snapshot-missing-expected, make_record return seam):
| Variant | 81e8f56 | 244b3d8 |
|---|---|---|
binary macro, function-named .snap committed |
weakly (wrong) | strongly |
binary macro, no .snap |
weakly | strongly (unresolved, not guessed) |
assert_json_snapshot!(x), no .snap |
weakly | weakly |
assert_json_snapshot!(x), .snap committed |
strongly | strongly |
assert_json_snapshot!("rec", x), rec.snap committed / missing |
strongly / weakly | strongly / weakly |
assert_yaml_snapshot! and assert_compact_json_snapshot!, no .snap |
n/a | weakly |
assert_debug_snapshot!("rec", x), only the function-named file present |
n/a | weakly |
The new tests also cover it: a resolver unit test for the binary and an unknown macro, a_committed_binary_snapshot_keeps_the_return_seam_credit in the integration file, and an_unknown_listing_never_says_a_snapshot_is_missing for the certainly_lacks helper. The INSTA-outside-the-file and 20,000-file caveats are now in the module doc. The overlay-unknown branch is still untested; non-blocking.
Cache bump and hash chain
CACHE_SCHEMA_VERSION1.133 to 1.134, sharded and compact 0.137 to 0.138.origin/mainis still at 1.133 / 0.137 as of this review, so these are the next free values; the doc lines and the version-assert test were updated together.- Re-chained
boundary_gap/expected/first-useful-action/unchanged-after-attempt: I recomputed under theraw_json_placeholder_v1rule (SHA-256 of the file text with the artifactcontent_sha256replaced by the zero placeholder). Both repo-exposure files give0ccefd0c…58ff, matching the stored value. The whole-file SHA-256 of those two isef098de9…512e, matching the twoagent-receipt.jsonentries.agent-verify.jsonhashes to42825855…7f67, matching the receipt'sverify_artifact, and its before/after content hashes match. No remaining reference to the old5001b340…,588aac86…or63737b4a…values in the tree. 1.134also appears indocs/OUTPUT_SCHEMA.md(two places),gap_corpus_currentness.rsandxtask/src/tests/rust_corpus_projection.rs; no1.133is left outside the changelog and history comments.- Traceability fragment
.ripr/traceability.d/12189-…tomlregisters the three tests under RIPR-SPEC-0094.
generated-pr-ci-review-workflow dogfood errors
That gate (xtask/src/dogfood.rs) runs ripr init --ci github --dry-run and ripr reports ci-summary, then checks string content of the generated workflow and summary (start-here, four repair commands, advisory, artifact upload, language grouping). This PR changes nothing in init, the CI templates, ci-summary or dogfood: its only xtask edit is a version constant in rust_corpus_projection.rs. I ran init --ci github --dry-run with a binary from before this PR and with the binary built at this head: stdout is byte-identical and stderr is identical apart from the root path. That is consistent with the errors being unrelated, but I cannot see the owner's actual error text and did not run cargo xtask dogfood (cold xtask build is longer than my limit here), so "unrelated" is not proven for the full gate. If the owner pastes the error lines, or the hosted dogfood job at this head is green, that settles it.
Currentness
Ripr Rust Small Result was not visible on this head; Rust gates was still in progress. It must be green on the exact head before merge.
Generated by Claude Code
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — head 1eaba50
Delta review of #12246 against 244b3d8 (my REVIEW_READY). Changed: rust_snapshot_files.rs, its tests.rs, and a new section in RIPR-SPEC-0094; no cache, fixture or golden file moved, so my earlier hash-chain check still applies. I did not run the lib tests (the test binaries cannot be linked here); I checked the UTF-8 fix by compiling the old and new expressions standalone.
1. UTF-8 slice panic — fixed. The old code took rfind of the first non-identifier character and sliced at index + 1, which lands inside a multi-byte delimiter. I compiled both versions: for →insta::assert_snapshot!(v); the old one panics and the new one (char_indices().rev(), index + c.len_utf8()) returns insta::assert_snapshot. Only the → case discriminates (a multi-byte character directly before the path); the other two test texts pass in the old code too. The bang index and the remaining slices use ASCII delimiters or get, so I found no other mid-char slice in that function.
2. Custom assert_snapshot! taken for insta's — fixed. A bare macro now needs imports_from_insta: no macro_rules! <name> in the file, and a use insta…; statement that names the macro or has a glob. The tests cover import by name, use insta::*, a brace group, a mere mention of insta, importing a different insta macro, and a local macro_rules! of the same name. Every ambiguous shape returns "unresolved" (grade kept), which is the safe side. Limits I noticed, none blocking: a comment or attribute directly before use insta… in the same ;-delimited chunk makes the match fail (so it stays unresolved); the check is substring-based, so use insta::internals::* would count as a glob import. Both are rare.
3. Unreadable directory — now unknown, not missing. collect returns true (incomplete) for a failed read_dir, a failed directory entry and a failed file_type, and the recursive call propagates it, so SnapshotListing.unknown is set and certainly_lacks never says a snapshot is missing. The unit test with a nonexistent directory exercises the read_dir failure. The execute-only directory test only asserts the outcome when the directory is really unlistable, so it passes either way when run as root; I am root here and cannot reproduce a permission denial myself. One remaining fail-toward-demotion gap: a directory or file whose name is not valid UTF-8 is skipped (continue) rather than making the listing unknown, so a committed .snap under such a directory would read as absent. Very rare; consider returning true there.
4. Spec text — present and matches the code. The new RIPR-SPEC-0094 section states the whitelist rule (assert_binary_snapshot! unresolved), the import requirement, the override texts, the complete-listing condition and the untracked-file rule. The proof list names tests that exist, including the corpus case rust_field_snapshot_missing_expected_not_promoted.
Cache: origin/main is still at 1.133 / 0.137, so 1.134 / 0.138 remains free for this PR; #12254 claims the same values. Whichever merges second must re-bump and re-chain. Ripr Rust Small Result was not visible on this head (only spec-maintenance-digest running when I looked); it must be green on the exact head before merge.
Generated by Claude Code
|
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — head 2cf4d92
Delta review only (merge of main, cache bump, boundary_gap re-chain). The source review on 1eaba50 stands. I read the diffs and recomputed hashes; I did not build or run tests here.
Merge. Two merge commits since 1eaba50 (67235b1 brings #12211, 2cf4d92 brings #12233/#12205/#12242). Every file that differs from the reviewed head is either a file main changed or one of the PR's version/chain files. For the PR's own 23 files that differ from main, only the cache and chain files below changed since 1eaba50 (plus SPEC-0094, where main's #12211 wording merged in cleanly beside the PR's change).
Cache. Full 1.135, sharded and compact 0.138, the version-assert test, CURRENT_CORPUS_CACHE_SCHEMA_VERSION in gap_corpus_currentness.rs and xtask/src/tests/rust_corpus_projection.rs, both OUTPUT_SCHEMA.md examples, and the identical-inline-arms report all agree. No stale 1.134 remains outside the doc history in seam_cache.rs. main is still at 1.134/0.137.
Chain. Recomputed with raw_json_placeholder_v1: after/before.repo-exposure.json hash to their stored f36590e9… and are identical; agent-receipt.json carries the whole-file hash of both (5e398358…) and of agent-verify.json (a4a6f3cb…, matches); agent-verify.json carries the new before/after value. Note f36590e9… is the same value as on #12254 (both change only cache_schema_version to 1.135), so the second merge re-chains again to 1.136.
Minor, not blocking:
- The sharded and compact doc lines say "same … rule as full
1.134"; the full generation for this change is now 1.135. - The version test comment lost the
0.136 -> 0.137history line instead of keeping it above the new one.
Open: Ripr Rust Small Result has not run on this head (Admit PR Candidate was queued when I looked), so merge needs it green on 2cf4d92. If #12254 lands first, this PR needs 1.136/0.139 and the same re-chain, with a delta review.
Generated by Claude Code
|
Triage: head 2cf4d92 is unstable - the red check on the exact head is ranking (Pilot Ranking, run 41352735017). First failing assertion: xtask dx-scoreboard gate failed, regressed ranking.pilot_picks_top10 baseline 39.0 to current 38.0 (allowed worsening 0.0). Note: the merge-ready-conflict bot comment above references older head 1eaba50; the API currently reports this head mergeable with ranking as the blocker. PR owner: please investigate whether the pick-count drop is caused by this change or needs a baseline/attribution update before re-queueing. |
|
Owner reply on the Generated by Claude Code |
|
Gate-triage record for the ranking red on this PR (verified 2026-11-02, no code changes made). Verdict: inherited failure, not a candidate defect. The PR contributes zero ranking movement. Evidence: the failing job (41352735017/job/124986230529) reports exactly one regression, ranking.pilot_picks_top10 baseline 39.0 to current 38.0, which is main's pick-count leg tracked in #12262. The distinct-function share in the same job is non-regressed (27/38). The PR's retained pilot-ranking.json (22923 bytes) is byte-identical (sha256 48c4bf8f...b9282b0122) to main's dispatch artifact from #12262's main run: same 38 picks, 27 distinct, 7 confirmed / 17 refuted / 14 unscored across all rows, so zero admission, removal, ordering, or answer-key change comes from this diff. The diff itself touches only snapshot-oracle admission (analysis/rust_snapshot_files.rs, test_grip_evidence.rs, seam_cache.rs, seam_inventory.rs plus tests and fixtures); no ranker, scoring, corpus, or answer-key code. Resume condition: the #12262 lane (currently open and unassigned) resolves the main 39 to 38 leg; then re-run ranking on this merge ref. No candidate repair is warranted here. ub-review also shows fail on this head but its logs have expired, so that is missing evidence rather than a finding. |
|
|
|
State flip: required Ripr Rust Small Result now SUCCESS on 2cf4d92 (all shards green); only mergeable=false/dirty blocks. Merge main and re-qualify. |
…port to 1.140 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmPpe4nSBxbAHAKU6X
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — head 21d0535
Delta of record on top of cbf143c: a merge of main 0a7e281, no source change.
Checked on this exact head:
- The merge conflicts in one file only,
reports/rust-repo-exposure-adapter-fed-error.json; everything else is main's content. The PR's own tree is unchanged from cbf143c. - That report differs from main's (#12464) only in
cache_schema_version(1.139 to 1.140) andcontent_sha256. The seams, grips and related tests are main's, and the digest verifies underraw_json_placeholder_v1. It is main's body with the version string changed and the stamp recomputed, not a regeneration (analyzer string and timestamp are main's). The stamp is valid and the staleness guard passes, so I'm not blocking on it. - All 14
content_sha256stamps verify. Theunchanged-after-attemptchain is byte-identical to #12368's at 98fdf79. Cache constants are 1.140 / 0.142 / file facts 1.53, with the pins matching. cargo xtask check-evidence-promotion-honestypasses on this exact tree.
Collision: #12608, #12670 (#12610) and #12368 also hold 1.140/0.142; main is still 1.139/0.141. Whichever merges first keeps it, and the others re-bump to 1.141/0.143 and re-chain.
Not run: lib tests, goldens, hosted CI at this head. Ripr Rust Small Result must be green on this exact head before merge.
Generated by Claude Code
There was a problem hiding this comment.
Confirmed findings
- Cache-key construction and grading independently walk the snapshot filesystem, so a concurrent add/remove can produce a key and verdict from different listings.
Verification questions
- Confirm the snapshot-file search covers workspace
.snapentries, tracked state, incomplete walks, and differing overlay inputs, but no broad meta-class scan proves all insta file-naming variants are represented; unknown variants are conservatively unresolved. - Confirm snapshot paths and tracking state are included in the cache identity before the Cargo unavailable-marker suffix, so add/remove/untrack transitions should invalidate analysis results.
Refuted
- No JavaScript runtime, worker queue, async task, GC-managed object, detach, or structured-clone/ArrayBuffer transfer path is introduced by this diff.
Evidence gaps
- The resolver has focused unit and integration coverage, but this packet contains no completed cargo-test receipt, so add/remove cache transitions and unresolved-shape behavior remain read-verified rather than runtime-witnessed.
- The cargo-test sensor was scheduled but its receipt is absent, so the new resolver and cache-transition tests were not runtime-witnessed in this packet.
- The exact-head cargo-test receipt is absent, so the new resolver, demotion, and cache invalidation tests are not independently runtime-witnessed in this review packet.
- Model proof intent was rejected by deterministic validation.
- Runtime execution of the new resolver, red/green tests, and cache-transition test is not witnessed by this packet.
- Runtime witness for the new resolver and cache-transition behavior is absent from the supplied review packet, so security conclusions remain static and residual implementation risk should be checked by a human or focused test.
Parked follow-ups
- The new demotion is intentionally limited to names that can be derived certainly; aliases, re-exports, wrappers, binary snapshots, redirected snapshots, and case-driven tests retain their previous grade.
- Insta aliases, re-exports, and wrapper macros are not resolved and therefore retain the old grade; this is a deliberate conservatism, not evidence that all related sibling paths are correct.
|
Response to the advisory review's one "confirmed finding" (key and grading walk the snapshot tree independently), checked against 21d0535: It is accurate that they are two reads: grading uses the per-index I am not changing this in #12246. It is the same window every cache input has today (source files are hashed for the key and parsed for grading by separate reads), it needs a concurrent edit during a single analysis run, and the next run re-reads both and keys on the new listing, so the stale entry is only reachable if the tree returns to the earlier state. Changing it means threading one listing through both paths, which would change the head after the review of record. If wanted, I will file it as a follow-up alongside #12259. The advisory's evidence gaps (no cargo-test receipt) are covered by the hosted Result on this head. Generated by Claude Code |
|
|
…(prepared, unpushed) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmPpe4nSBxbAHAKU6X
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmPpe4nSBxbAHAKU6X
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmPpe4nSBxbAHAKU6X
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmPpe4nSBxbAHAKU6X
There was a problem hiding this comment.
Parked follow-ups
- The prior cache-key/grading race remains real: key construction and grading independently read the snapshot tree.
- The changed macro resolver remains intentionally conservative for aliases, re-exports, wrappers, binary snapshots, and unknown insta macro families.
Evidence gaps
- Runtime red/green proof is not available in this review packet; the cargo-test sensor receipt is absent and ripr exited 2.
- Exact-head executable proof of the resolver and cache-transition route is absent despite focused tests being added.
- Model proof intent was rejected by deterministic validation.
- No completed cargo-test receipt is present in this packet, and the ripr sensor failed with exit code 2.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — head b7a8d48
Delta review of record from 21d0535 (REVIEW_READY), compared against current main as well as the old head. Hosted Ripr Rust Small Result was not part of this review and must be green on this exact head before merge.
Constants. seam_cache.rs differs from main (0259b6a, still full 1.142 / 0.144 / file facts 1.54) only by this PR's own additions: full 1.143, sharded/compact 0.145, file facts unchanged at 1.54, with main's 1.142 note and assert history kept and the 1.143/0.145 notes appended. The snapshot-listing key input and its #12189 comment are unchanged from the reviewed head.
Version-carrying files. The corpus-currentness constants (gap_corpus_currentness.rs, rust_corpus_projection.rs) and OUTPUT_SCHEMA.md pins are at 1.143, no stray 1.142/0.144. The unchanged-after-attempt chain matches my derivation from the base's 1.142 chain byte for byte (all four files). Both rust-repo-exposure-adapter-fed-error.json and rust-repo-exposure-identical-inline-arms.json differ from the base only in cache_schema_version (1.142 to 1.143) and content_sha256. All 14 artifact.content_sha256 values verify.
Main's doc edits survived. docs/OUTPUT_SCHEMA.md differs from current main only by the two cache-version pins, so #12637/#12700 wording is intact. RIPR-SPEC-0094 carries main's #12434 paragraph plus this PR's non-UTF-8 line.
New code (#12259). rust_snapshot_files.rs::collect now returns true (incomplete) for a non-UTF-8 name instead of continue. That is the fail-closed direction: an incomplete listing can never say a snapshot is missing (certainly_lacks requires !unknown), so no demotion is made from a listing that skipped an entry. identity() includes unknown=, so flipping into the unknown state moves the cache key. The unix test creates a snaps-\xff directory holding a .snap, skips cleanly when the filesystem refuses the name, and asserts both the incomplete flag and !certainly_lacks.
Executed on this head. cargo test -p ripr --lib filters seam_cache, rust_snapshot_files, rerun_example, schema_version, cache_identity, output_doc: 260 passed, including a_non_utf8_name_makes_the_listing_unknown_and_never_demotes and check_output_doc_separates_internal_schema_gate_from_consumer_tolerance. cargo xtask check-evidence-promotion-honesty: pass. cargo xtask goldens check: exit 0.
Collision with #12670. #12670 (5be558e, REVIEW_READY) also claims 1.143 / 0.145 and edits the same two reports. Whichever merges second must re-bump to 1.144 / 0.146 and re-stamp those reports and the chain.
Not run. cargo xtask precommit and the wider gates on this head; relied on hosted CI.
Generated by Claude Code
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmPpe4nSBxbAHAKU6X
Delta review of record: head
|
There was a problem hiding this comment.
Confirmed findings
- The lexical resolver can mistake a non-insta macro named assert_*snapshot! for insta's when imported through a glob that also matches a local macro.
Evidence gaps
- Exact-head Rust runtime proof is absent from this packet because cargo-test has no completed receipt and ripr exited with code 2.
- No completed cargo-test receipt witnesses the new resolver and cache-transition suite on the submitted head.
- The added Rust tests have no completed execution receipt in this packet.
- The changed grading route has focused tests, but this packet lacks a completed cargo-test receipt.
- Model proof intent was rejected by deterministic validation.
- Runtime behavior is not independently witnessed by the supplied sensor packet.
Parked follow-ups
- The resolver and grading paths read the snapshot tree independently, creating a small concurrent add/remove inconsistency window; this is pre-existing to the current change and explicitly acknowledged in the PR thread.
- Named insta macro forms are conservatively restricted to an explicit whitelist; aliases, wrappers, re-exports, and binary/unknown forms remain unresolved.
- Key construction and grading perform separate filesystem reads, allowing a concurrent snapshot add/remove to mismatch the cached key and verdict.
- The prior cache-key/grading race remains possible because the cache key and grading path independently read the snapshot filesystem.
- The prior independent cache-key/grading snapshot walk race remains real.
|
Response to the advisory review of db8ebb4 ("a non-insta The same-file case is already refused: Generated by Claude Code |
… / 0.147 (#12671) Derived pins, chain and honesty reports left for the build-host re-derive. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmp1dk37XMDiDt4z11j
#12246 took 1.144 / 0.146, so this branch holds 1.145 / 0.147 (file facts stay 1.55). OUTPUT_SCHEMA.md pins, the two corpus-currentness constants and the unchanged-after-attempt chain move to 1.145. Both honesty reports are re-versioned to 1.145 and re-stamped: adapter-fed-error carries this branch's Ok(n) weakly_gripped recapture, identical-inline-arms is main's content. The seam_cache assert comments name the correct previous version. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmp1dk37XMDiDt4z11j
Governing issue or accepted claim: #12189
Acceptance delta (one sentence): A Rust return seam is no longer
strongly_grippedfrom a file-backed insta snapshot whose committed.snapfile is certainly missing.What changed
analysis/rust_snapshot_files.rs: lists.snapfiles under the workspace root (skipping.git,target,node_modules,.ripr), with tracked state from the existingtracked_snapshot_files. An untracked.snapis not one CI sees (typescript: committed-snapshot credit (RIPR-SPEC-0258) misses configs passed by path and reads untracked .snap files #7708), and a committed-history overlay that records a differing snapshot input reads as unknown.oracle_discriminates_seam_in_testrejects aSnapshotoracle only when the shape is the plain single file-backed insta assertion (unnamed, or one string-literal name on a macro whose first argument is a name), the test file has nosnapshot_path/glob!/INSTA_text, the test is not case-driven, and no listed.snapstem matches the test's name (lenient on module prefix,-Ncounter and@suffix). Everything else, includingassert_binary_snapshot!, keeps today's grade.CACHE_SCHEMA_VERSION1.137 and sharded/compact 0.139 (rebased onto main's 1.136 / 0.138), with theboundary_gap/.../unchanged-after-attempthashes re-chained, the corpus currentness constants andOUTPUT_SCHEMA.mdupdated.snapshot_field_admission.rs(missing demotes, present keeps credit, add/remove moves the cached grade, untracked-only does not credit, committed binary snapshot keeps credit, unresolvable shapes unchanged). Theseam_inventorystrength-policy test now commits its expected file.rust_field_snapshot_missing_expected_not_promotedand regenerated its report.Known limits
.snapsaves; verdicts are still correct through the cache key.INSTA_*set outside the Rust file and more than 20,000.snapfiles are not seen; both keep today's grade.Local proof
cargo xtask precommit,check-evidence-promotion-honesty,cargo test -p ripr --test snapshot_field_admission,rust_snapshot_filesunit tests. Rebased onto currentmain(2026-11-02).🤖 Generated with Claude Code
https://claude.ai/code/session_01SvmPmmPpe4nSBxbAHAKU6X
Governing issue or accepted claim: #12189
Acceptance delta (one sentence): A Rust return seam is no longer
strongly_grippedfrom a file-backed insta snapshot whose committed.snapfile is certainly missing.What changed
analysis/rust_snapshot_files.rs: lists.snapfiles under the workspace root (skipping.git,target,node_modules,.ripr), with tracked state from the existingtracked_snapshot_files. An untracked.snapis not one CI sees (typescript: committed-snapshot credit (RIPR-SPEC-0258) misses configs passed by path and reads untracked .snap files #7708), and a committed-history overlay that records a differing snapshot input reads as unknown.oracle_discriminates_seam_in_testrejects aSnapshotoracle only when the shape is the plain single file-backed insta assertion (unnamed, or one string-literal name on a macro whose first argument is a name), the test file has nosnapshot_path/glob!/INSTA_text, the test is not case-driven, and no listed.snapstem matches the test's name (lenient on module prefix,-Ncounter and@suffix). Everything else, includingassert_binary_snapshot!, keeps today's grade.CACHE_SCHEMA_VERSION1.138 and sharded/compact 0.140 (rebased onto current main's 1.137 / 0.139), with theboundary_gap/.../unchanged-after-attempthashes re-chained, the corpus currentness constants andOUTPUT_SCHEMA.mdupdated.snapshot_field_admission.rs(missing demotes, present keeps credit, add/remove moves the cached grade, untracked-only does not credit, committed binary snapshot keeps credit, unresolvable shapes unchanged). Theseam_inventorystrength-policy test now commits its expected file.rust_field_snapshot_missing_expected_not_promotedand regenerated its report.Known limits
.snapsaves; verdicts are still correct through the cache key.INSTA_*set outside the Rust file and more than 20,000.snapfiles are not seen; both keep today's grade.Local proof
Rebased onto
origin/mainat 9896777 (#12496).cargo xtask precommitpasses policy/format/clippy gates;goldens check(triggered byOUTPUT_SCHEMA.md) reports drift on unrelatedowner_return_pin_json_*fixtures in this cloud environment (gap_evidence_unresolved/ fixture Cargo resolution), same as on cleanmainwhen goldens are forced — hosted CI owns that matrix.check-evidence-promotion-honestypass;cargo test -p ripr --test snapshot_field_admissionpass (12/12).Rebase finisher (2026-11-02)
main; duplicate merge commits dropped/skipped.RepoFileFactCacheKey::file_path()dropped during cache conflict resolution (Windows: cache export test fails with "workspace inputs changed during export" #12421 on main).test_stub.rsarity fix (already on base).b9155551940526dce72a0bee97a8f33bfb348803