ci: fix uv sync flag and bandit install so CI actually runs#1
Open
abhicris wants to merge 1 commit intocryptuon:mainfrom
Open
ci: fix uv sync flag and bandit install so CI actually runs#1abhicris wants to merge 1 commit intocryptuon:mainfrom
abhicris wants to merge 1 commit intocryptuon:mainfrom
Conversation
The lint/type-check/test jobs call `uv sync --dev`, but polybot declares dev tooling under `[project.optional-dependencies]` (not `[dependency-groups]`), so `--dev` is a no-op and `ruff`/`pytest` never land in the venv. Result: every lint run fails with `error: Failed to spawn: 'ruff'` before a single check executes. Switch those three jobs to `uv sync --extra dev`, matching the pattern already used by `docs.yml` (`uv sync --extra docs`). The security job separately fails with `No virtual environment found; run 'uv venv' to create an environment, or pass '--system'` because `uv pip install bandit` runs before any venv exists. Replace the two-step install+run with `uvx --from bandit bandit ...`, which is purpose-built for one-shot tool invocations and drops the step entirely. Verified locally: uv sync --extra dev # installs ruff 0.14.10, pytest, mypy uv run ruff --version # ruff 0.14.10 (was: failed to spawn) uvx --from bandit bandit # writes bandit-report.json, exit 0 After this PR the jobs will surface their real signal (ruff lint errors, pytest results) rather than masking them behind env setup failures. — [kcolbchain](https://kcolbchain.com) / [Abhishek Krishna](https://abhishekkrishna.com) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Problem
Every CI run on
mainsince v0.1.0 has failed — but not because of real code issues. Two workflow bugs are short-circuiting the jobs before any check actually executes.1.
Lint/Type Check/Testjobs —uv sync --devis a no-opThe workflow runs:
But
pyproject.tomldeclares dev tooling under[project.optional-dependencies]:In modern uv,
--devtargets[dependency-groups]. With[project.optional-dependencies]you need--extra dev. Result:ruff,pytest, andmypynever land in the venv, and every lint run dies with:(See run 24428772293 — and every CI run before it.)
The sibling workflow
.github/workflows/docs.ymlalready uses the correct pattern:uv sync --extra docs. This PR bringsci.ymlin line.2.
Security Scanjob — no venv exists whenuv pip installrunsFails with:
The fix is to drop the two-step install+run and use
uvx, which is purpose-built for one-shot tool invocations and doesn't need a project venv.Fix
ci.yml:uv sync --dev→uv sync --extra devin thelint,type-check, andtestjobs.ci.ymlsecurity job: replaceuv pip install bandit+uv run bandit ...with a singleuvx --from bandit bandit ...step.Diff is 11 lines, one file.
Verification
Locally, against this branch:
Note for maintainers
Once CI actually runs,
ruff checkwill surface real findings (the repo has ~1700 lint errors and 66 files flagged byruff format --check). That's pre-existing — outside the scope of this PR. This PR just removes the infra failures that have been masking them. Consider it a precondition for any lint-cleanup PR that follows.— kcolbchain / Abhishek Krishna