Repository navigation
test(xtask): give policy_all fixtures a per-process sequence number (#10344) - #10478
Conversation
…10344) Six parallel tests named their temp fixture only by pid and wall-clock nanos. On hosted Windows two of them shared a directory and raced two git inits ("File exists" copying hook templates). With the clock coarsened to one value, the old naming fails all six tests and the sequenced naming passes all six. 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! |
1 similar comment
|
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 20 minutes. View limit details
Comment |
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm the repository test target does not itself force equal timestamps or directly assert distinct fixture paths, so regression detection depends on an external negative control rather than an in-repository invariant test.
Refuted
- Atomic ordering might still allow two tests to select the same fixture directory.; refuted because: AtomicU64::fetch_add is atomic and each invocation observes a distinct previous counter value; Relaxed is sufficient because the value is used only for uniqueness, not synchronization of other data.
- The new counter introduces a race or could allocate the same value to parallel fixture constructors.; refuted because: AtomicU64 fetch_add is a unique atomic read-modify-write sequence for the process, and the original failing behavior was two concurrent git initializations sharing one path.
- The PR broadens its claim to all xtask fixture-directory helpers and therefore requires a repository-wide sibling fix.; refuted because: The changelog and PR claim boundary are explicitly limited to policy_all fixtures; other helpers are a parked scope decision, not a changed-line defect.
- The patch changes policy command behavior or production code despite being presented as a test-only collision fix.; refuted because: The changed behavior is limited to Fixture::new's temporary-directory name; no production policy route is edited.
Evidence gaps
- The scheduled cargo-test receipt is still needed to establish the claimed 6/6 pass in the current checkout; the failed ripr run does not provide a correctness witness.
- Model proof intent was rejected by deterministic validation.
- Executable confirmation of the six policy_all routes is pending the scheduled late cargo-test receipt; the failed ripr sensor is not itself evidence that this test change is incorrect.
- Automated evidence is incomplete: ripr failed and the always-on cargo-test receipt was not available in the supplied packet.
|
The required Locally the whole test takes about 0.9 s across three runs. No fix exists yet, so I filed #10483 to replace the timer with a work-count bound. I'm re-running once by re-applying Generated by Claude Code |
Review of record: head
|
…tch cleanup (#10344) (#10523) * fix(release): accept Cargo's ripr.exe install-record entry on Windows (#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 * test(xtask): retry a Windows sharing violation when removing check-pr 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 * docs(release): keep validate_install_provenance's doc block on its function Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdRXdT9261qDfiBsZW51xs --------- Co-authored-by: Claude <noreply@anthropic.com>
Summary
xtask/tests/policy_all.rsnamed each test fixture's temp directory only by pid and wall-clock nanos. Its six tests run in parallel in one process, so two of them can share a directory.git initraced in one directory and failed withfatal: cannot copy '…/templates/hooks/applypatch-msg.sample' … File exists. The failing rows wereci_policy_collects_real_cheap_failures_before_expensive_workandpolicy_all_healthy_fixture_passes_with_original_leaf_reports.AtomicU64sequence number to the directory name.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): Parallel policy_all tests can no longer share a fixture directory, which removes the Windows
git init"File exists" failures recorded on #10344.Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication): claude/project-thread-qdq5b6-10344-policy-all
Stack parent or prerequisite PR (if any): none
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/tests/policy_all.rs: a sequence number in the fixture name, with a comment explaining why.changelog.d/10344-policy-all-fixture-collision.md(Internal / CI).Scope Classification
Production delta: none.
Non-goals: the other
pid + nanosfixture helpers under xtask/tests, which have not been observed failing. The other #10344 rows: #9688 ACL and #10458 invalid JSON.Support-tier Impact
None.
Policy Impact
None.
Proof
cargo test -p xtask --test policy_all: 6/6 pass.as_nanos() / 10^12):cargo xtask precommit: exit 0.windows-ci.Claim Boundary
This removes a fixture-directory race in a test helper. It does not change the policy commands under test.
Rollback
Revert this PR.
Spec-Test-Code Traceability
Not applicable; this is a test helper only.
Static Language Check
No panic-family calls added.
CI Economics
Default required lane.
Engineering Check
Same idiom as other per-process fixture counters in the repo (
NEXT_BASEinhostile_repos.rs).Gates
cargo xtask precommitpasses.Generated by Claude Code