Move the Claude workflows to the shared composite actions - #7
Merged
Merged
Conversation
|
This broke my eyes...I'm not sure if this is something I need to
understand?....help😫
…On Sat, Sep 19, 2026 at 1:14 PM Jason Antman ***@***.***> wrote:
Why
These workflows are near-identical in intent across ten repositories and
had
drifted into three different generations. The worst of it is that a
*broken run here looks exactly like a quiet one*: the action denies a
tool call, the agent
improvises around the gap, ends its turn and exits 0. With display_report
off,
the only evidence is a permission_denials_count in a streamed result
object
that never reaches the log.
That is how /code-review:code-review could run without reviewing anything
— it
is a *Skill*, and Skill was missing from the allowlist.
What this does
claude-pr-review.yml is now *byte-identical across all ten repositories*.
claude-mention.yml differs only in its if: guard (public vs private) and
one
branch name in a comment.
before after
Review allowlist no Skill/Task/Write in some repos
Skill,Task,Write,TodoWrite + blanket Bash
Bash enumerated per repo, silently starving subagents allowed outright
Logging display_report off in some repos on, + transcript/session artifact
Findings --comment: N loose inline comments *one* GitHub review, findings
batched inline
Cost/duration nowhere job summary *and* the review footer
A denied tool green check *fails the check*
CI results not readable mcp__github_ci__* + actions: read
Fork PRs action fails red (no secrets) skipped cleanly
The agent no longer posts to GitHub at all. It writes findings to a JSON
file
and a later step turns them into a single POST /pulls/N/reviews. A run
that
decides to *skip* still posts a one-line review, because a skip that
should not
have happened is otherwise invisible. The review comes from
github-actions[bot] (the action revokes its own App token first), so the
body
opens with an explicit attribution line and carries a hidden
<!-- claude-code-review --> marker that later runs use to find it.
There are fallbacks for the ways this can go wrong: a findings file that is
missing or the wrong shape posts the agent's raw final message and then
fails;
a batched review GitHub rejects with a 422 is retried once with the
findings
folded into the body; a body over 60 KB is trimmed with a pointer to the
artifact.
|
Replaces both workflows with thin callers of jantman/github-actions-workflows, pinned at `@v1`, which now holds the logic ten repositories would otherwise hold ten copies of. The behaviour is the one that has been reviewing pull requests on jantman/privatepuppet and jantman/biweeklybudget: the agent writes its findings to a JSON file and the action turns them into exactly one GitHub review, with the findings as batched inline comments and the run's duration, turn count and cost in the body. A run that decides to skip still posts a one-line review. A denied tool call, an `is_error` result, or an agent that ends its turn without writing the findings file all fail the check rather than passing quietly -- which is how these runs used to go green having reviewed nothing. Composite actions rather than reusable workflows, deliberately. The action's default-branch validation happens server-side at api.anthropic.com from OIDC claims, and nothing in claude-code-action's source says whether it reads `workflow_ref` (the caller) or `job_workflow_ref` (the shared repo). With `workflow_call` that unknown decides whether it works at all. A composite action never asks it: it runs as part of this job, so the workflow being validated is this repository's own file, exactly as before. What stays here, because a composite action cannot reach it -- by the time one runs, the runner is up and the token is minted: - the triggers, `concurrency` and `permissions` - the fork guard on the review job: a fork pull request gets no secrets, so without it the action fails red on someone else's contribution - `actions/checkout`, so this repository keeps control of fetch-depth - the trigger guard on the mention job Pinned to `@v1`, a moving tag. Moving it updates all ten repositories at once, which is the point and also the risk; pin a SHA instead to take updates deliberately. Checked with actionlint. Because this repository is public, the mention workflow additionally requires the triggering author's `author_association` to be OWNER, MEMBER or COLLABORATOR. That job has `contents: write` and blanket `Bash`, so without the check any passer-by who types the mention gets an agent run billed to the maintainer's account. The field is read per-event on purpose: on `issue_comment`, `github.event.issue.author_association` describes the issue's opener rather than the commenter, so reading it there would let a stranger trigger a run merely by commenting on a maintainer's own issue. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jantman
force-pushed
the
claude/unify-review-workflows
branch
from
September 19, 2026 18:25
ec61d6d to
2920c25
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.
Both workflows become thin callers pinned at
@v1:Proven before this landed here
This is the same action that now reviews pull requests on jantman/privatepuppet —
verified posting a real review on jantman/privatepuppet#45 (
🔎 5m 5s · 14 turns · $1.3644), correctly scoped to only the commits pushed since its last review.What changes
Skill/Task/WriteSkill,Task,Write,TodoWrite+ blanketBashBashdisplay_reportoff in several repos--comment: N loose inline commentsmcp__github_ci__*+actions: read@v1Why composite, not
workflow_callclaude-code-action's default-branch validation runs server-side at
api.anthropic.com from OIDC claims, and nothing in the action's source says whether it
reads
workflow_ref(the caller — fine) orjob_workflow_ref(the shared repo — alwaysfails). With
workflow_callthat unknown decides whether it works at all. A compositeaction never asks the question: it runs as part of this job, so the workflow being
validated is this repo's own file, exactly as before.
What stays here
A composite action can't reach these — by the time one runs the runner is up and the
token is minted: triggers,
concurrency,permissions, the fork guard, the triggerguard, and
actions/checkout.It changes
.github/workflows/, so claude-code-action's validation guard fires andclaude-reviewgoes green having done nothing. Look forExiting due to workflow validation skip. The real test is the first PR opened here after this merges.claude-mention.ymlis stricter still:issue_commentworkflows always run from thedefault branch, so the mention path does nothing until this is merged.
🤖 Generated with Claude Code