Repository navigation
fix(cache): omit host paths from cache write errors (#3845) - #3849
Conversation
|
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 reachedNext included review available in 38 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 (1)
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 |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head review at 75e0a484f47aaa2bbca30526ccf954e717610db8.
I do not see a source-level blocker in this repair.
- The path policy covers every error branch inside
write_with_sync: directory creation, no-filename, temp create/write, permission preservation, fsync, and finalize. writekeepsInclude, so durable artifact diagnostics retain their prior path placement.write_cachealone selectsOmit; the repository call sites use static labels (for example cache/fingerprint/file-fact cache families), so the label does not reintroduce a host path.- The directory-failure and finalize-failure controls exercise both pre-temp and post-temp failure positions; the durable-write counter-control guards against accidentally global redaction.
- The equivalent-root assertion is appropriately root-portability proof, not a claim that platform-owned
io::Errorwording is cross-platform canonical identity.
Residual proof dependency: hosted Rust gates still need to establish that the finalize fixture behaves as expected on the routed platform and that formatting/clippy/full tests remain green.
Disposition from source review: REVIEW_COMPLETE_PENDING_HOSTED_PROOF.
EffortlessSteven
left a comment
There was a problem hiding this comment.
reviewed_head_sha: fb2e4f8
integration_basis: dc66cec
claim_boundary: cache-writer diagnostics omit absolute directory/destination/temp paths while durable artifact-writer diagnostics remain path-rich
changed_surfaces_and_semantic_owners_inspected:
crates/ripr/src/atomic_file.rs- all default-branch
atomic_file::write_cachecall sites (cache,corpus fingerprint cache, and file-fact/cache families) - #3845 controls and #3795 equivalent-root/privacy boundary
- follow-up commits
98126b2,2c0c15b, andfb2e4f8
blocking_findings: none
review_findings:
ErrorPathPolicyis applied to every error-producing branch inwrite_with_sync: parent creation, missing filename, temp creation/write, permission preservation, fsync, and final rename.write(...)selectsInclude; for that path the new format strings reproduce the old spaces and path placement, preserving durable artifact diagnostics.write_cache(...)alone selectsOmit; current callers pass static operation labels, so the label does not reintroduce a checkout/cache path.- the directory and final-publication fixtures discriminate failures before and after temp creation; the durable-write fixture prevents accidental global redaction; the equivalent-root fixture proves same-platform root portability.
- the three commits after the initial source review change only rustfmt ordering/wrapping and replace repository-denied
expect_errcalls with explicitlet Err(...) else; they do not alter the production path policy.
proof_observed:
- PR Plan: success at this head
- Security: success at this head
- formatting preflight on the preceding run passed after the first repair
proof_pending:
- current-head
Routed Rust SmallRust gates are still in progress - current-head
ub-reviewis still in progress - Windows advisory is not routed for this one-file change, so this review does not claim a native Windows fixture run
residual_assumptions_and_non_claims:
- platform-owned
io::Errortext is retained and is not claimed to be byte-identical across operating systems; the claim is that repository/cache path spellings introduced by this writer are omitted - this repair does not surface store-failure rows, add retryability/error taxonomy, or improve diff latency
disposition: REVIEW_COMPLETE_PENDING_CURRENT_HEAD_HOSTED_PROOF
EffortlessSteven
left a comment
There was a problem hiding this comment.
reviewed_head_sha: 01e0a11
integration_basis: ed4b160
claim_boundary: cache-writer diagnostics omit absolute directory/destination/temp paths while durable artifact-writer diagnostics remain path-rich
currentness reconciliation:
- head advanced only by merge commit
01e0a119, parentsfb2e4f80681cb52cdd883f1c2690869acb1a29d8and protected mained4b160c297ec00e7c1a42b07c78447f40a285ce - the PR-relative patch remains exactly one changed file,
crates/ripr/src/atomic_file.rs - no conflict or semantic interaction is visible with the newly merged target-affinity reverse-index work on main
changed_surfaces_and_semantic_owners_inspected:
- current PR patch for
crates/ripr/src/atomic_file.rs - all error-producing branches in
write_with_sync - current default-branch
write_cachelabels/callers - #3845 and #3795 privacy/equivalent-root controls
blocking_findings: none
review_findings:
write(...)retains path-rich diagnostics with byte-compatible spacing/path placement throughErrorPathPolicy::Includewrite_cache(...)alone selectsOmit, covering directory creation, missing filename, temp create/write, permission preservation, fsync, and finalize errors- current cache callers supply fixed operation labels, so the label does not reintroduce a host path
- tests discriminate pre-temp and post-temp failures, durable-write non-regression, and same-platform equivalent-root behavior
- the protected-main merge does not alter the production implementation or test oracle
proof_observed_at_this_head:
- Security: success
- PR Plan: success
proof_pending_at_this_head:
Routed Rust Smallrequired gate is queued- broader CI is running
ub-reviewis running- Windows Advisory is skipped, so this review does not claim native Windows execution
residual_assumptions_and_non_claims:
- retained platform-owned
io::Errorwording is not claimed cross-platform canonical; repository/cache path spellings introduced by this writer are removed - this repair does not surface the rows, add retryability/error taxonomy, or improve diff latency
disposition: REVIEW_COMPLETE_PENDING_CURRENT_HEAD_HOSTED_PROOF
Fresh protected-main integrationMerged current protected The clean merge tree uses protected-main bytes plus this PR's |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Review (exact head 75e0a48)
Surfaces: crates/ripr/src/atomic_file.rs only (+161/-16).
- Stimulus/oracle: four new tests discriminate the policy — cache dir-creation failure, cache finalize failure, durable finalize control retaining the path, and equal-errors-across-roots determinism. Fixtures use owned temp dirs, no Unix-permission or operator-state dependence; the rename-over-directory failure mode is cross-platform.
- Completeness: every
write_with_syncerror branch (create_dir_all, file_name check, File::create, write_all, set_permissions, fsync, rename) routes througherror_path_policy; no branch leaks a path underOmit. - Byte compatibility:
write(...)keepsErrorPathPolicy::Include, so durable diagnostics are unchanged; only cache (write_cache) drops directory/destination/temp spellings while keeping label andio::Error. - Validation: published-head required check
Ripr Rust Small Resultgreen;mergeStateStatus=CLEAN; Devin review reported no issues.
Residuals: none blocking. Non-claim: does not surface the #3837 rows or add retryability output, per PR body.
Disposition: REVIEW_READY, merging by squash.
Closes #3845. Contributes to #3795 control 6 and the cache-store failure-row privacy boundary.
Claim
Retained cache-write failures no longer contain absolute cache, destination, or temporary-file paths. Ordinary durable artifact writes keep their existing path-rich diagnostics.
Exact basis
Implementation
crates/ripr/src/atomic_file.rsnow gives the shared writer an explicit error-path policy:Every existing durable-write error retains the same wording and path placement. Cache-write errors retain the operation, caller-owned label, and underlying
io::Error, but omit directory, destination, and generated temporary-file spellings before #3837 stores the message in a portable failure row.No cache key, write algorithm, success path, sync policy, status label, classification, or canonical identity changes.
Discriminating controls added
The fixtures use only owned temporary directories and do not depend on Unix permission denial or operator cache/home state.
Proof state
Not claimed as locally executed in this connector session: no Rust toolchain is available in the execution environment. The PR therefore relies on the repository's hosted checks and exact-head review before merge.
Expected focused commands:
Review focus
write(...)diagnostics.write_with_syncerror branch must use the path policy.labelargument.Rollback and non-claims
Rollback is one-file and restores only cache error detail; it does not alter cache contents. This PR does not surface the #3837 rows, add retryability/error-class output, implement semantic reuse, or improve diff latency by itself.