Skip to content

perf(evidence): pass-scoped filesystem currentness with terminal recapture (#4292) - #12451

Open
EffortlessSteven wants to merge 3 commits into
mainfrom
cursor/filesystem-freshness-pass-4292-06ef
Open

EffortlessSteven wants to merge 3 commits into
mainfrom
cursor/filesystem-freshness-pass-4292-06ef

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #4292

Acceptance delta (one sentence): Test-target authority captures each distinct admitted path once per evidence pass, recaptures at publication with pass-level finalize (buffered review windows), withdraws target-dependent repair facts on stale generation, and emits evidence_filesystem_currentness with granularity=pass_capture_terminal.

Summary

Cold repo-exposure-json evidence spent most remaining per-pair time in repeated filesystem_fingerprint stat walks inside validates_target_digest. This change wires EvidencePass to a pass-scoped capture shared across seam×test pairs, then revalidates the same path set before results leave the pass.

Proof

  • cargo xtask precommit (local)
  • cargo test -p ripr --lib pass_terminal_generation_rejects_mid_pass_manifest_insert
  • cargo test -p ripr --lib production_target_evidence_rejects_authority_failures
  • cargo test -p ripr --lib evidence_pass_output_is_identical_on_one_and_many_threads

Claim boundary

Proves pass-scoped filesystem freshness with terminal recapture and latency receipt naming; does not claim hosted repo-exposure self-replay byte identity at 2,500/10,000 seams (needs PR CI / manual replay).

Closes #4292

Open in Web Open in Cursor 

Devin Review

@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!

@coderabbitai

coderabbitai Bot commented Nov 2, 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 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 150 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: 77bd76cf-299d-4f4b-bb10-6b5372587e34
Commits

Reviewing files that changed from the base of the PR and between e39c88f and 92c6001.

Files selected for processing: 5
  • crates/ripr/src/analysis/facts/mod.rs
  • crates/ripr/src/analysis/facts/model.rs
  • crates/ripr/src/analysis/seam_inventory.rs
  • crates/ripr/src/analysis/test_grip_evidence.rs
  • crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@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 3 potential issues.

Devin Review

Comment thread crates/ripr/src/analysis/facts/model.rs Resolved
@cursor

cursor Bot commented Nov 2, 2026

Copy link
Copy Markdown

CI on 223147129d failed Admit PR Candidate because three Devin review threads were unresolved (not a code defect in the first push).

Follow-up 00d26a2d6d addresses all three findings (pass-level finalize before observe, withdraw target-bearing repair facts, shared terminal sweep cache). All three threads now have replies and are resolved.

Action needed: remove and re-add merge-ready so qualification runs on 00d26a2d6d (label-on-push alone does not re-request Rust Small). After Admit PR Candidate and Ripr Rust Small Result are green on that head, comment merge-ready @ 00d26a2d6d2b77ddd367859de91318eb3761cfb8.

@cursor

cursor Bot commented Nov 2, 2026

Copy link
Copy Markdown

CI on 00d26a2d6d failed Rust gates at User-text goldens judged by the merge-base matcher (and downstream Ripr Rust Small Result), not at the #4292 evidence logic itself.

Follow-up 8f3123067f: merged current origin/main into the branch and fixed the merge fallout (rust_test_stub(..., package_root) at app/test_stub.rs:1160, same gap as on main at 478de421de).

Action: remove and re-add merge-ready so qualification runs on 8f3123067f. If the merge-base user-text step still fails, it is likely because HEAD^1 builds xtask from main where that rust_test_stub call site is still 3-arg; the branch contains the fix but the step compiles the base tree, not the PR head.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Triage: inherited E0061 (rust_test_stub 4-arg) across gates/feature/paste/kani/ranking — your diff already carries the 4-arg call, but the merge ref still compiles the stale 3-arg site. Rebase onto current fixed main (refresh the merge ref) and re-run; no product change needed.

@cursor
cursor Bot force-pushed the cursor/filesystem-freshness-pass-4292-06ef branch from 8f31230 to c005b2a Compare November 2, 2026 07:33
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

merge-ready is set, but no qualification run exists for head c005b2a6: it was pushed after the label was applied, or the label event was dropped. Remove and re-apply merge-ready to request it again.

@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 c005b2a6), 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.

cursoragent and others added 2 commits November 2, 2026 15:33
…pture (#4292)

EvidencePass captures each distinct admitted test/seam path once per pass,
shares ancestor stat walks across pairs, and recaptures metadata before
publication. Stale generation strips test targets and emits a latency receipt
naming pass_capture_terminal granularity.

Closes #4292

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Move terminal currentness out of per-window evidence_for, buffer review
windows until pass-level recapture succeeds, withdraw target-dependent
repair facts on stale generation, and share ancestor stats during terminal
sweep.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/filesystem-freshness-pass-4292-06ef branch from c005b2a to 6787885 Compare November 2, 2026 15:52
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 6787885e), 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.

…ass: keep pass_filesystem and #11524 warm-failure fields)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

merge-ready is set, but no qualification run exists for head 92c60012: it was pushed after the label was applied, or the label event was dropped. Remove and re-apply merge-ready to request it again.

@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

Source review of head 92c6001 (full diff read against main e39c88f, conflict resolution included). Not compiled locally; hosted proof not yet established for this head.

Inspected: EvidencePassFilesystemCurrentness (one stat walk per distinct admitted path, first fingerprint wins, terminal recapture compares every tracked path), validates_target_digest_with_pass (old entry point delegates with None, so other callers are unchanged), CompactGripContext::try_new_with_pass_filesystem (try_new now cfg(test); the only EvidencePass::new callers, including main's warm_entrypoint tests, do not call try_new), finalize_filesystem_currentness at every publication boundary in seam_inventory.rs (streamed path errors out; scoped paths withdraw target-bearing evidence), and the buffered-window restructure that defers classification until after the terminal check (ordinal and identity checks preserved). Test pass_terminal_generation_rejects_mid_pass_manifest_insert covers a mid-pass manifest insert. Conflict resolution (test_grip_evidence.rs): EvidencePass gained pass_filesystem here and warm_failed, incomplete_files and test-only inject_warm_panic from main's #11524; the fields are independent, so both are kept, and main's early return on warm_failed precedes any use of pass state.

Findings: none blocking. Residual: failure direction is conservative; full-suite behavior is established only by hosted CI.


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

Source review of head 92c6001 (full diff read against main e39c88f, conflict resolution included). Not compiled locally; hosted proof not yet established for this head.

Inspected: EvidencePassFilesystemCurrentness (one stat walk per distinct admitted path, first fingerprint wins, terminal recapture compares every tracked path), validates_target_digest_with_pass (old entry point delegates with None), CompactGripContext::try_new_with_pass_filesystem (try_new now cfg(test); EvidencePass::new callers, including main's warm_entrypoint tests, do not call try_new), finalize_filesystem_currentness at every publication boundary in seam_inventory.rs (streamed path errors out; scoped paths withdraw target-bearing evidence), and the buffered-window restructure deferring classification until after the terminal check (ordinal and identity checks preserved). Test pass_terminal_generation_rejects_mid_pass_manifest_insert covers a mid-pass manifest insert. Conflict resolution (test_grip_evidence.rs): EvidencePass gained pass_filesystem here and warm_failed, incomplete_files and test-only inject_warm_panic from main's #11524; fields are independent, both kept, and main's early return on warm_failed precedes any use of pass state.

Findings: none blocking. Residual: failure direction is conservative; full-suite behavior is established only by hosted CI.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Burn-down helper: NOT merging (head 92c6001), merge-ready removed. My earlier source-only REVIEW_READY on this head was wrong about behavior: hosted tests fail. Shards: output::evidence_record::tests::inline_cfg_test_library_offers_a_repair_start_only_with_one_governed_module ("two: fixture must recommend src/lib.rs, got not_applicable"), and in the Rust-only feature lane analysis::facts::proptest_tests::registered_property_reuse_revokes_configuration_and_provider_authority and ..._matches_reconstructed_and_incremental_indexes (classified predicate differs after restored reuse), analysis::new_test_target::integration_tests::existing_related_integration_test_is_preferred, and analysis::test_grip_evidence::tests::evidence_pass_output_is_identical_on_one_and_many_threads. These point at the pass-scoped fingerprint capture (EvidencePassFilesystemCurrentness: first fingerprint per path wins and the shared ObservedEntries) withholding or changing target-bearing evidence when fixtures mutate between passes or threads. Needs a Rust build to debug; not a golden to re-bless.


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.

Bounded source review — 2026-11-05 UTC

  • reviewed_head_sha: 92c6001277d252c2cdc0165071208ab2c53b6e7f.
  • integration_basis: metadata base e39c88fc16f70ad73d5aabef623b42da79400c78; immutable candidate and authored source delta reviewed. No new composed integration execution.
  • claim_boundary: perf(evidence): pass-scoped filesystem currentness with terminal recapture (#4292)
  • changed_surfaces_and_semantic_owners_inspected: Read entire production patch: pass fingerprint memo, actual target authority, terminal sweep and all evidence-pass callers, buffered review windows, first/rest stages and withdrawal of target/missing-discriminator/new-test facts. Prior three findings fixed in current source; terminal sweep shares directory observation cache. Source review does not establish2500/10000seam byte identity or performance receipt. Potential buffering resource cost remains measurement requirement, not asserted defect.
  • blocking_findings: No additional inline finding in this pass; existing source, validation, integration and owner holds described above retain their disposition.
  • non_blocking_suggestions: None added.
  • refuted_or_stale_findings: Current repairs and previous refutations described above preserved; no duplicate thread added.
  • proof_and_ci_observed: Immutable source/diff and live claim/conversation/thread inventory inspected. No full cargo build, hosted qualification or CI request. Older native/hosted receipts remain attributed reports.
  • proof_or_review_missing: Actual current-head hosted logs/checkout binding and final integration proof not independently re-audited. Review is source-bounded; generated data matrices and all historical artifacts not exhaustive.
  • affected_currentness_dimensions: Current head/base/open state checked before publication; historical receipts remain bound to their original subjects and scope.
  • residual_assumptions_and_non_claims: This COMMENT review preserves Draft and release/activation/owner holds and does not establish final integration qualification or merge readiness.
  • disposition: REVIEW_INCOMPLETE; no new finding; replay/performance qualification outstanding

EffortlessSteven commented Nov 6, 2026 •

Copy link
Copy Markdown
Member Author

On head 92c6001277d252c2cdc0165071208ab2c53b6e7f, a focused Linux/Rust 1.95 control using the candidate's unmodified EvidencePassFilesystemCurrentness and fingerprint functions returned true for an unchanged workspace, but false after creating an unrelated sibling of the workspace root. The source file and manifests were unchanged. Separate controls returned false after a source edit and after a nearer Cargo.toml was added. This reproduces false withdrawal at the fingerprint layer; it does not by itself establish the cause of each hosted failure.

The comparison carries the ctime of ancestors above the workspace root through resolves_to_itself / append_entry_fingerprint, so unrelated changes to a shared parent can invalidate a whole evidence pass. Any repair needs to preserve source and manifest stale detection, path identity and concurrent first-capture behavior.

Integration overlap for coordination: this PR changes EvidencePass::new, evidence_for_seams, classify_evidence_windows and classify_scoped_seams[_streamed]. Current main 1617ca195ecf5a373f4957fa6cf29cf722ca65e9 includes #13451's evidence_for_seams_reporting_failure, EvidencePass::warm_failed and pass-wide producer-failure custody. The immediate fingerprint issue is in EvidencePassFilesystemCurrentness, filesystem_fingerprint and ObservedEntries in facts/model.rs. No source repair or CI request has been made in this investigation.

An automatic merge-tree inspection against that main produced tree a57d18df2e0127b815d22a758eab37214fb25bc3 without textual conflicts, but found a material semantic conflict: evidence_for_seams_reporting_failure constructs an EvidencePass and calls evidence_for without finalize_filesystem_currentness. seam_inventory.rs calls this path when classifying and caching evidence, so the combined tree can publish pass-memoized target facts without terminal recapture. This is a source inspection finding, not an executed combined-tree reproduction. The integration must preserve both terminal freshness and #13340's transient producer-failure cache custody.

Focused follow-up on exact head 92c6001277d252c2cdc0165071208ab2c53b6e7f, Linux x86_64, Rust 1.95.0, default features: the named inline-library, thread-equivalence and integration-target tests each passed individually (one test each). Both registered-property tests also passed individually with the fixture's locked dependencies fetched into an isolated Cargo home; their assertions were exercised. The first property invocation before that fetch skipped its assertions and is not a pass for that behavior. These isolated passes do not overturn the prior hosted parallel failures. No modified candidate, combined-tree test, performance replay or fresh hosted qualification has run.

@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.

VERDICT: BLOCK 92c6001 — required hosted CI is red at this head, and the diverging values are exactly this patch's withdraw_target_bearing_evidence transform.

Reviewed head 92c6001277d252c2cdc0165071208ab2c53b6e7f (tree parent 1 6787885ed4, main parent e39c88fc16). The earlier REVIEW_READY on this head (2026-11-04T00:55:40Z) recorded "hosted proof not yet established"; the hosted run started one minute later and failed.

Blocking findings

1. Ripr Rust Small Result fails at this head, and the failures are the withdrawal path

Run 41750547208 (head_sha 92c6001277…, pull_request, 2026-11-04T00:56:44Z) failed shards 1–4, "Rust test shards verify", and the result job. Rust-only feature lane (run 41750547212) failed at the same head.

  • Shard 3 — analysis::seam_inventory::tests::bound_seams_inventory_persisted_entry_never_serves_a_different_state panics at seam_inventory.rs:10076 (assert_eq!(scoped_projection(&damaged)?, baseline)). The observed diff is precisely withdraw_target_bearing_evidence: the recomputed run has "test_target":null and no new_test_target, while the baseline has a full target ("provenance":"rust_index_function", "currentness":"current") and "new_test_target":{"blocker":"no_test_module"}.
  • Shard 1 — classified_cache_cargo_home_fallback_and_relative_home_match_cold panics at crates/ripr/tests/cache_clear_safety.rs:262 on assert_eq!(left, right) over the classified JSON arrays: the cold and warm/recomputed projections differ.
  • Shard 4 — output::render::tests::repo_badge_actionable_count_agrees_with_repo_exposure_on_the_same_tree panics at output/render.rs:1306 on "fixture must produce at least one actionable canonical gap with a complete repair route on the exposure path": the actionable gap that the fixture is built to contain is gone.
  • Shard 2 — output::evidence_record::tests::inline_cfg_test_library_offers_a_repair_start_only_with_one_governed_module fails in the same shard set.

The predicate violated is same-tree determinism: for one unchanged tree, cold, warm, persisted and recomputed runs must agree on evidence and on actionable counts (#9899's "a persisted entry … never serves a different state"). Here the terminal recapture reports stale_generation in runs whose only writes are the tool's own cache/receipt artifacts, so one path withdraws target-bearing evidence and another does not. Because finalize_filesystem_currentness also gates evidence_for_seams and both scoped paths, this is not confined to the repo-exposure route.

This must be fixed by making the recapture ignore the run's own artifact writes (or by bounding what counts as an admitted path), or by making withdrawal deterministic across cold/warm/persisted paths — not by relaxing the four assertions.

2. The window bound no longer bounds evidence memory

classify_evidence_windows now pushes every window's owned seams and evidence into pending: Vec<PendingWindow> and classifies only after the terminal check. ScopedEvidenceConsumer is documented as "a bounded consumer of classified windows" with DEFAULT_REVIEW_EVIDENCE_WINDOW = 32 / MAX_REVIEW_EVIDENCE_WINDOW = 256, and pass.clear_window_memos() per window is what kept peak memory proportional to the window. Buffering all windows makes peak memory proportional to the whole evaluated seam scope (evidence carries observed_values text), which is the shape of the #12940 large-workspace OOM. The retained_{} receipt still reports only consumer.retained_payloads(), so it would not show the growth. This is reasoned from the code, not measured; if you keep the design, the window contract and its receipt need to change with it.

Not checked

No local build or test run (read-only review). I did not isolate which tracked path changes under the run's own writes; that is the first thing to instrument. I did not request a re-run, so the head's check state is as of run 41750547208.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Disposition: repair needed. Head 92c60012. The source-attestation verifier refuses this head, so there is no current-head ready carrier. Owner: coding ripr-swarm; it needs an exact-head review carrier before any qualification request.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Evidence-only sweep triage: this PR currently conflicts with main (merge state CONFLICTING, stale since mid-November). An evidence-only head-exact review at the current head would be wasted work — the head must change to resolve the conflict, which invalidates any review posted now. Please rebase onto current origin/main and push; the evidence review lane will pick the refreshed head up from the sweep queue automatically. No defect is asserted — this is a landing-order state, not a code finding.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Coordination note (evidence-only reviewer): this branch is now conflicted with main (mergeable=CONFLICTING at sweep time; main is at 41cf0228b9). Any review markers on this PR were scoped to their exact heads and stay valid only as evidence for those trees. A rebase/restack restarts review: push the rebased head (my push watch picks it up) and the native-Windows evidence lane will re-run at the new head before a fresh marker posts. No action needed from me in the meantime; no defect is asserted — this is a landing-order state, not a code finding.

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.

perf(evidence): per-pair filesystem freshness stat walk in test-target validation

2 participants