Repository navigation
Block on missing refs and commits, and say how to fix them - #153
Merged
Merged
Conversation
This was referenced Oct 11, 2026
nodeselector
marked this pull request as ready for review
October 11, 2026 22:40
There was a problem hiding this comment.
🟡 Changes recommended
Ambiguous SHA failures are reported as definitive absence, and read-only mode incorrectly advertises an automatic fix.
2 open findings
What changed in this PR
Promotes missing action refs and commits to blocking errors with actionable diagnostics.
Changes:
- Adds typed missing-ref errors across GraphQL and REST resolution.
- Renders dedicated terminal titles and remediation.
- Adds command and integration coverage.
| File | Description |
|---|---|
internal/ghapi/errors.go |
Defines the missing-ref error type. |
internal/ghapi/graphql_action_files.go |
Classifies unresolved GraphQL expressions. |
internal/ghapi/rest_fallback.go |
Classifies REST 404/422 responses. |
internal/pipeline/diagnose.go |
Produces blocking findings. |
internal/pipeline/checks/finding.go |
Marks missing-ref findings. |
cmd/gh-actions-lock/format/terminal.go |
Adds specialized terminal output. |
cmd/gh-actions-lock/missing_ref_test.go |
Tests GraphQL and proxy behavior. |
cmd/gh-actions-lock/parity_test.go |
Adds an anonymous transport helper. |
test/scenarios/catalog.yml |
Updates the live missing-commit scenario. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A 404 or 422 for a ref in an existing repository is definitive, but it surfaced only as a reachability warning next to a fixable ref-changed. Report it as a blocking not-pinned finding that names the missing ref.
The terminal labeled a ref that doesn't exist upstream "Not pinned", hid the remediation, and linked the unrelated security-hardening page. It now reads "Ref does not exist" with the remediation and no doc link; the JSON category stays not-pinned.
A full-SHA ref that doesn't exist upstream now reads "commit 7b403c9ec14b does not exist in …". dbot_impostor_blocks asserted main's silent pass; it now expects the blocking not-pinned error. The Go command test covers the SHA case in both GraphQL and proxy mode, since the scenario is token-gated and doesn't guard merge.
nodeselector
force-pushed
the
nodeselector-prerc-2-missing-refs
branch
from
October 11, 2026 22:45
dfcb6af to
5fa4dda
Compare
nodeselector
changed the base branch from
nodeselector-prerc-1-rolled-back-message
to
main
October 11, 2026 22:45
A missing ref shares the fixable not-pinned category, so read-only output offered "re-run to apply fixes" for something a re-run can't fix. The diagnosis also flattened every missing ref into "does not exist", which lost the full-SHA and short-SHA guidance the resolver had.
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.

A ref or pinned commit that doesn't exist now blocks the run. The finding names the ref, or the commit by short SHA, gives it a plain title and says how to fix it.
Part 2 of 6 (#152 → #157). Previous: #152 Next: #154