ci(agentsight): use uv tool install for diff-cover#1168
Merged
Conversation
Aligns with sec-core job: pip install --break-system-packages left the diff-cover wrapper outside PATH on some runner states, causing an intermittent "command not found" that failed the coverage gate as a false negative.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the agentsight CI job's diff-cover installation from
pip install --break-system-packages diff-covertouv tool install --force diff-cover, matching the existing stable pattern in the agent-sec-core job.Problem
The agentsight
Incremental coverage gatestep intermittently fails with:Root cause:
pip install --break-system-packages diff-coverinstalls the package into the user site-packages, but thediff-coverexecutable wrapper lands in~/.local/bin, which is not reliably on PATH on the self-hosted runner. The|| GATE_FAILED=truefallback then reports a false-negative coverage failure — the gate fails not because coverage is below 80%, but because the tool cannot be found. This blocked #661 twice.Fix
Align with the agent-sec-core job (ci.yaml lines 300-315), which has used this pattern stably:
astral-sh/setup-uv@v8.0.0step (withpython-version: 3.11.6) — setup-uv ensures the uv-managed bin directory is on PATH.uv tool install --force diff-cover— uv installs into an isolated venv and places the wrapper in a PATH-guaranteed bin dir.Verification
uv tool install --force diff-cover+ barediff-cover --version~/.local/bin/diff-cover)python3 scripts/check-arch-boundaries.pyunaffected by setup-uvpython3after setup-uv without issue; setup-uv does not override systempython3What is NOT changed
if: github.event_name == pull_requestguard on the install step is preserved (sec-core installs unconditionally; agentsight only needs it on PRs — slightly more efficient, no behavior change for the gate).--ignore-filename-regex, or the gate logic itself.Test plan
Incremental coverage gatestep (the very step this fixes)diff-cover: command not foundflake should be gone