Repository navigation
Test: Cover the UV_NO_MODIFY_PATH refusal - #257
ModeSevenIndustrialSolutions merged 1 commit into
Conversation
The 'Refuse an inherited UV_NO_MODIFY_PATH' step had no test, so removing the guard, or letting it accept an empty value, left every job passing. Add a uv-no-modify-path job with three legs: variable unset (the action proceeds), defined as an empty string and defined as '1' (both refused). Each leg runs the action with continue-on-error and fails if the step outcome differs. A refused leg also fails if UV_TOOL_BIN_DIR or UV_PYTHON_INSTALL_DIR is set afterwards: setup-uv always exports both, so their absence shows the action stopped before installing uv. The unset leg requires both to be set, which keeps that probe honest. A control step fails the empty leg if the runner drops the empty definition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The PR path filter skips this workflow-only change, so a branch workflow_dispatch run is needed to validate all three matrix legs, including empty GITHUB_ENV propagation and setup-uv probe exports.
No open issues 🎉
What changed in this PR
Adds regression coverage for the composite action’s UV_NO_MODIFY_PATH refusal introduced in #254, addressing issue #255 without changing the guard.
Changes:
- Adds three matrix cases covering unset, empty, and
'1'values and checking the expected action outcome. - Validates the caller environment and uses setup-uv’s exported variables to check that refused runs stop before uv installation.
- Reuses existing SHA-pinned actions. Actual runner validation remains pending because workflow-only PR changes do not trigger this workflow.
| File | Description |
|---|---|
.github/workflows/testing.yaml |
Adds the refusal-test matrix, environment checks, and outcome assertions. |
Review effort: Balanced
There was a problem hiding this comment.
🤖 Antagonistic review by agent: no line-level findings; the summary below is the verdict.
No concrete defects found in the added refusal coverage. The matrix distinguishes unset, empty, and nonempty values and checks outcomes and installation probes; the reported CI does not include execution of this new job.
Antagonistic round 1 of 3.
Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.
08e9a0a
into
lfreleng-actions:main
Closes #255
Authored by an AI agent; human review required
claude-opus-5.5via GitHub Copilot CLIbf519ff0a3a6e7ad46951926a83c04189e3e54fbprek install -t pre-commit -t commit-msgprek run --files .github/workflows/testing.yamluvx zizmor --persona auditor --offline .github/workflows/testing.yamlgit commit -s (pre-commit and commit-msg hooks incl. gitlint)git log --raw --format=%h bf519ff0a3a6e7ad46951926a83c04189e3e54fb..HEADThe
github-code-monkey-botworkflow opened this pull request.Nobody has merged it; a maintainer must review it first.
Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.
What changed
Adds a
uv-no-modify-pathjob to.github/workflows/testing.yamlcovering theRefuse an inherited UV_NO_MODIFY_PATHstep from #254. Before this change no test exercised the guard, so removing it, or letting it accept an empty value, left every job passing.The job has three matrix legs, and each calls
uses: $/(the self-repository form the other jobs use) withcontinue-on-error: true:UV_NO_MODIFY_PATHunsetsuccessempty''failureone'1'failuresteps.run.outcomedoesn't match the expected outcome.astral-sh/setup-uvruns, it exportsUV_TOOL_BIN_DIR(because the action passestool-bin-dir) andUV_PYTHON_INSTALL_DIRto later steps, whateverUV_NO_MODIFY_PATHis set to (addToolBinToPathandaddPythonDirToPathin itssrc/setup-uv.ts). A refused leg fails if either variable is set after the action. Theunsetleg requires both to be set afterwards, which shows this check can detect a run.emptyleg fail loudly if the runner drops an emptyGITHUB_ENVdefinition, instead of quietly testing the unset case. The same step also checks that neither probe variable was set before the action ran.No new actions are added. The job reuses the SHA-pinned
harden-runnerandcheckoutpins already in this file.Checks run
prek run --files .github/workflows/testing.yaml: every hook passed, including yamllint, actionlint-shellcheck, gha-workflow-linter, aislop, check-github-workflows and the timeout-minutes check.uvx zizmor --persona auditor --offline .github/workflows/testing.yaml: no findings.Points for review
pull_requesttrigger excludes.github/**, so the new job runs only after merge (push tomain) or throughworkflow_dispatch. Please trigger a run on this branch, or check the firstmainrun, to see all three legs pass.GITHUB_ENVlineUV_NO_MODIFY_PATH=defines the variable as an empty string, and step environment reaches the composite action's inner steps. The control step and theunsetleg turn a wrong assumption into a red job, not a false pass.ubuntu-24.04only. The guard is plain bash and doesn't depend on the OS, so a macOS leg adds cost without adding coverage.