{{ message }}
Repository navigation
--no-narrow skips bare-SHA to tag rewriting - #69
Merged
Merged
Conversation
nodeselector
force-pushed
the
nodeselector-no-narrow-keeps-commit-sha
branch
from
June 26, 2026 19:54
dd1b188 to
e742c63
Compare
There was a problem hiding this comment.
✅ Ready to approve
The behavior change is small and well-covered by new unit + integration tests, with only a minor test-strengthening nit noted.
Note: this review does not count toward required approvals for merging.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Low
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
Previously --no-narrow only suppressed imprecise version refs (v4 → v4.2.1) but unconditionally rewrote bare commit SHAs to their best matching tag. Users migrating from zizmor/SHA-enforcement workflows couldn't adopt the lockfile without disabling those tools first. Now --no-narrow also skips the bare-SHA → tag lookup, letting commit-pinned references pass through unchanged. Closes github-early-access/actions-locked-dependencies#35
nodeselector
force-pushed
the
nodeselector-no-narrow-keeps-commit-sha
branch
from
June 26, 2026 20:14
e742c63 to
d834264
Compare
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.

Why
Users migrating from zizmor or GitHub's commit-SHA enforcement can't easily adopt the lockfile today.
--no-narrowsuppresses imprecise version narrowing (v4 -> v4.2.1), but bare commit SHAs are still unconditionally rewritten to their best matching tag. This forces users to disable their existing SHA-enforcement tooling across every repo before they can onboard -- a painful migration tax.Reported in github-early-access/actions-locked-dependencies#35.
Approach
The bare-SHA block in
narrowDirectDepsnow checksopts.NoNarrowbefore attempting the SHA-to-tag lookup, mirroring the guard that already exists for imprecise version refs. When--no-narrowis set, commit-pinned references pass through unchanged.narrowVerifiedEntriesalready respectedNoNarrow(early-returns nil), so no change needed there.Testing
TestNoNarrow_KeepsBareSHA): verifies that a bare-SHA dep is preserved whenNoNarrowis true, even when a tagger would find a matching tag.fresh_no_narrow_keeps_bare_sha): end-to-end withactions/checkout@<sha>confirming the lockfile key retains the full SHA.Closes github-early-access/actions-locked-dependencies#35