ci: install CI dependencies from hash-pinned locks - #156
Merged
Conversation
Same pattern as trace-registry, trace-tests, trace-spec, agentrust-telemetry and cmcp. Five locks under requirements/, all installed with --require-hashes, which is all-or-nothing: pip refuses if any requirement, transitive included, lacks a hash. The AGT venv needs two of them, and that is the part worth reading. AGT 4.1 declares cryptography>=46.0.7,<49.0 while this runtime requires >=50.0, so the two cannot be resolved together at all; uv refuses. That is exactly why the scanner already lived in its own venv with an unpinned --upgrade --no-deps override. agt.txt is AGT's own resolution, which lands on cryptography 48.0.1, and agt-override.txt lifts it to 50.0.1 inside that venv with --no-deps. Same isolation as before, both halves now pinned. test_governance_tooling_cannot_downgrade_runtime_dependencies asserted on the literal install lines, so it failed on the new shape while the invariant it guards was intact. It now asserts the isolation itself: AGT appears only via its lock, never in the environment holding the package, and a companion test checks the override lock really carries a cryptography at or above 50.0. setuptools is pinned rather than left to the runner, since dropping the --upgrade prefix would otherwise freeze the image's copy and pip-audit flags 79.0.1 for PYSEC-2026-3447. The two installs of dist/*.whl and dist/*.tar.gz are left alone: they install what the job just built. Verified in clean venvs: 564 passed, 2 skipped, and the AGT two-step reproduces 48.0.1 then 50.0.1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbDBXDWWvMFa7c2jGgyq9t
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbDBXDWWvMFa7c2jGgyq9t
The file has mixed line endings in its blob. Rewriting it through a normalizing write turned a 24-line change into a 242-line one, which buries the actual edit. Reapplied byte-precisely against the committed bytes, preserving each line ending as it was. No behaviour change from the previous commit on this branch; only the diff shrinks to what actually changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbDBXDWWvMFa7c2jGgyq9t
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.
Same pattern as agentrust-io/trace-registry#67, trace-tests#101, trace-spec#302, agentrust-telemetry#50 and cmcp#620 — all merged and green.
Five locks under
requirements/, all installed with--require-hashes, which is all-or-nothing: pip refuses if any requirement, transitive included, lacks a hash.The AGT venv needs two locks, and that is the interesting part
AGT 4.1 declares
cryptography>=46.0.7,<49.0. This runtime requires>=50.0. They cannot be resolved together at all — uv says so outright:That is precisely why the scanner already lived in its own venv behind an unpinned
--upgrade --no-deps "cryptography>=50.0". The structure was right; only the pinning was missing.agt.txt— AGT's own resolution, landing on cryptography 48.0.1agt-override.txt— lifts it to 50.0.1 inside that venv with--no-depsVerified end to end: after
agt.txtthe venv reports 48.0.1, after the override 50.0.1. Same isolation as before, both halves now pinned.A test had to move with it
test_governance_tooling_cannot_downgrade_runtime_dependenciesasserted on the literal install lines, so it failed on the new shape while the invariant it guards was completely intact.Rewritten to assert the invariant rather than the text: AGT appears only via its lock, never in the environment holding the package under test. A companion test checks the override lock really carries a
cryptographyat or above 50.0, so the two halves cannot silently drift apart.Also
setuptoolsis pinned rather than left to the runner. Dropping the--upgrade pip setuptoolsprefix would otherwise freeze the image's copy, and pip-audit flags 79.0.1 for PYSEC-2026-3447 — which is exactly what caught me on cmcp#620.dist/*.whlanddist/*.tar.gzinstalls are left alone; they install what the job just built.Verification
Clean venvs: 564 passed, 2 skipped, and the AGT two-step reproduces 48.0.1 then 50.0.1. actionlint clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XbDBXDWWvMFa7c2jGgyq9t