Skip to content

Block on missing refs and commits, and say how to fix them - #153

Merged
nodeselector merged 4 commits into
mainfrom
nodeselector-prerc-2-missing-refs
Oct 11, 2026
Merged

nodeselector merged 4 commits into
mainfrom
nodeselector-prerc-2-missing-refs

Conversation

@nodeselector

@nodeselector nodeselector commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

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

@nodeselector
nodeselector marked this pull request as ready for review October 11, 2026 22:40
@nodeselector
nodeselector requested a review from a team as a code owner October 11, 2026 22:40
Copilot AI balanced review requested due to automatic review settings October 11, 2026 22:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread cmd/gh-actions-lock/format/terminal.go
Comment thread internal/ghapi/graphql_action_files.go
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
nodeselector force-pushed the nodeselector-prerc-2-missing-refs branch from dfcb6af to 5fa4dda Compare October 11, 2026 22:45
@nodeselector
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.
@nodeselector
nodeselector merged commit 12fd6d1 into main Oct 11, 2026
11 checks passed
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.

2 participants