Repository navigation
ux(check): expose bounded cache reuse in verbose diff output (Advances #4975) - #12933
Conversation
…4975) Carrier for #12566 (head c01723a), resolved against main b80ce95/0244de7d: repo.rs hunk follows the fn move from #12497; blocked-store test blocks the repo-file-facts layer dir so it no longer pins a file-fact schema version. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
|
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 4 minutes. View limit details
Summary by CodeRabbit
WalkthroughRust file-fact cache statistics now flow through check output. Verbose mode reports cache activity and bounded store-failure details on stderr and in JSON. Default JSON remains unchanged. ChangesRust file-fact cache reporting
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant RustIndexBuilder
participant CheckOutput
participant VerboseCheck
participant JSONRenderer
RustIndexBuilder->>CheckOutput: provide optional cache statistics
CheckOutput->>VerboseCheck: supply cache statistics
VerboseCheck->>VerboseCheck: render cache summary and failure details
CheckOutput->>JSONRenderer: supply cache statistics
JSONRenderer->>JSONRenderer: append fields in verbose mode
Possibly related PRs
Merge Risk:
|
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Confirmed findings
- A store error can occur without making did_work true, suppressing the verbose JSON receipt while leaving store_errors hidden.
- Store-failure rows are capped during merge, but merge_from discards rows beyond the cap without incrementing store_failures_dropped.
Verification questions
- Confirm unit tests cover receipt fields, but no focused test proves merge_from preserves the global failure-row cap when merging multiple capped snapshots.
- Confirm both Rust producer routes always assign Some(cached.file_fact_cache), making the documented not_observed limitation appear unreachable for ordinary Rust checks.
- Confirm the verbose projection omits file_fact_cache entirely when no Rust cache work was observed, but its documented limitation states the field is null.
- Confirm the blocked-store fixture verifies failure telemetry but does not assert the bounded failure-row cap or dropped-row accounting.
- Confirm verbose JSON always appends file_fact_cache and file_fact_cache_limitation, while the schema describes file_fact_cache as verbose-only but does not require the limitation whenever file_fact_cache is null.
- Confirm the integration test exercises new behavior but does not pin a red/green result against the base revision.
Evidence gaps
- The failed ripr sensor and absent cargo-test receipt prevent completion-level verification of this Rust behavior change.
- The hosted Rust test proof was requested but no completion receipt is present, while the ripr sensor failed with exit code 2.
- The required Rust compile and focused integration-test evidence is absent because cargo-test was only scheduled and ripr failed.
- Model proof intent was rejected by deterministic validation.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REPAIR_REQUIRED — head 53ea793
Review against current main, built and executed here on a trial merge.
Defect, with a one-line repair. crates/ripr/src/app/check.rs:551 reads output.file_fact_cache = consumed_sources.file_fact_cache.take();. consumed_sources is the value returned from this function (line 564) and the LSP snapshot keeps it. take() empties its file_fact_cache, so after this change every consumer of snapshot.rust_consumed_sources.file_fact_cache reads None. Two existing lib tests fail on this head for that reason:
lsp::tests::consumed_source_tests::actual_saved_producer_commits_raw_bytes_on_cold_and_warm_cache_pathsreturnsSETUP: cold run produced no file_fact_cache stats(the same run printedrust file facts: 0 reused, 1 recomputed, 1 stored, so the stats existed before line 551).lsp::tests::consumed_source_tests::clean_open_rust_file_is_indexed_without_seeding_findingsreturnsclean open file did not exercise cold and warm fact-cache loads.
Repair: copy the stats instead of removing them, consumed_sources.file_fact_cache.clone(), so the carrier keeps its stats for the LSP snapshot and the check output gets its own copy. Then re-run cargo test --lib -p ripr.
What I checked and found sound:
- The three advisory leads from the automated review do not hold. A store error alone still sets
did_work()(it includesstore_errors > 0).merge_fromcounts every capped row instore_failures_dropped, so retained rows plus dropped equal errors. With no observed cache work the verbose JSON emits"file_fact_cache": nullplusfile_fact_cache_limitation: "not_observed", matching OUTPUT_SCHEMA.md. - Non-blocking follow-up: no unit test exercises
merge_fromover several capped snapshots. - Executed on this head:
cargo fmt --check -p riprexit 0;cargo test -p ripr --test check_file_fact_cache_verbose2 passed;cargo xtask check-output-contractspass;cargo xtask goldens checkpass;cargo clippy -p ripr --lib --tests -- -D warningsexit 0;cargo test --lib -p ripr18136 passed and the 2 above failed.
Not run: the hosted Ripr Rust Small Result, lsp_lifecycle and fixtures. No cache-schema bump is involved.
Generated by Claude Code
…ying the consumed-sources carrier Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — head c6bf768
Delta review against my earlier review at 53ea793, plus the PR against main (41 files, merge-base diff). The PR has no review threads. The earlier repair request is satisfied.
- The repair.
app/check.rsnow readsoutput.file_fact_cache = consumed_sources.file_fact_cache.clone();with the unneededmutdropped onconsumed_sources. That is the whole delta from 53ea793 (git diff 53ea7932..c6bf7682touches only those two lines). The returned carrier keeps its stats for the LSP snapshot, and the check output gets its own copy. - Tests that exposed it now hold.
cargo test --lib -p ripron this head: 18138 passed, 0 failed, 1 ignored. That includeslsp::tests::consumed_source_tests::actual_saved_producer_commits_raw_bytes_on_cold_and_warm_cache_pathsandclean_open_rust_file_is_indexed_without_seeding_findings. - Also on this head:
cargo fmt --check -p riprexit 0 andcargo clippy -p ripr --lib --tests -- -D warningsexit 0. - Carried from the earlier pass at 53ea793, unaffected by the two-line delta: the verbose integration test (2 passed),
check-output-contractsandgoldens checkpass; the default JSON is unchanged and the verbose receipt,merge_fromanddid_worklogic read correct.
Non-blocking follow-up: no unit test covers merge_from over several capped snapshots.
Not run on this head: the integration test, output-contracts and goldens (carried from the earlier head), and the hosted Ripr Rust Small Result. No cache-schema bump is involved.
Generated by Claude Code
|
|
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm verbose JSON can emit a null file_fact_cache with a limitation, but the schema does not require that limitation whenever the receipt is null.
- Confirm the integration test verifies one store failure, but does not exercise multiple capped snapshots or assert the global failure-row cap and dropped-row accounting.
- Confirm the bounded store-failure-row contract is not proved red/green: the blocked-store test checks only store_errors and one stderr phrase, while merge_from and the receipt define capped rows and dropped-row accounting.
- Confirm the documented null-limitation states are not exercised by the added test suite: no route-level test distinguishes None/not_observed from Some(zero_work)/zero_work.
- Confirm the merge helper preserves the global store-failure row cap and accounts for dropped rows across successive snapshots.
- Confirm the schema describes file_fact_cache_limitation as the reason a null cache receipt is present, but its independent definition does not require the pair relationship enforced by the renderer.
- Confirm the integration test covers cold/warm cache telemetry, default JSON omission, and blocked-store disclosure, but does not exercise the bounded failure-row cap or dropped-row accounting.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- The packet reports ripr sensor failure and an absent cargo-test receipt; prior seeded evidence is positive but is not a current-head receipt.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — head 51e653f
Review of the main-merge head against my earlier clearance at c6bf768. The PR has no review threads. The PR diff against main is 42 files.
- Conflict resolution in
analysis/language/rust/mod.rs. Main'strace_latency_phase("diff_main_index", …)call is kept, and the carrier's unconditionalrust_consumed_sources.file_fact_cache = Some(cached.file_fact_cache.clone());follows it, which is what the carrier intends once the#[cfg(test)]guard is dropped. - Unchanged from the cleared head.
merge_frominseam_cache.rsis byte-identical to the version I reviewed (each capped row is counted instore_failures_dropped, so rows plus dropped equal errors), andapp/check.rs,output/check_file_fact_cache.rsandanalysis/consumed_source.rshave no difference from c6bf768, so the.clone()repair is intact. I also searched the merged tree for tests that expectfile_fact_cacheto be absent outsidecfg(test): none; the remaining references are the facts-builder stats tests on a different field. - Executed on this head:
cargo fmt --check -p riprexit 0;cargo clippy -p ripr --lib --tests -- -D warningsexit 0;cargo test --lib -p ripr18207 passed, 0 failed, 1 ignored (the two LSP consumed-source tests included);cargo test -p ripr --test check_file_fact_cache_verbose2 passed;cargo xtask check-output-contractspass;cargo xtask goldens checkpass.
Non-blocking follow-up: no unit test covers merge_from over several capped snapshots.
Not run: the hosted Ripr Rust Small Result, lsp_lifecycle and fixtures. No cache-schema bump is involved.
Generated by Claude Code
EffortlessSteven
left a comment
There was a problem hiding this comment.
Bounded source review — 2026-11-05 UTC
- reviewed_head_sha:
51e653f5b7698172dd42bd84bca9f3e540b5d7cc. - integration_basis: metadata base
00079eaf03c1af9fcc008babdee179745035d490; immutable candidate, authored change and named semantic owners inspected. No new composed integration run. - claim_boundary: ux(check): expose bounded cache reuse in verbose diff output (Closes #4975)
- changed_surfaces_and_semantic_owners_inspected: Read producer stats carrier/merge_from/did_work, app clone transfer, JSON verbose projection and stderr line, cold/warm test and LSP consumers. Prior take()-empties-carrier defect fixed by clone. Store error alone counts work, retained+dropped failures bounded, absent/zero work remain explicit null limitations. Default JSON branch unchanged. Prior native reports retained as reports, not rerun.
- blocking_findings: No additional inline finding in this pass. Existing findings, prerequisites and accepted deferrals described above retain their recorded disposition; no duplicate threads added.
- non_blocking_suggestions: None added.
- refuted_or_stale_findings: Current source repairs and prior refutations described above retained; resolved does not imply deferred work was repaired.
- proof_and_ci_observed: Current immutable source and targeted diff read, current conversation and all thread states inspected. No hosted logs or whole RIPR build/tests. Prior review execution claims remain attributed reports; not reexecuted here.
- proof_or_review_missing: Exact-head whole-product/native integration and hosted qualification unverified in this pass; large generated fixture matrices and broader runtime contracts not exhaustively reexecuted.
- affected_currentness_dimensions: Current head/base/open state checked immediately before publication. Historical receipts retain their original commit, tree, runner and scope; no promotion to current integration proof.
- residual_assumptions_and_non_claims: Existing Draft, owner and release/activation holds remain. This COMMENT review does not grant merge readiness, rollout or release acceptance.
- disposition: REVIEW_INCOMPLETE; no new actionable finding; retain explicitly deferred issues where named.
|
Repair wave: the actual CLI at composed source Wheel diagnosis: run 42115324793 job 127553786682 built and inspected the wheel, then |
|
Review finding and repair: #4975 requires a planted absolute home/cache path in a failure row to be refused. At Draft head |
|
Current source review record:
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Reviewed the producer, bounded aggregation, LSP carrier, verbose output and privacy repair on this head. Focused real-CLI and extracted negative controls are recorded in the source review. Current-head hosted qualification and combined-tree judgment remain outstanding.
|
Claim: driving this PR to squash-merge.
Generated by Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRVk9uwnL9VvomuYVpuW
…back rebuilds; define recomputed as misses plus corrupt Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRVk9uwnL9VvomuYVpuW
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…rkspaces, scope the cache receipt in docs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRVk9uwnL9VvomuYVpuW
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Exact head bfa72c4 reviewed: the CheckOutput carrier field and every struct initializer (missing ones in human.rs, missed_txt.rs and lsp tests were added after the main merge), the output projection module, the same-run fallback stats merge with run-order preservation, JSON schema and docs wording for misses plus corrupt, the integration tests with workspace cleanup, process allowlist and changelog. Default JSON is unchanged and no cache schema version moves. All threads have source-backed replies and are resolved.
Generated by Claude Code
…text policy Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRVk9uwnL9VvomuYVpuW
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRVk9uwnL9VvomuYVpuW
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Exact head 68a2aec reviewed. Delta from the previous reviewed head: test host-path samples are assembled at run time so the local-context policy passes, and current main is merged. All threads are resolved.
Generated by Claude Code
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRVk9uwnL9VvomuYVpuW
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Exact head a5aa791 reviewed. Delta from the previous reviewed head: current main merged, which carries the repair of main's duplicated test field. All threads are resolved.
Generated by Claude Code
…licate fixes removed #14047 and #14048 each removed one of the two duplicate initializers, leaving the re-export shadow test owner without the field (E0063) on main. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRVk9uwnL9VvomuYVpuW
|
Head d3d3a6d restores the Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Exact head d3d3a6d reviewed. Delta from the previous reviewed head: current main merged and one test initializer field restored so the lib tests compile. All threads are resolved.
Generated by Claude Code
Summary
ripr check --diffthreads producer-ownedFileFactCacheStatsintoCheckOutputand projects them under-v/--verbose(one stderr line plus capped store-failure rows, additivefile_fact_cache/file_fact_cache_limitationJSON fields). Default JSON unchanged.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Proposal: none
Spec:
docs/OUTPUT_SCHEMA.md,schemas/ripr/check.schema.jsonADR: none
Plan item: none
Governing issue or accepted claim: #4975
Acceptance delta (one sentence): Verbose ordinary diff check output exposes bounded file-fact cache reuse/recompute/store-failure facts from the typed producer stats while default JSON and analysis classifications stay stable.
Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication):
carrier/12566-check-cache-verbose-4975Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): supersedes #12566
Acceptance retained from a replaced candidate (if any): all of #12566 (same 40 files, same changelog fragment, process allowlist, integration test); all six Devin threads on #12566 were resolved.
Accepted winner and losing candidate disposition (when decided): #12566 closed as superseded by this carrier.
Scope
ConsumedRustSources.file_fact_cachebecomesOption<FileFactCacheStats>(production, not test-only);output/check_file_fact_cache.rsowns the verbose JSON/stderr projection;CheckOutput.file_fact_cachecarries stats for renderers.crates/ripr/tests/check_file_fact_cache_verbose.rs; process allowlistpolicy/process_allowlist.d/4975-check-file-fact-cache-verbose.txt; changelog fragmentchangelog.d/4975-check-file-fact-cache-verbose.md.crates/ripr/src/analysis/language/rust/repo.rs(thefile_fact_cacheassignment, which main moved there fromrust/mod.rsin refactor(seam_cache): extract path_dependencies owner submodule (#5058) #12497); the blocked-store test blocks therepo-file-factslayer directory so it pins no file-fact schema version.CACHE_SCHEMA_VERSION/FILE_FACT_CACHE_SCHEMA_VERSIONchange: the stats are not serialized into cache entries.Non-goals: repo-latency receipt (#3864), semantic reuse (#3796), default JSON changes.
Scope Classification
Production delta: verbose check cache projection.
Evidence/support delta: integration tests, schema, docs.
Single acceptance criterion: see acceptance delta above.
Non-goals: see above.
Support-tier Impact
Policy Impact
Proof
On tree
9f4d4b921c55a0e3045f6936233837afd1d8bdd2, a freshcargo test -p ripr --test check_file_fact_cache_verbosepassed 2/2 with the existing target reused. Independent review of the identical tree checked 510 Linux errno controls and planted-path controls; native Windows remains unverified. Details, identities, earlier attributed review and current integration basis are in the review evidence. Current-head hosted qualification and final integration judgment remain pending.Claim Boundary
May claim: verbose diff check surfaces bounded file-fact cache counters and store-failure rows without changing findings or default JSON.
Must not claim: semantic seam cache reuse, latency guarantees, #3864 scope.
Rollback
Revert the squash commit.
Spec-Test-Code Traceability
docs/OUTPUT_SCHEMA.mdcrates/ripr/tests/check_file_fact_cache_verbose.rs,output::check_file_fact_cachecrates/ripr/src/output/check_file_fact_cache.rsStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
Generated by Claude Code