Repository navigation
fix(release,xtask): Windows install-record ripr.exe and check-pr scratch cleanup (#10344) - #10523
Conversation
…#10344) Cargo's .crates2.json names each installed binary by file name, so a Windows path install records ripr.exe. validate_install_provenance compared against the bare name and refused every genuine Windows packaged install as "installed no ripr binary" (hosted Windows rows on #10443/#10467/#10478). The check now takes the host EXE_SUFFIX, and a host-explicit test covers both spellings. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdRXdT9261qDfiBsZW51xs
|
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 16 minutes. View limit details
Comment |
… scratch (#10344) Hosted Windows failed check_pr_failure_report_replaces_stale_success_report in cleanup (os error 32) after its oracle passed: a briefly held handle in the test-owned scratch dir. Cleanup now retries os error 32/33 for up to five seconds; any other error, or a longer holder, still fails. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdRXdT9261qDfiBsZW51xs
…nction Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdRXdT9261qDfiBsZW51xs
|
The wheel build and Rust checks on this Draft fail because main's Generated by Claude Code |
There was a problem hiding this comment.
Verification questions
- Confirm the full lane does not prove there are no additional scratch-cleanup siblings or Cargo install-record bin-name variants outside the checked surfaces.
- Confirm no focused test directly drives
remove_owned_scratch_dirthrough transient errors 32/33, exhaustion, or a non-retryable error. - Confirm sibling code paths that construct or validate Cargo install-record binary names were not comprehensively enumerated.
- Confirm the scratch cleanup retry is localized to the named xtask test; whether other test-owned temporary directories have analogous Windows cleanup failures requires a repository-wide cleanup inventory.
- Confirm the Windows cleanup retry has no focused deterministic test for retry count, retryable error selection, five-second bound, or propagation of non-32/33 errors.
Test proof
- Focused HEAD proof failed (exit 101):
cargo test --locked --package xtask --test help_hierarchy. This is a current failure, not a red/green witness.
Refuted
- A worker or async transfer boundary could make the Windows scratch-directory cleanup race unsafe or detach ownership.; refuted because: The helper calls std::fs::remove_dir_all synchronously and retries only matching Windows raw OS errors 32/33; no worker, async, GC, detach, or transfer abstraction is involved.
- The diff contains no JavaScript-backed worker, async task, GC, detach, or transfer boundary; the affected implementation paths are synchronous Rust filesystem and JSON operations.
- The new suffix-aware install-record check could introduce a dangling reference or ownership hazard through its formatted binary name.; refuted because: records_ripr_bin constructs an owned String and compares each JSON value against it during the iterator's borrow; no reference outlives the local value.
Evidence gaps
- The central cargo-test receipt and native Windows execution remain necessary to close runtime proof gaps.
- The diff lacks completed native Windows proof in the available packet.
- Model proof intent was rejected by deterministic validation.
…-qdq5b6-10344-install-exe
|
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.
Verification questions
- Confirm the Windows cleanup retry is localized to remove_owned_scratch_dir and the named check-pr test; the displayed diff contains no second caller to migrate.
- Confirm the cleanup retry recognizes raw OS error values 32 and 33, but the diff does not establish portability of those values across Rust platforms.
- Confirm the Windows scratch-cleanup retry branch has no direct deterministic test for error selection, retry count, the five-second bound, or non-retryable propagation.
- Confirm the cleanup helper's retry contract is described in code but lacks a deterministic focused test for retry, exhaustion, and non-retryable errors.
- Confirm the retry helper is routed only through the named check-pr failure-report test.
Refuted
- The install-record comparison risks memory unsafety through string construction or JSON iteration.; refuted because: records_ripr_bin builds an owned String and compares each serde_json::Value as a borrowed str without mutation or lifetime extension.
- The cleanup retry could hide unrelated filesystem failures or become an unbounded denial-of-service loop.; refuted because: The implementation limits retries to errors 32 and 33 and a maximum of 50 attempts; other errors are returned immediately.
- The install-record binary list may be resized, detached, or transferred while records_ripr_bin reads it, exposing stale length or backing-store state.; refuted because: No buffer ownership, resize, detach, transfer, or mutation occurs in the changed path; records_ripr_bin receives an immutable slice of parsed serde_json::Value elements.
- The changes require a broader shared cleanup or install-record abstraction to be architecturally complete.; refuted because: Both changes are narrowly scoped: one private predicate used by one validator and one private retry helper used by one test; extracting broader abstractions would increase scope rather than complete the fix.
- The cleanup retry might cross an unsafe worker/async handoff or detach directory ownership while a child process retains a handle.; refuted because: No worker, async runtime, JavaScript-backed object, GC transfer, detach, or ownership handoff exists on the changed path. The operation remains synchronous, test-owned, and bounded to five seconds.
- The prior doc-comment split invalidates the current oracle review.; refuted because: The seeded thread records the author moving records_ripr_bin above validate_install_provenance's doc block, and the current patch shows the helper before that doc block.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Review of record: head
|
Summary
xtask/src/reports/release.rs::validate_install_provenancechecks that Cargo's install record lists ariprbinary. Cargo's.crates2.jsonnames each binary by its file name, so a Windowscargo install --pathrecordsripr.exe. Every genuine Windows packaged install was refused withinstalled no ripr binary.packaged_install_provenance_reads_cargos_real_install_recordin job 121307407605. This is the real-install control from Packaged-install provenance: accept UNC extraction roots and add an end-to-end control #10339. It would also block a Windows packaged release qualification.ripr+ the hostEXE_SUFFIXthroughrecords_ripr_bin(bins, exe_suffix), which takes the suffix as a parameter so both spellings can be tested on any host.check_pr_failure_report_replaces_stale_success_reportduring cleanup (remove report-test scratch …: os error 32), after its oracle had passed. Cleanup of the test-owned scratch directory now retries os error 32/33 for up to 5 s. Any other error, or a holder that outlasts the bound, still fails.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Proposal: none
Spec: none
ADR: none
Plan item: #10344
Governing issue or accepted claim: #10344
Acceptance delta (one sentence): Release packaged-install provenance accepts the binary name Cargo actually records on the host, so a genuine Windows install is no longer refused.
Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication): claude/project-thread-qdq5b6-10344-install-exe
Stack parent or prerequisite PR (if any): #10506 (main compile break, #10456 × #10488). This PR will merge main once that lands; until then its required run cannot compile.
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): none
Scope
xtask/src/reports/release.rs:records_ripr_bin;validate_install_provenancepasses itstd::env::consts::EXE_SUFFIX;install_record_bin_names_follow_the_host_executable_suffix.changelog.d/10344-windows-install-record-exe.md(Fixed).xtask/src/tests.rs:remove_owned_scratch_dirand its one caller;changelog.d/10344-check-pr-scratch-cleanup.md(Internal / CI).Scope Classification
Production delta: xtask release qualification only. The
riprproduct is unchanged.Non-goals: the eval_sweep ACL
NOT_ESTABLISHEDrow on #10344, which is fail-closed by design.Support-tier Impact
None.
Policy Impact
None.
Proof
mocksargument in collect_tests_from_statements calls (#10456 x #10488) #10506's 2-line fix applied locally only so the tree builds; it is not in this PR:cargo test -p xtask --bin xtask -- install_record_bin_names packaged_install_provenance install_source_urlsgives 4/4 pass.cargo xtask precommit: exit 0.riprunder.exeandripr.exeunder no suffix. Under.exe, the old rule (== "ripr") would fail itsripr.execase.windows-advisoryrun on this head (windows-ci) runs the realcargo installcontrol.Claim Boundary
This fixes the binary-name comparison only. The source-path, version and single-install checks are unchanged.
Rollback
Revert this PR.
Spec-Test-Code Traceability
Not applicable.
Static Language Check
No panic-family calls added.
CI Economics
Default required lane.
Engineering Check
Uses the same
std::env::consts::EXE_SUFFIXidiom as the rest of release.rs (lines 381, 3687).Gates
cargo xtask precommitpasses.https://claude.ai/code/session_01PdRXdT9261qDfiBsZW51xs
Generated by Claude Code