Repository navigation
test(xtask): make the local Windows full-suite deterministic (#3289) - #3290
Conversation
Treat Windows ERROR_PRIVILEGE_NOT_HELD (1314) as symlink-unsupported in the rust_judged_panel helpers so the *_when_supported tests skip instead of failing on hosts without SeCreateSymbolicLinkPrivilege, and anchor the two source-promotion fixture reads to CARGO_MANIFEST_DIR so they cannot race the process-wide set_current_dir in dispatch/badges tests.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 47 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 (2)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Confirmed findings
artifact-verifiersensor failed with exit code 2; no receipt returned to the lane. PR does not depend on it and no artifact-only invariant is asserted, but residual reviewer-side uncertainty remains about what the verifier rejected.- Symlink helpers accept both ErrorKind and raw code 1314, but only Windows path is fixed; on this toolchain kind != PermissionDenied for 1314, so the OR is correct.
Verification questions
- Confirm artifact-verifier exited 2 with no detailed reason in the packet; for a Windows-host-specific proof, the receipt artifact should be re-verified or the failure cause documented so reviewer confidence in the 1647-pass count is not coupled to a failed sensor.
- Confirm both fixes are confined to
#[cfg(test)]modules and do not alter production behavior ofripror any public API surface; thecfg(windows)symlink helpers and the two fixture-read tests live undermod tests. - Confirm pR claims
1647 passed, 0 failedfor full cargo test -p xtask on this Windows host; that's the gating evidence. - Confirm symlink fix's discriminating-power claim is weaker than stated: the PR says "with the 1314 arm scratch-disabled" both tests fail, but raw_os_error() returning Some(1314) is the exact Windows privilege error; a stronger mutation would flip it to a wrong code (e.g., 5) and confirm both arms matter.
Test proof
- Focused HEAD proof failed (exit 101):
cargo test --locked --package xtask --test rust_judged_panel diff_path_rejects. This is a current failure, not a red/green witness.
Refuted
- The new
symlink_unsupportedhelper might over-skip real test failures by mapping an unrelated Windows error 1314 toOk(false).; refuted because: Error 1314 (ERROR_PRIVILEGE_NOT_HELD) is only emitted by the symlink syscalls when the caller lacksSeCreateSymbolicLinkPrivilege; it cannot arise from a genuine test-logic failure indiff_path_rejects_*_when_supported, and the prior kind-only check demonstrably misclassified it (PR body reproduction). - The CWD-race fix is wrong because parallel tests still race and
os error 3can still occur even with an absolute path; refuted because: concat!(env!("CARGO_MANIFEST_DIR"), ...) is resolved at compile time to a literal absolute path;set_current_dircannot affect a path that doesn't begin with a relative component. Race is eliminated by construction. - Both arms of symlink_unsupported may be redundant; refuted because: Toolchain-dependent ErrorKind mapping is the precise claim being fixed; OR-ing the raw code is the fix itself. Cannot refute without a non-1314 raw_os_error reproduction.
Evidence gaps
- PR claims cargo test -p xtask 1647 passed on this Windows host but provides no receipt artifact in the seeded thread; cargo-test is scheduled-late so the gate receipt is expected but currently absent in the available evidence.
- Model proof intent was rejected by deterministic validation.
|
Exact-head review record — REVIEW_READY (author self-review)
|
Production delta
Closes #3289. Two xtask test-infra repairs so
cargo test -p xtaskis deterministic on a Windows dev machine withoutSeCreateSymbolicLinkPrivilege:xtask/src/rust_judged_panel.rs— the#[cfg(windows)]symlink_file/symlink_dirhelpers mapErrorKind::PermissionDeniedtoOk(false)(skip), but Windows error 1314 (ERROR_PRIVILEGE_NOT_HELD) maps to a differentErrorKindon this toolchain, so the error propagated and bothdiff_path_rejects_*_when_supportedtests failed instead of skipping. Newsymlink_unsupportedhelper accepts both the kind and the raw code.xtask/src/reports/source_promotion.rs— the two fixture-pinning tests read../fixtures/source_promotion/...relative to the process CWD with no guard, racing the process-wideset_current_dirin dispatch/badges tests (which hold theCWD_LOCKwrite guard) → intermittentos error 3in full parallel runs. Both reads are now anchored toconcat!(env!("CARGO_MANIFEST_DIR"), "/../fixtures/...")— compile-time absolute, immune to CWD races by construction.Proof
cargo test -p xtask(full suite, this Windows host): 1647 passed, 0 failed — previously 4 failures on every run (2 symlink + 2 flaky source-promotion), reproduced identically onorigin/main(recorded in test(xtask): local Windows full-suite determinism — symlink-privilege skip misses os error 1314 and source-promotion fixture reads race the process CWD #3289).cargo clippy -p xtask --all-targetsclean,cargo fmt --checkclean,check-no-panic-family/check-local-context/check-file-policy/check-static-languagepass.Limitations / non-claims
crates/ripr) behavior change; xtask test helpers only.Candidate head:
b308ebcb(baseorigin/main@3a32322c).