Repository navigation
fix(tests): keep coverage profiles out of wheel fixture history - #7423
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Summary by CodeRabbit
WalkthroughThe wheel-routing fixture now copies and stages selected inputs, stages tracked updates without adding untracked files, and forwards ChangesWheel fixture coverage and staging
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The fixture keeps intended changes in Git history, leaves untracked coverage outputs on disk, and forwards profile configuration to child processes. No actionable merge blocker was identified. Pre-merge checks |
|
|
Exact-head handoff ready for independent review:731dc35fa96bf58a23b77212f760eb2c521597ed/tree6b44efb0a2b1715f66f7c0a45dd879cdf400388c, parent6bd224b5ee898092a671cb10a2d2ee66b3609057. Original landed-base real-instrumentation RED reproduced with accidental default_…profraw in immutable fixture Git history; normal baseline7/7 passed. Deterministic new regression observed RED before repair, with both profile and arbitrary unrequested file admitted. Published head: normal12/12 and instrumented12/12 PASS. Measured processes retain LLVM_PROFILE_FILE; fresh collection57 nonempty profiles, LLVM merge0, LCOV export0 with fixture source included. Exact-head package all-target Clippy/fmt/diff0; process-policy passed coherent prepublication source tree without exception. Actual merge-base and full Git path assertions retained, no filename filtering/ignore/suppression; intentional new paths still tracked and profile/unrequested files remain on disk. Only test fixture + changelog changed. Executor health was independently verified after reported disconnect; retained instrumented session completed exit0 and remote draft state/head reconciled. No active command remains. Full workspace Coverage CI and independent source review remain pending; no Ready/merge and no main-job cancellation. |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- tools/repo-policy/tests/python_wheel_workflow.rs:389 —
LEDGERin the new test body is the sameLEDGERconstant from the existing test group; spelling the intended files as a duplicatedformat!is correct but the copied "coverage bytes must remain available" payload is a copy-paste smell. Replace with a fixture-local constant to avoid drift.
Verification questions
- Confirm lLVM_PROFILE_FILE passthrough is exercised only when the host sets the var; the test silently no-ops under normal
cargo testand is covered only by instrumented runs. That matches the PR claim boundary but means the propagation path is not asserted in the always-on matrix. - Confirm lLVM_PROFILE_FILE is now propagated to measured subprocesses through Fixture::command, but only when instrumentation is active (env var present); assertion in new test verifies child sees the same encoded bytes and that default_*.profraw / unrelated unrequested.txt stay on disk and out of history.
Refuted
Fixture::changeaddinggit add -- <path>before commit could accidentally re-stage stray tracked files via path collision; refuted because:git add -- <path>only operates on the literal path argument; path is supplied by caller asintentional.rsorLEDGER, no glob/--all used; --update on commit() still won't pick up unrelated untracked files.- The new regression is tautological and would pass even if commit() reverted to
git add --all, because the profraw and unrequested.txt are never staged so they would not appear in the diff either way.; refuted because: change() was extended withgit add -- <path>, so the ledger and intentional.rs are explicitly staged; if commit() regressed to --all, those intentionally-staged paths would still be the only additions, but more importantly the diff assertion checks exact equality of--name-onlyoutput against the two intended paths. A--allregression would still be caught if any other untracked file existed, but the new profraw+unrequested.txt written into the working tree right before the second change() would NOT be committed by --all in this sequence either since they are untracked. So the test as written would NOT actually catch a --all regression here. The test does, however, catch a regression in change() losing the explicitgit add -- <path>(it would still pass via the prior --all on the previously committed content, but the new path wouldn't show up). The real protection is the staged-explicit-inputs + untracked-on-disk invariant pair, not the diff exactness alone. - Allocation-failure in to_vec/add or env propagation returns recoverable fallback, producing silent loss of coverage profile or staged paths.; refuted because: The change uses Vec::extend plus fixture.git which returns Result; no Box::from conversions are introduced or relevant. Failure surfaces as Err via TestResult, not as silent fallback. Diff does not touch allocation-failure paths.
- Adding a new
inputslocal plus a secondgit addin new() and switching commit() to--updateviolates smallest-complete-fix by introducing extra staging surface.; refuted because: Staging happens at exactly the two natural entry points (initial fixture, intentional change); commit() now only commits already-staged intent. No filename filter or ignore rule added; no policy/workflow change. The surface area added is the minimum needed to satisfy the merge-base assertion without filename filtering.
Parked follow-ups
- Profile path collision: regression writes
default_regression.profrawbut the original RED repro produceddefault_1288539452804724987_0_92731.profraw(PID/timestamp). The static name in the test will not collide with cargo's instrumentation naming, so the test is stable but is not exercising the exact original failure artifact.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent exact-head review: no substantive blocker found at731dc35fa96bf58a23b77212f760eb2c521597ed, tree6b44efb0a2b1715f66f7c0a45dd879cdf400388c, parent/base6bd224b5. Candidate identity verified before/after testing. Scope is the two-file fixture/changelog repair; analyzer, wheel runtime, workflows and gates are unchanged.
Normal and real -Cinstrument-coverage python_wheel_workflow suites each pass12/12. An independent staging control passes normally and instrumented: explicit new input, tracked modification and tracked deletion are recorded exactly; an unrequested nested profile and unrelated file remain untracked and intact. Restoring Fixture::commit to add --all makes the regression fail101 with BOTH accidental paths in the exact diff, so this is not a filename filter or weakened path assertion.
Coverage is measured, not merely tolerated. Matching Rust1.95/LLVM22.1.2 tools merge58 fresh nonempty final profiles and export LCOV including fixture source without warnings. Exported counts show42 executions of repo_policy::python_wheel::command in the actual instrumented child and531 Fixture::command calls. Removing only LLVM_PROFILE_FILE forwarding in an isolated experiment fails the environment controls and reduces measured child-command coverage to0 while11 other tests still pass. Restoring the submitted source returns pristine instrumented12/12. Experimental edits stayed in the review-owned tree; submitted candidate unchanged.
The original Coverage job114636587184 is confirmed to have failed the merge-base path assertion with default_...profraw beside the ledger. Current main80094e5b advances the base without changing the affected package/workflow/Cargo inputs; read-only composition is conflict-free and the isolated combination's narrow normal suite passes12/12. No unrelated broad validation or #7409 analyzer work is reopened.
This supports bounded source clearance and package-scoped instrumentation repair. Full workspace Coverage and current required hosted CI remain separate qualification; no Ready, merge, release or unchanged runtime/package readiness is claimed.
|
Current-main integration identity reconciled without candidate rewrite: frozen main4d0895ba0eab38ea360f6d8ed4b25fb432c25638 +candidate731dc35fa96bf58a23b77212f760eb2c521597ed produce conflict-free full tree01dfb2c48f48f9533f3a095b9aa608761e96e25b. Entire affected tools/repo-policy treeb06613a0434aae59cf64696f18e764f65d4d70fb, Cargo manifest/lock/toolchain/config, Coverage and wheel workflow blobs exactly match reviewed/instrumented candidate; no affected check rerun needed for unchanged inputs. Coverage admission investigation: fresh read remains draft, labels empty; exact-head Coverage38197353496 is completed/skipped, and all-event exact-SHA lookup finds no additional Coverage run. Ready alone does not trigger coverage.yml (ready_for_review is absent); PR job requires coverage/full-ci. Supported narrow nonpublishing admission is existing coverage label -> labeled event, executable even on draft. Existing manual workflow_dispatch on candidate branch is also supported by workflow. An unchanged rerun would retain false admission. No label/dispatch/rerun/Ready action executed by this lane; parent owns that action and no duplicate is queued. Full-workspace result remains unestablished until admitted and completed. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Summary
Coverage instrumentation writes profiles while the wheel-routing fixture runs real policy subprocesses.
git add --alladmitted those outputs to fixture history, so the exact merge-base path assertion failed with a.profrawpath beside the ledger. Stage the explicit copied fixture inputs and intentional new paths, then commit tracked updates only. PreserveLLVM_PROFILE_FILEunchanged in measured child processes.Swarm / Source Boundary
Source-of-truth Links
Governing claim: postmerge Coverage run38195323754/job114636587184 on d6aa97f; related wheel CI umbrella #4987. Acceptance: profiles stay collectible on disk without entering fixture Git history; actual merge-base and full path assertions remain intact.
Candidate Relationships
Branch: fix/wheel-fixture-coverage-history. Base6bd224b5ee898092a671cb10a2d2ee66b3609057 includes merged #7420. That active file owner completed before this repair; no competing draft replaces it.
Scope
Only
Fixture::new,command,commit,change, one regression and a changelog fragment. The regression requires both intended ledger/new input paths, refuses accidental profile and unrelated unrequested tracking, retains both files on disk and checks profile-setting propagation when instrumentation is active. No filename filtering or broad ignore rule.Support-tier Impact
None; public behavior/output unchanged.
Policy Impact
No policy/workflow/allowance change. Existing process helper remains the authority; process-policy passed without exceptions.
Proof
Baseline real
RUSTFLAGS=-Cinstrument-coveragetest exited101 withdefault_1288539452804724987_0_92731.profrawplus the ledger; baseline normal7/7 passed. New deterministic regression observed behavioral RED with both accidental files tracked. Repaired normal and instrumented suites12/12 passed. Matching LLVM tools merged profiles and exported LCOV successfully; measured subprocess coverage setting is preserved. Strict repo-policy all-target Clippy, formatting/diff and process-policy passed before publication.Published head731dc35fa96bf58a23b77212f760eb2c521597ed, tree6b44efb0a2b1715f66f7c0a45dd879cdf400388c, parent6bd224b5ee898092a671cb10a2d2ee66b3609057. Actual object fetched and tree/parent verified. Fresh published-head normal and instrumented suites12/12 each passed. A clean profile directory contains57 nonempty actual profiles; matching LLVM tools merge and LCOV export both exit0 and emit1789205-byte LCOV containing the fixture source. Exact published-head package all-target Clippy, fmt and diff native exits0. Process-policy passed on the same coherent source tree before publication; no allowance change. No active command remains. Independent source review5486262270 cleared this exact head. Full hosted workspace/all-features Coverage run38200010242/job114651109383 passed, including the previously failing test. Its actual PR merge checkout
c8a3c9cbd…combines candidate731dc35 with base6bd224b; it is distinct from the newer-main4d0895 combined tree01dfb2c48f48f9533f3a095b9aa608761e96e25b, whose affected package/Cargo/workflow identities match the reviewed source. Full-workspace coverage is established on the hosted old-base checkout, not rerun on that newer tree. Retained LCOV artifact11726300802:3417467bytes, GitHub digest4533e8dd90c596b760bbb1b6e840a3b41c180c7e2a6a838badba9d66da5ca64f.Claim Boundary
Fixes fixture-history contamination under coverage; does not classify this as an analyzer regression or qualify unchanged release/package/runtime behavior.
Rollback
Revert the two-file test-only patch; no migration or security-setting change.
Spec-Test-Code Traceability
Tests: fixture_commits_preserve_untracked_profiles_and_track_intended_inputs and unchanged main_drift_and_independent_matching_edits_use_the_merge_base. Code: existing Fixture owner. Changelog disposition: changelog.d/4987-wheel-fixture-coverage.md follows Fixed section/bullet/trailing #4987 convention.
Static Language Check
No static exposure claims.
CI Economics
No workflow, runner, gate, upload or protection changes. Restores existing Coverage test execution and profile collection; package-scoped instrumentation is the local discriminator. The existing coverage label admitted the successful full-workspace hosted qualification; no workflow or readiness bypass was added.
Engineering Check
No production changes or new dependencies, launcher APIs, network/JSON/schema surface. Existing test assertion style and process allowance retained.
Gates
Package normal/instrumented12-test suites and profile merge/LCOV export; strict package Clippy, formatting, diff and process-policy as recorded above. Independent exact-head source review and full hosted Coverage passed. Fresh PR metadata confirms Ready (
draft=false) after the parent transition at04:18:45UTC. Tracker owns required validation; its terminal result remains pending. No merge or release claim.