Skip to content

Gate uv.lock against pyproject.toml, and document the uv install path - #5

Merged
jqnatividad merged 2 commits into
dathere:mainfrom
jqnatividad:uv-lockfile-gate
Sep 15, 2026
Merged

jqnatividad merged 2 commits into
dathere:mainfrom
jqnatividad:uv-lockfile-gate

Conversation

@jqnatividad

@jqnatividad jqnatividad commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Rebased onto main now that #4 has merged — this PR is down to its own two commits and four
files.

The problem

uv.lock is committed and kept current, but nothing referenced it: CI and the Dockerfile both
install with pip, no doc mentioned uv, and .roborev.toml excludes the file from adversarial
review. A maintained artifact that nothing watches — and it rotted once already. 4b7a29f found it
pinning a removed dependency and missing nbclient/ipykernel, which would have left notebook
verification with no Jupyter kernel. The symptom would have surfaced far from the cause.

The fix — commit to it rather than leave it invisible

  • New blocking lockfile CI job running uv lock --check. Blocking for the same reason
    ruff check is: it passes today, so keeping it passing costs nothing and there's no backlog to
    grandfather. Its own job rather than a step in test, since the lock doesn't vary by Python
    version (the matrix would check it twice) and the check needs no project install — about 8s in
    practice.
  • README documents uv sync --frozen --extra dev as a supported alternative to pip, so the
    lockfile has acknowledged users.
  • CONTRIBUTING lists the new gate and notes that [tool.*] edits don't invalidate the lock.

--extra dev is load-bearing

The dev toolchain lives in [project.optional-dependencies], which uv does not install by
default, while [dependency-groups] dev holds only respx. Verified against a throwaway
environment:

app runs pytest / ruff / mypy
uv sync --frozen yes no
uv sync --frozen --extra dev yes yes
pip install -e ".[dev]" yes yes

Documenting the bare command would have handed contributors a working app and no way to run the
suite.

Verification

uv lock --check passes at this branch's tip, so this PR's own CI run exercises the lockfile
job it adds — the gate self-tests before it ever guards anything.

🤖 Generated with Claude Code

jqnatividad and others added 2 commits September 15, 2026 08:11
Document that both `pyproject.toml` and `uv.lock` are actively supported and must stay in sync. This adds guidance on `uv lock --check`, explains the CI lockfile gate, and clarifies that `uv sync --frozen --extra dev` is required to install the full contributor toolchain.
uv.lock is committed and kept current, but nothing referenced it: CI and the
Dockerfile both install with pip, no doc mentioned uv, and .roborev.toml
excludes the file from adversarial review. That combination let it rot once
already — 4b7a29f found it pinning a removed dependency and missing
nbclient/ipykernel, which would have left notebook verification with no
Jupyter kernel.

Rather than keep a maintained-but-invisible artifact, commit to it:

- New blocking `lockfile` job running `uv lock --check`. Blocking for the same
  reason `ruff check` is: it passes today, so keeping it passing costs nothing
  and there is no backlog to grandfather. Its own job rather than a step in
  `test`, since the lock does not vary by Python version and the check needs
  no project install.
- README documents `uv sync --frozen --extra dev` as a supported alternative
  to pip. The `--extra dev` is load-bearing: the dev toolchain lives in
  [project.optional-dependencies], which uv does not install by default, while
  [dependency-groups] dev holds only respx. Plain `uv sync --frozen` therefore
  yields a runnable app with no pytest, ruff or mypy — verified against a
  throwaway environment.
- CONTRIBUTING lists the new gate, and notes that [tool.*] edits do not
  invalidate the lock.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jqnatividad
jqnatividad merged commit f55e3bc into dathere:main Sep 15, 2026
5 checks passed
@jqnatividad
jqnatividad deleted the uv-lockfile-gate branch September 15, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant