Repository navigation
fix(cache): print one warning line per build for ignored file-fact cache entries (#4888) - #4894
Conversation
…che entries (#4888) An unusable cache directory made every lookup fail the same way and printed one stderr line per source file (723 on this repository). Report the count and the first reason once per build. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head self-review of 4860454. No blocking findings.
- Behavior. Cache stats and control flow are unchanged: the corrupt entries are still counted and re-parsed. Only the stderr emission moves out of the loop.
- Ordering. The phase-1 comment promised "corrupt-entry stderr ordering byte-identical". There is now one line, emitted before any parse, so it still comes before the phase-2/3 output. Nothing depends on interleaving; I grepped the tests and none match on this message.
- Wording. "entry ignored" stays for a single entry, so the #4383 path attribution is kept.
- Oracle. The unit test pins both message shapes. The end-to-end receipt with 723 files is in the PR body.
CodeRabbit (rate limit), Gemini (quota) and droid-review reviews are missing, not clean. Hosted CI is pending.
Generated by Claude Code
|
Warning Review limit reachedNext included review available in 4 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Code Review
This pull request aggregates corrupt cache entry warnings during a build into a single log message instead of printing one warning per source file. It introduces a helper function corrupt_entries_warning to format the message based on the count of ignored entries, tracks the first corruption reason, and adds a unit test to verify this behavior. There are no review comments, so I have no feedback to provide.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4860454e48
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…test the CLI path (#4888 review) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head review of 7a7f070. Disposition: no blocking findings; merge waits on required CI.
What I inspected:
analysis/facts/build.rs: the lookup loop counts corrupt entries and keeps the first reason. It emits one warning after the loop, or before an early cancellation return.- The message formatter:
- one entry: "entry ignored (reason)";
- several: "N entries ignored; first: (reason)";
- it no longer claims any re-parsing happened.
- Oracles:
- the unit test
corrupt_entries_collapse_into_one_warning_linechecks both forms; - the cli_smoke test
unusable_cache_directory_is_reported_once_per_buildruns the real binary withRIPR_CACHE_DIRset to a regular file and asserts exactly one warning line, in the several-entries form. It fails if the per-entry emission returns or the emission is removed.
- the unit test
- CHANGELOG: #4888 entry present.
Local results:
facts::buildunit tests: 32/32 passed.- The cli_smoke test passed.
cargo clippy -p ripr --all-targets --locked -D warnings: 0.cargo xtask precommit: 0.
Known gap: the cancelled-lookup flush has no regression test. The reason is in the Devin thread.
Review providers: CodeRabbit is missing (rate-limited) and droid-review is missing (queued). Neither counts as a clean review.
Generated by Claude Code
…-2rk3d2-cache-warn # Conflicts: # CHANGELOG.md # crates/ripr/tests/cli_smoke.rs
Summary
Before: with an unusable cache directory (for example
RIPR_CACHE_DIRpointing at a file),ripr checkon this repository printed 723ripr: repo file fact cache entry ignored (...)lines to stderr, one per source file. The single relevant warning came after all of them. The result was still correct and the run exited 0.After: a build prints one line,
ripr: 723 repo file fact cache entries ignored; first: (<reason>). A single bad entry keeps its old message. A cancelled lookup still reports the entries it saw.FileFactCacheStats.corrupt_ignoredstill counts every entry.How:
build_index_with_file_fact_cachekeeps the first reason during the lookup loop and emitscorrupt_entries_warning(count, reason)once, after the loop or before a cancellation return.Fixes #4888.
Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Plan item: 0.11 shared-state hunt
Governing issue or accepted claim: #4888
Acceptance delta (one sentence): an unusable file-fact cache yields one stderr line per build, not one per file.
Candidate Relationships
Candidate branch:
claude/project-thread-2rk3d2-cache-warnStack parent or prerequisite PR: none. #4383 added the path to this message and is compatible.
Scope
crates/ripr/src/analysis/facts/build.rscrates/ripr/tests/cli_smoke.rsCHANGELOG.mdScope Classification
Non-goals: the seam-inventory cache warnings already print once per run.
Support-tier Impact
Policy Impact
Proof
corrupt_entries_collapse_into_one_warning_linepins the one-entry and several-entry messages.unusable_cache_directory_is_reported_once_per_buildruns the real binary and asserts exactly one warning line in the several-entries form.eprintln!and a cancellation cannot land deterministically between two lookups.Claim Boundary
Rollback
Revert the commit.
Static Language Check
killed,survived,untested,proven, andadequate.Engineering Check
panic,unwrap,expect,todo, orunimplemented.Gates
cargo fmt --checkcargo xtask precommit🤖 Generated with Claude Code
https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx