Skip to content

Fix claude-code-review.yml startup_failure: grant actions: read, pin @v2 - #44

Merged
d-morrison merged 2 commits into
mainfrom
fix/claude-code-review-actions-permission
Aug 10, 2026
Merged

Fix claude-code-review.yml startup_failure: grant actions: read, pin @v2#44
d-morrison merged 2 commits into
mainfrom
fix/claude-code-review-actions-permission

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

Summary

  • .github/workflows/claude-code-review.yml's review job was missing actions: read in its permissions: block, so GitHub Actions capped what the reusable workflow's claude-review job (which requests actions: read to let claude-code-action install its github_ci MCP server) could obtain. Every run since Repoint gha reusable workflows to Morrison-Lab/gha #40 repointed this file to Morrison-Lab/gha has failed with conclusion: startup_failure and 0 jobs created, on both pull_request and workflow_dispatch triggers — see the run-level error: "The nested job 'claude-review' is requesting 'actions: read', but is only allowed 'actions: none'."
  • check-links.yml and claude.yml, repointed in the same PR, were unaffected: check-links.yml's callee never requests actions:, and claude.yml's caller already grants actions: write (a superset of read).
  • Also bumped @v1@v2: gha's own CLAUDE.md documents claude-code-review as one of the capabilities pinned at @v2, and its canonical examples/claude-code-review.yml at that tag already carries the identical actions: read line, so this is the same fix either way.

Closes #43.

Test plan

  • Confirmed via the run page for run 31346942434 that the startup failure names the missing actions: read permission.
  • Confirmed Morrison-Lab/gha@v2's examples/claude-code-review.yml includes the identical actions: read line in its caller template.
  • This PR's own pull_request-triggered run of claude-code-review.yml should now reach the claude-review job instead of startup_failure — will verify once CI runs.

Generated by Claude Code

The caller job's permissions block omitted `actions:`, which GitHub
Actions treats as `none` and caps what a reusable workflow's job may
request. Morrison-Lab/gha's claude-code-review.yml `claude-review` job
requests `actions: read` (so claude-code-action can install its
github_ci MCP server), so every run since #40 repointed this file to
Morrison-Lab/gha has failed at startup with "The nested job
'claude-review' is requesting 'actions: read', but is only allowed
'actions: none'." and 0 jobs created.

Also bump @v1 -> @v2: gha's own CLAUDE.md documents claude-code-review
as one of the capabilities pinned at @v2, and its canonical
examples/claude-code-review.yml already carries the same actions: read
line.

Fixes #43.
@d-morrison
d-morrison requested a lite review from Copilot August 10, 2026 01:44

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The prior commit on this branch accidentally base64-encoded the file
content before passing it to the file-write tool, which expects raw
text and handles transport encoding itself. The stored blob was
therefore a giant base64 scalar, not a YAML mapping -- which is why
GitHub reported this workflow as having no workflow_dispatch trigger
(POST .../dispatches 422) and the push-triggered run failed outright
with 0 jobs. This commit replaces it with the actual plaintext YAML.
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Warning

No review ran --- this PR edits .github/workflows/claude-code-review.yml, the review workflow itself.
claude-code-action requires that file to match the default branch, so its token exchange fails until this change merges.
The review is skipped by design, and re-running or re-dispatching will not change that: the skip lifts only if the PR stops editing that file.

require-review reports a gray skipped rather than green.
A green there attests that a reviewer ran, never that one approved; here none ran at all.
Merge on a self-review or a human review instead.

View run

Copy link
Copy Markdown
Collaborator Author

Self-review

The automated review can't run on this PR (it edits claude-code-review.yml itself, so claude-code-action's token exchange 401s until merge — expected, documented behavior, not a bug). Self-reviewing since no external reviewer is reachable:

  • Diff is a single file, one job's permissions: block plus one uses: tag. No other files touched, no behavior change beyond what's described.
  • actions: read matches Morrison-Lab/gha's own canonical examples/claude-code-review.yml at @v2 verbatim (confirmed by fetching that file directly) — this isn't a guess, it's copying the documented-correct caller shape.
  • Verified end-to-end on this branch, not just reasoned about:
    • POST .../claude-code-review.yml/dispatches on this branch now returns 204 (previously 422 Workflow does not have 'workflow_dispatch' trigger', because an earlier commit on this branch had accidentally stored base64-encoded text instead of the YAML — see the second commit's message for that mistake and fix).
    • The resulting run reached and completed the gather-context and claude-review jobs (review / claude-review: success) instead of startup_failure/failure with 0 jobs.
    • referenced_workflows on both runs correctly resolves Morrison-Lab/gha/.github/workflows/claude-code-review.yml@v2 at c05ca95c.
  • No regression risk to other repo workflows: check-links.yml/claude.yml, also pointed at Morrison-Lab/gha since Repoint gha reusable workflows to Morrison-Lab/gha #40, are unaffected and untouched by this PR.
  • Remaining CI (link-checker, check-chars: green; lint/spellcheck/build-deploy: in progress as of this comment) covers the rest of the repo and isn't affected by this change.

Recommend merging on this self-review once the remaining checks finish green — there's nothing here an external LLM reviewer would add beyond what's already verified against real GitHub API responses above.


Generated by Claude Code

d-morrison added a commit to Morrison-Lab/ai-config that referenced this pull request Aug 10, 2026
Hit the already-documented create_or_update_file base64 mistake again
on Morrison-Lab/psw#44, this time producing an inflated size (not a
truncated one) and a different downstream GitHub Actions symptom
(dispatch-time "no workflow_dispatch trigger" plus a generic failure
conclusion, rather than startup_failure). Appends to the existing
bullet rather than duplicating it.
@d-morrison
d-morrison merged commit d9ec400 into main Aug 10, 2026
12 checks passed
@d-morrison
d-morrison deleted the fix/claude-code-review-actions-permission branch August 10, 2026 03:56
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-10 03:58 UTC

d-morrison added a commit to Morrison-Lab/ai-config that referenced this pull request Aug 10, 2026
* memory: confirm permissions-cascade gotcha recurs in Morrison-Lab/psw

Hit the same startup_failure shape this file already documents (a
caller under-granting a permission the nested job requests), this
time actions: read rather than issues: read/write, in
Morrison-Lab/psw's claude-code-review.yml caller. Confirms the pattern
isn't d-morrison/qwt-specific and that a plain WebFetch on the run's
html_url reliably surfaces the Annotations text.

* memory: confirm base64 content-param gotcha with a new symptom

Hit the already-documented create_or_update_file base64 mistake again
on Morrison-Lab/psw#44, this time producing an inflated size (not a
truncated one) and a different downstream GitHub Actions symptom
(dispatch-time "no workflow_dispatch trigger" plus a generic failure
conclusion, rather than startup_failure). Appends to the existing
bullet rather than duplicating it.

* fix: correct false self-reference in github-mcp-tools.md

Review finding: "covered elsewhere in this file" was false --- the
permissions-cascade startup_failure shape is documented in the sibling
file, memories/gha-reusable-workflow-permissions.md, not in this file.
Point at it explicitly, matching this corpus's existing cross-file-link
convention.

* fix: restore github-mcp-tools.md content (accidental placeholder)

The previous commit on this branch replaced this file's entire content
with a literal placeholder string due to a tool-call construction error
--- caught immediately by the response's content.size (21 bytes). This
restores the intended content: the base64-corruption case-record
addition plus the review-requested cross-file-link fix for the false
"covered elsewhere in this file" self-reference.

* memory: note this actions:read gap already happened in ai-config itself

Optional review suggestion: memories/github-actions.md already documents
an identical actions:read omission (same four granted permissions, same
error shape) from ai-config#224, in ai-config itself rather than a
downstream consumer. Cross-link it so the "confirming this isn't
d-morrison/qwt-specific" framing reflects three occurrences, not two.

* memory: a third create_or_update_file content mistake, and a git-push fix

This same session's follow-up correction to the two case records above
sent a literal placeholder string instead of the intended content --- a
plain construction mistake, not an encoding one, caught immediately via
content.size. Record it as a third instance of the family, and note the
generalizable remedy discovered while recovering from it: a local git
clone plus a real `git push` (confirmed working in this session for a
non-harness-assigned branch) avoids the whole class of content-parameter
mistakes, since the pushed content is exactly what git diff/hash-object
show rather than something reconstructed inside a tool-call parameter.

* fix: drop dangling "(the entry above)" cross-reference

Review finding: no earlier entry in this file (or anywhere in the
corpus) documents the git-clone-with-sparse-checkout technique this
parenthetical claimed to point at --- the technique was used earlier
in the same debugging session but never actually written down as its
own bullet. Drop the dangling reference; the command is self-explanatory.

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

claude-code-review.yml fails startup_failure: caller missing actions: read permission

2 participants