Repository navigation
fix(xtask): gate linked_target test import on unix - #5462
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Self-review (exact head): one test-only import move in xtask/src/reports/dx_scoreboard/tests.rs - linked_target to a #[cfg(unix)] line, same pattern as #5403/#5426. Sole use is the #[cfg(unix)] test a_symlinked_target_is_never_cleared, so no behavior change on any platform; rustfmt applied. Disposition: REVIEW_INCOMPLETE pending local clippy re-verify on this tree (proof currently in sibling worktree) + hosted gate (dispatched, in flight). Will REVIEW_READY + merge on green.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review. Summary by CodeRabbit
WalkthroughThe test module now imports ChangesUnix-gated test import
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This change only scopes a test import to Unix, matching the platform-specific symlink test. No merge-blocking behavior or deployment risk is indicated. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the issue, fix, proof, and non-goals. However, it omits many required template sections, including source boundary, source-of-truth links, candidate relationships, scope classification, impact notes, claim boundary, rollback, traceability, and engineering gates. Resolution Complete the missing required template sections. For sections that do not apply, state
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checked the imports with care, Comment |
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm self-review admits clippy re-verify was done in a sibling worktree (#5406), not the exact head tree of this PR; the only on-head proof cited is rustfmt and a CI gate still in flight.
Refuted
- Splitting the use group would violate rustfmt import grouping/sorting; refuted because: Diff only moves one symbol to a cfg-gated line above the group; remaining group preserves original member order; rustfmt is format-only and not behavior-affecting.
- Another measure:: symbol in the same import group is also only used under cfg(unix) and this PR should have relocated it too; refuted because: Textual scan of remaining super::measure::{PasteVerdict, Probe, builds_ripr_from_source, check_contradictions, classify_replay, contradiction_outcome, extract_commands, parse_test_result, probe_result, repo_exposure_contradictions, rss_sample} shows each is referenced outside cfg(unix) in this file; moving any would break the non-unix build. PR is complete for this diff.
- A subtler cfg drift (e.g., cfg(unix) on import vs cfg(target_os="linux") on the test) could regress on macOS/BSD CI since Unix != Linux.; refuted because: The diff and existing test both use the same #[cfg(unix)] predicate; on macOS/BSD both branches are active together, so no asymmetry is introduced. This matches the established pattern referenced in the PR body.
Evidence gaps
- ripr sensor failed (exit 2); cargo-test still scheduled-late. No local clippy/test receipt for this exact tree yet.
- cargo-test sensor is scheduled-late; no build lease evidence yet for this change, and ripr failed (exit 2) without a captured reason.
- Model proof intent was rejected by deterministic validation.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY @ aa03737 (exact head, unchanged): required Ripr Rust Small Result pass, Rust gates pass 41m5s, zero threads, MERGEABLE. Local: clippy -p xtask --all-targets zero errors, dx_scoreboard 39/39. droid-review pending is advisory. Merging.
…5462 on main Main landed a9ea661 (fix(xtask): gate linked_target test import on unix, #5462) while this branch was in flight, so the merge carried both the branch's and main's cfg(unix) import and Linux Rust gates failed with E0252. The file is now byte-identical to main; the inherited Windows-host lint this branch had repaired is owned by that landed fix. A second Windows-host-only clippy failure exists on the rebased base (POST_KILL_GROUP_CONFIRM_GRACE dead code from #5461's cfg(unix)-only call graph); it is inherited, outside this lane's diff, and the required Linux gates are unaffected.
Resolves the import conflict with #5462 (unix-gated linked_target import). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CnL536XyT1SgATFgJk1e5f
…5462 on main Main landed a9ea661 (fix(xtask): gate linked_target test import on unix, #5462) while this branch was in flight, so the merge carried both the branch's and main's cfg(unix) import and Linux Rust gates failed with E0252. The file is now byte-identical to main; the inherited Windows-host lint this branch had repaired is owned by that landed fix. A second Windows-host-only clippy failure exists on the rebased base (POST_KILL_GROUP_CONFIRM_GRACE dead code from #5461's cfg(unix)-only call graph); it is inherited, outside this lane's diff, and the required Linux gates are unaffected.
…empty states (#5474) * fix(output): bind machine receipts to their subject and split honest empty states Gate, badge, and gap-ledger machine outputs could each misreport the same repository state they were derived from: - gate-decision.json recorded no subject identity (#5263): no base/head SHA, no input hash, no analyzer version — a stale receipt was byte-indistinguishable from a fresh one. It now carries a subject block (additive, schema_version stays 0.1 per the #1510/#1442 precedent): the writing binary's build identity, per-input sha256 content hashes, and the pr-guidance document's own run_receipt copied verbatim so a pr-ledger's asserted --base/--head can be cross-checked. pr-ledger record now warns when its asserted identity disagrees with that recorded subject. - repo-badge-json rendered '0 actionable'/pass while repo-exposure-json reported actionable gaps with complete repair routes on the same tree (#5261): the badge's canonical_actionable_gap basis consumed the compact classified walk, which zeroes the related-test and observed-value payload the evidence-record predicate reads and approximates activation for several seam kinds. The badge now derives from the same full classified inventory repo-exposure uses, joins the full-repo audit-path disclosure class it factually becomes (flags, help group, progress, cost line), and a cross-format agreement test pins the invariant. - gap-ledger --check-output reported status 'blocked' for a valid Rust check output — the same status malformed input produces (#5264). A clean parse with zero derived records is now 'no_records', with a warning naming how many findings the Python/TypeScript/Perl-only projections skipped; blocked stays reserved for unreadable or malformed input. Goldens: gate-decision.json fixtures re-blessed with the subject block (analyzer_version pinned with a shape check, mirroring the generated_at pin precedent); fixture changelogs carry the reasons. Spec slice: machine-output-subject-honesty.v1. Also repairs an inherited Windows-host clippy failure on the exact base (cfg(unix)-gate the dx-scoreboard linked_target import; verified inherited by stashing the lane diff). Fixes #5261, fixes #5263, fixes #5264. Proof: cargo fmt --check; cargo clippy -p ripr -p xtask --all-targets --locked -- -D warnings; cargo test -p ripr --lib output::gate (107), output::gap_decision_ledger (108), output::pr_evidence_ledger (15), output::format (8), repo_badge agreement tests; cargo xtask goldens check; cargo xtask dogfood (gate-adoption green; generated-pr-ci-review-workflow fails identically on the stashed base — generated workflow byte-identical base vs lane); policy gates: check-no-panic-family, check-process-policy, check-allow-attributes, check-static-language, check-executable-files, check-network-policy, check-lint-policy, markdown-links, check-output-contracts. * reconcile: drop the duplicated linked_target cfg gate, superseded by #5462 on main Main landed a9ea661 (fix(xtask): gate linked_target test import on unix, #5462) while this branch was in flight, so the merge carried both the branch's and main's cfg(unix) import and Linux Rust gates failed with E0252. The file is now byte-identical to main; the inherited Windows-host lint this branch had repaired is owned by that landed fix. A second Windows-host-only clippy failure exists on the rebased base (POST_KILL_GROUP_CONFIRM_GRACE dead code from #5461's cfg(unix)-only call graph); it is inherited, outside this lane's diff, and the required Linux gates are unaffected. * test(progress): repo-badge-json now discloses audit-path cost it charges The #5261 fix moved the seam-native repo badge onto the full classified inventory, which makes it a full-repo audit-path surface. The cli_progress negative control still pinned the old compact-walk expectation; it now asserts the disclosure fires with the cache-backed warm-rerun clause, while the diff-scoped json control keeps pinning absence outside the group. * fix(first-pr): recover a check-output ledger whose route projected no records The #5264 status split changed what first-pr's --check-output bridge sees for a Rust PR: the ledger is now no_records (clean parse, zero derived records) instead of blocked, so the blocked-ledger recovery that regenerates repo-exposure evidence stopped firing and the generated CI foreign-cwd replay lost its next command. first-pr now recovers the same way when the ledger's status is no_records AND its inputs.source_kind is check_output: the route projected nothing for this PR's language, so the regeneration compound runs exactly as for a blocked ledger, with the ledger's own route-coverage warning in the message. no_records from any other source stays a genuine empty result. Discriminating unit test: no_records_check_output_ledger_recovers_through_ regeneration_compound (red with the branch disabled: the selection fell through to a missing review-cards artifact instead of the recovery). * fix(output): review round 1 — full input coverage, honest projections, compared identities Review round on the #5261/#5263/#5264 candidate: - gate subject covers every CLI-supplied decision-changing input (baseline, labels files, calibration, receipts, policy ledgers), adds labels_sha256 for --labels strings, and hashes the pr-guidance and gap-ledger inputs from the exact bytes their readers parsed, so the receipt cannot bind a decision to bytes it never evaluated (Devin, CodeRabbit). Causal artifacts stay outside the block by boundary: they are workspace-durable files that self-identify, not invocation inputs. - pr-ledger record compares asserted revisions only when both sides are SHA-like: origin/main/HEAD (the generated CI spelling) stays silent instead of false-positive mismatching, and a degraded recorded value cannot prefix-agree an asserted SHA. - a non-object entry in a check output's findings array is malformed input (blocked), not an unprojectable finding (no_records). - the seam-native repo badge projects limited (run_status limited_seam_cap, cap named in limited_reason) when the classified inventory was seam-capped, instead of presenting a partial count as a full-scan clean badge; repo-badge-plus formats join the full-repo audit-path disclosure class because their measured path renders the same walk. - OUTPUT_SCHEMA documents the read model, the producer_subject emission condition, and the plus-format disclosure. Goldens re-blessed (subject input coverage) with round-2 reasons in both fixture changelogs. * fix(gate): hash the bytes each decision-affecting reader parsed Review round 2: baseline, labels_json, both calibration files, and the exception policy were parsed by their readers before the subject's fresh hash read, so a mid-run file change could bind the receipt to bytes the decision never consumed. Each reader now reads its file once and records the sha256 of the exact parsed bytes into a ConsumedInputHashes struct the subject consumes; only the warn-only inputs no reader parses (repo_exposure, sarif_policy, agent_verify, agent_receipt) keep the fresh subject-build read, and the output contract states that read model. The exception-policy loader gains a text-based entry point so the gate can hash-then-parse one read; the duplicate missing-file test moved behind the gate-level coverage that already exercises it.
What
Third instance of #5427: #5447/#5299 added a \linked_target\ import in \xtask/src/reports/dx_scoreboard/tests.rs\ whose only use sits inside the #[cfg(unix)]\ test \�_symlinked_target_is_never_cleared. On Windows \cargo clippy -p xtask --all-targets -- -D warnings\ fails with \unused import\ and \cargo xtask precommit\ cannot go green; the Linux gate stays green.
Fix
Same pattern as #5403/#5426: unconditional group keeps the cross-platform items; \linked_target\ moves to a #[cfg(unix)] use super::measure::...\ line.
Proof
Non-goals