fix(install): verify cached artifacts before extract - #117
Conversation
Cache hits previously skipped integrity::verify_and_report, so a corrupted cache file could reach extraction while provisional installs still claimed integrity checks passed. Always re-verify the on-disk cache file, and cover provisional warn-once plus corrupted-cache paths in install integration tests. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Sorry @tonythethompson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Warning Review limit reached
Next review available in: 43 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe install transaction now verifies cached archives before extraction. Integration tests cover corrupted cache failures and provisional-package warning behavior across first and repeated installs. ChangesInstall validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 8✅ Passed checks (8 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Warning Review ran into problems🔥 ProblemsLinked repositories: Public OSS repositories can only analyze public repositories installed in this organization. Analyzed 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 |
PR Summary by QodoVerify cached install artifacts before extraction
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Greptile SummaryThe PR verifies cached artifacts against their registry-provided SHA-256 before extraction and redownloads corrupt cache entries.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/core/integrity.rs | Updates integrity verification to return the successfully observed digest and adds matching success and failure tests. |
| src/install/transaction.rs | Verifies cache hits before extraction, repairs mismatched entries through a fresh verified download, and reuses the resulting digest. |
| tests/install_test.rs | Adds integration tests for corrupted-cache recovery and one-time provisional install warnings. |
Reviews (2): Last reviewed commit: "fix(install): self-heal corrupt cache an..." | Re-trigger Greptile
Code Review by Qodo
1.
|
Qodo FixerNo findings are within the configured fix scope. To change which findings are fixed, adjust the setting on your Qodo configuration page. |
On cache-hit integrity failure, delete the bad entry and re-download once instead of sticky-failing. Have verify_and_report return the observed digest so install can set payload_sha256 without a second full-file hash pass. Co-authored-by: Cursor <cursoragent@cursor.com>
f201ce6
Summary
artifact_sha256before extraction, so cache hits can no longer bypass integrity checksEvidenceTierenum + unknown-tier rejection test are already present; left unchangedTest plan
cargo test --test install_test -- provisional corrupted full_installcargo testcargo clippy -- -D warningscargo fmt --checkMade with Cursor