Skip to content

fix(rust): file-backed insta snapshot without a committed .snap cannot close a return seam - #12246

Merged
EffortlessSteven merged 17 commits into
mainfrom
claude/project-thread-2e0m6z
Nov 3, 2026
Merged

EffortlessSteven merged 17 commits into
mainfrom
claude/project-thread-2e0m6z

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #12189
Acceptance delta (one sentence): A Rust return seam is no longer strongly_gripped from a file-backed insta snapshot whose committed .snap file is certainly missing.

What changed

  • New analysis/rust_snapshot_files.rs: lists .snap files under the workspace root (skipping .git, target, node_modules, .ripr), with tracked state from the existing tracked_snapshot_files. An untracked .snap is 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_test rejects a Snapshot oracle 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 no snapshot_path/glob!/INSTA_ text, the test is not case-driven, and no listed .snap stem matches the test's name (lenient on module prefix, -N counter and @suffix). Everything else, including assert_binary_snapshot!, keeps today's grade.
  • The listing's identity (paths and tracked state, not content) feeds the analysis cache key, ahead of the Cargo identity so its unavailable-marker stays the key suffix.
  • CACHE_SCHEMA_VERSION 1.137 and sharded/compact 0.139 (rebased onto main's 1.136 / 0.138), with the boundary_gap/.../unchanged-after-attempt hashes re-chained, the corpus currentness constants and OUTPUT_SCHEMA.md updated.
  • Tests: resolver unit tests, integration tests in 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). The seam_inventory strength-policy test now commits its expected file.
  • Pinned the corrected class on rust_field_snapshot_missing_expected_not_promoted and regenerated its report.

Known limits

  • LSP refresh scheduling does not watch .snap saves; verdicts are still correct through the cache key.
  • INSTA_* set outside the Rust file and more than 20,000 .snap files 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_files unit tests. Rebased onto current main (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_gripped from a file-backed insta snapshot whose committed .snap file is certainly missing.

What changed

  • New analysis/rust_snapshot_files.rs: lists .snap files under the workspace root (skipping .git, target, node_modules, .ripr), with tracked state from the existing tracked_snapshot_files. An untracked .snap is 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_test rejects a Snapshot oracle 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 no snapshot_path/glob!/INSTA_ text, the test is not case-driven, and no listed .snap stem matches the test's name (lenient on module prefix, -N counter and @suffix). Everything else, including assert_binary_snapshot!, keeps today's grade.
  • The listing's identity (paths and tracked state, not content) feeds the analysis cache key, ahead of the Cargo identity so its unavailable-marker stays the key suffix.
  • CACHE_SCHEMA_VERSION 1.138 and sharded/compact 0.140 (rebased onto current main's 1.137 / 0.139), with the boundary_gap/.../unchanged-after-attempt hashes re-chained, the corpus currentness constants and OUTPUT_SCHEMA.md updated.
  • Tests: resolver unit tests, integration tests in 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). The seam_inventory strength-policy test now commits its expected file.
  • Pinned the corrected class on rust_field_snapshot_missing_expected_not_promoted and regenerated its report.

Known limits

  • LSP refresh scheduling does not watch .snap saves; verdicts are still correct through the cache key.
  • INSTA_* set outside the Rust file and more than 20,000 .snap files are not seen; both keep today's grade.

Local proof

Rebased onto origin/main at 9896777 (#12496). cargo xtask precommit passes policy/format/clippy gates; goldens check (triggered by OUTPUT_SCHEMA.md) reports drift on unrelated owner_return_pin_json_* fixtures in this cloud environment (gap_evidence_unresolved / fixture Cargo resolution), same as on clean main when goldens are forced — hosted CI owns that matrix. check-evidence-promotion-honesty pass; cargo test -p ripr --test snapshot_field_admission pass (12/12).

Rebase finisher (2026-11-02)

Open in Web Open in Cursor 

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven self-assigned this Nov 1, 2026
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 148 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 52a3e875-7d17-4eb2-8c7b-cf2138033016
Commits

Reviewing files that changed from the base of the PR and between 796315c and db8ebb4.

Files selected for processing: 24
  • .ripr/traceability.d/12189-rust-file-backed-snapshot-missing.toml
  • changelog.d/12189-rust-file-backed-snapshot-missing.md
  • crates/ripr/src/analysis/committed_source.rs
  • crates/ripr/src/analysis/facts/index.rs
  • crates/ripr/src/analysis/mod.rs
  • crates/ripr/src/analysis/rust_snapshot_files.rs
  • crates/ripr/src/analysis/rust_snapshot_files/tests.rs
  • crates/ripr/src/analysis/seam_cache.rs
  • crates/ripr/src/analysis/seam_inventory.rs
  • crates/ripr/src/analysis/test_grip_evidence.rs
  • crates/ripr/tests/lsp_lifecycle/gap_corpus_currentness.rs
  • crates/ripr/tests/snapshot_field_admission.rs
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0094-observation-unverified-guard-generalization.md
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/after.repo-exposure.json
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/agent-receipt.json
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/agent-verify.json
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/before.repo-exposure.json
  • fixtures/evidence-promotion-honesty-corpus/corpus.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-field-snapshot-missing-expected.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-adapter-fed-error.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-identical-inline-arms.json
  • policy/process_allowlist.d/12189-rust-file-backed-snapshot.txt
  • xtask/src/tests/rust_corpus_projection.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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 without insta in 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 => ..}) and prepend_module_to_snapshot shapes grade reachable_unrevealed on both base and head, so they are not changed by this PR. The @suffix stem handling is not reached by an observable case today; the resolver unit test covers it, which is fine.
  • INSTA_UPDATE/INSTA_FORCE_PASS set in .cargo/config.toml or insta.yaml (not in the Rust file) is not seen. With a missing .snap and INSTA_UPDATE=always the assertion still fails without INSTA_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 to workspace_manifests_hash with tracked/untracked/unlisted per path, so adding, removing or git add-ing a .snap moves the key. The integration test adding_and_removing_the_expected_file_moves_the_cached_return_grade exercises 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_differs makes the listing unknown when 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 mechanism test_grip_evidence.rs already 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 adds expected_repo_seam_grip for src/lib.rs::make_record record as weakly_gripped / reach yes, and the regenerated report matches it (seams 2, weakly 2, strongly 0, static_limitation with missing_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_VERSION bump are still due just before merge; a delta review of that head will follow. Ripr Rust Small Result must be green on the merged head before any merge; I did not check this head's CI.

Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 1, 2026 20:24
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 4 potential issues.

Devin Review

Comment thread crates/ripr/src/analysis/seam_cache.rs Resolved

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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_VERSION 1.133 to 1.134, sharded and compact 0.137 to 0.138. origin/main is 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 the raw_json_placeholder_v1 rule (SHA-256 of the file text with the artifact content_sha256 replaced by the zero placeholder). Both repo-exposure files give 0ccefd0c…58ff, matching the stored value. The whole-file SHA-256 of those two is ef098de9…512e, matching the two agent-receipt.json entries. agent-verify.json hashes to 42825855…7f67, matching the receipt's verify_artifact, and its before/after content hashes match. No remaining reference to the old 5001b340…, 588aac86… or 63737b4a… values in the tree.
  • 1.134 also appears in docs/OUTPUT_SCHEMA.md (two places), gap_corpus_currentness.rs and xtask/src/tests/rust_corpus_projection.rs; no 1.133 is left outside the changelog and history comments.
  • Traceability fragment .ripr/traceability.d/12189-…toml registers 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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 1eaba508), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.137 history 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

@EffortlessSteven

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member Author

Owner reply on the ranking failure (run 41352735017, head 2cf4d92): it is not caused by this change. I diffed every field of pilot-ranking.json from that run against the one from a manual dispatch on unmodified main (run 41349665496, f7d4d71). There are zero differences, so this PR moves no picks; both read 39.0 -> 38.0. The lost pick is rust-hex encode_upper (main regression, tracked and being bisected in #12262, which has the fix of record). No baseline change here. I will merge main and re-run once that fix is on main. The stale merge-ready conflict status referred to the pre-merge head and is cleared by the current head.


Generated by Claude Code

@EffortlessSteven

Copy link
Copy Markdown
Member Author

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.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 2cf4d92a), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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) and content_sha256. The seams, grips and related tests are main's, and the digest verifies under raw_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_sha256 stamps verify. The unchanged-after-attempt chain 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-honesty passes 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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 .snap entries, 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.

Copy link
Copy Markdown
Member Author

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 SnapshotListingCell (rust_snapshot_files.rs:242) and the cache key calls SnapshotListing::read (seam_cache.rs:1792). The module doc saying the listing is "shared" with the key overstates it. A .snap file added or removed in the milliseconds between the two reads could store a verdict under a key from the other listing.

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

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 21d0535a), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member Author

Delta review of record: head db8ebb401e99deffa48c9ec06fc576e28c61b97c over b7a8d489

Verdict: REVIEW_READY (no blocking findings). One reviewer, angles read inline.

Compared against main (796315c, #12670), not only the prior head

  • The head's first parents are b7a8d489 and 796315cf, so main is fully merged. Main's seam_cache.rs history is kept, and this PR appears only as 1.144 / 0.146 on top of main's 1.143 / 0.145.
  • Per-line comparison of the PR's own diff before (b7a8d489 against its old main 0c0d14dd) and now (db8ebb40 against 796315cf): after removing version strings and sha256 lines, the two diffs are identical. No source change since b7a8d489.
  • Version moves are consistent: CACHE_SCHEMA_VERSION 1.144, sharded and compact 0.146, the matching assertions in seam_cache.rs, CURRENT_CORPUS_CACHE_SCHEMA_VERSION, and the OUTPUT_SCHEMA.md pins.
  • File facts stay at 1.55. Main has FILE_FACT_CACHE_SCHEMA_VERSION = "1.55", this PR leaves that constant alone, and the new snapshot listing feeds the analysis key rather than the per-file facts. The RustIndex field is not serialized. Keeping 1.55 is right.
  • Digests were re-stamped on the corpus reports, the adapter-fed-error report (main's text, re-versioned) and the unchanged-after-attempt chain. The before and after content hashes in that chain are internally consistent.

Checks I ran on this head

  • cargo xtask check-evidence-promotion-honesty: pass.
  • cargo test -p ripr --lib seam_cache: 219 passed, 0 failed.
  • I did not re-run the full goldens check or the gap_corpus_currentness integration test; I'm relying on the owner's report for those and on hosted CI.

Resolution: no repair required. Ripr Rust Small Result has to be green on this exact head before the owner merges. If #12246 loses the race to another version bump, the next re-bump needs another delta review.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member Author

Response to the advisory review of db8ebb4 ("a non-insta assert_*snapshot! imported through a glob that also matches a local macro"):

The same-file case is already refused: imports_from_insta returns false when the test file contains macro_rules! <name> (rust_snapshot_files.rs:342), glob or named import alike. The case that remains is a #[macro_use] macro of that name defined in a different file, which textual scope would prefer over the use insta… import. That is real but narrow (a crate-local macro with an insta macro's name, a redundant use insta… import in the same test file, and no committed .snap), and it fails toward a false weak grade rather than over-credit. A fix has to scan the workspace file universe, which touches the read-trace and cache contract, so it would change the reviewed head and restart qualification for a corner case. Filed as #12720 with acceptance and a test shape; not changing #12246.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 99454b6 into main Nov 3, 2026
73 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-2e0m6z branch November 3, 2026 00:15
EffortlessSteven pushed a commit that referenced this pull request Nov 3, 2026
… / 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
EffortlessSteven pushed a commit that referenced this pull request Nov 3, 2026
#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants