Skip to content

ci: derive the hashed requirements export at run time instead of gating a committed copy - #21

Merged
docxology merged 1 commit into
mainfrom
ci/derive-requirements-export-20261103
Nov 3, 2026
Merged

docxology merged 1 commit into
mainfrom
ci/derive-requirements-export-20261103

Conversation

@docxology

Copy link
Copy Markdown
Collaborator

What changed

The quality job verified a committed requirements.lock against a fresh uv export --locked and failed on any difference. That file is derived from uv.lock, so the only thing that can make it differ is someone else writing the lock — which is precisely what a lock-only dependency update does. Dependabot's uv updater writes uv.lock and nothing else, so every Dependabot PR in this repository failed that diff before installing anything; all five that are open today (#16, #17, #18, #19, #20) are blocked by it, and none of them is wrong.

The export is now derived at run time and used, rather than compared against a committed copy:

  • uv lock --check stays — it is the real check that the lock matches the manifests.
  • the export is written to $RUNNER_TEMP/requirements.lock and the clean-environment step installs from that path, so the derived export is still exercised end to end.
  • the committed requirements.lock is removed, and README.md / CONTRIBUTING.md now point at uv.lock, with the export shown as a scratch command rather than a file to keep.
  • .gitignore ignores requirements.lock so an export cannot be committed again.

Scope: no other CI changes, no lockfile edits.

Why the committed file was wrong

It was a second source of truth for the lock, and the gate that validated it could not be satisfied by the only tool that updates the lock. A derived artifact cannot be the thing that validates its own regeneration: the check either passes because no lock-privileged change happened, or fails because one did. The lock itself is the provenance, uv lock --check is the assertion, and the export is reproducible from both.

Verification

  • uv lock --check passes on this branch.
  • The run-time export is byte-identical to the removed committed copy (diff empty, 964 lines), so the set of installed packages does not change.
  • The workflow YAML parses and the quality job keeps its 12 steps; the clean-environment requirement path is the only install-path change.

…ng a committed copy

The quality job compared a committed requirements.lock against a fresh
`uv export --locked` and failed on any difference. That file is derived from
uv.lock, so the only thing that can make it differ is someone else writing the
lock - which is exactly what a lock-only dependency update does. Dependabot's
uv updater writes uv.lock and nothing else, so every Dependabot PR failed the
diff before installing anything.

- derive the export into $RUNNER_TEMP and install the clean environment from it
- keep `uv lock --check`, which is the real provenance check
- drop the committed requirements.lock; point README/CONTRIBUTING at uv.lock
- ignore requirements.lock so an export cannot be committed again

Co-authored-by: factory-droid[bot] <138933558+factory-droid[bot]@users.noreply.github.com>
@docxology
docxology merged commit 708e1c3 into main Nov 3, 2026
6 checks passed
@docxology
docxology deleted the ci/derive-requirements-export-20261103 branch November 3, 2026 03:06
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