Skip to content

ci: install CI dependencies from hash-pinned locks - #101

Merged
imran-siddique merged 1 commit into
mainfrom
ci/hash-pinned-pip
Sep 7, 2026
Merged

ci: install CI dependencies from hash-pinned locks#101
imran-siddique merged 1 commit into
mainfrom
ci/hash-pinned-pip

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

Same pattern as agentrust-io/trace-registry#67, which is merged and green.

Every pip install in these workflows resolved whatever PyPI served at that moment. Three locks under requirements/, each compiled from a .in whose header carries the exact regeneration command:

Lock Covers
test.txt [project.dependencies] plus the test extra
docs.txt the docs toolchain
release.txt build

All installed with --require-hashes, which is all-or-nothing: pip refuses if any requirement, transitive included, lacks a hash.

The editable installs use the two-step, since pip cannot hash-pin an editable install in the same invocation:

pip install --require-hashes -r requirements/test.txt
pip install --no-deps -e .

Locks are universal and compiled against 3.11, the floor in requires-python, so they hold across the whole 3.11/3.12/3.13 matrix rather than only the version they were generated on.

Verification

Clean venv: the lock installs under --require-hashes, the editable install follows, and the full suite passes — 629 passed, 5 xpassed. actionlint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XbDBXDWWvMFa7c2jGgyq9t

Same pattern as trace-registry. Every pip install in these workflows
resolved whatever PyPI served at that moment, which is what Scorecard's
pipCommand-not-pinned findings are.

Three locks under requirements/, each compiled from a .in whose header
carries the exact regeneration command, all installed with
--require-hashes. That flag is all-or-nothing: pip refuses if any
requirement, transitive included, lacks a hash.

The editable installs use the two-step. pip cannot hash-pin an editable
install in the same invocation, so third-party dependencies come from the
lock first and the local package goes in with --no-deps, leaving nothing
to resolve.

Locks are universal rather than platform-specific and compiled against
3.11, the floor in requires-python, so they hold across the whole
3.11/3.12/3.13 matrix.

Verified in a clean venv: the lock installs under --require-hashes and
the full suite passes, 629 passed and 5 xpassed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbDBXDWWvMFa7c2jGgyq9t
@imran-siddique
imran-siddique requested a review from a team as a code owner September 7, 2026 00:41
@imran-siddique
imran-siddique merged commit ca49b6d into main Sep 7, 2026
8 checks passed
@imran-siddique
imran-siddique deleted the ci/hash-pinned-pip branch September 7, 2026 00:45
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