Repository navigation
ci: derive the hashed requirements export at run time instead of gating a committed copy - #21
Merged
Merged
Conversation
…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>
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.
What changed
The
qualityjob verified a committedrequirements.lockagainst a freshuv export --lockedand failed on any difference. That file is derived fromuv.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'suvupdater writesuv.lockand nothing else, so every Dependabot PR in this repository failed thatdiffbefore 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 --checkstays — it is the real check that the lock matches the manifests.$RUNNER_TEMP/requirements.lockand the clean-environment step installs from that path, so the derived export is still exercised end to end.requirements.lockis removed, andREADME.md/CONTRIBUTING.mdnow point atuv.lock, with the export shown as a scratch command rather than a file to keep..gitignoreignoresrequirements.lockso 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 --checkis the assertion, and the export is reproducible from both.Verification
uv lock --checkpasses on this branch.diffempty, 964 lines), so the set of installed packages does not change.qualityjob keeps its 12 steps; the clean-environment requirement path is the only install-path change.