Skip to content

ci(claude-review): bump pin to f22bf7d + label-gated review + scoped caller permissions#85

Merged
heskew merged 1 commit into
mainfrom
ci/claude-review-hardening
May 19, 2026
Merged

ci(claude-review): bump pin to f22bf7d + label-gated review + scoped caller permissions#85
heskew merged 1 commit into
mainfrom
ci/claude-review-hardening

Conversation

@heskew
Copy link
Copy Markdown
Member

@heskew heskew commented May 19, 2026

Supersedes #84. Clean branch from main with ONLY the Claude work — no gemini-review.yml bump, no gemini-review-debug.yml artifact, no leftover commits from the Gemini iteration sessions.

Pickups from ai-review-prompts main

Catches up oauth's claude-review.yml from 128656e4 to f22bf7d:

Changes

Single-file change to claude-review.yml:

  • Pin: 128656e4f22bf7d.
  • pull_request: types: adds labeled so the claude-review label fires the bot-PR gesture.
  • Caller-side permissions: block at the calling-job level:
jobs:
  review:
    uses: HarperFast/ai-review-prompts/.github/workflows/_claude-review.yml@<sha>
    permissions:
      contents: read
      pull-requests: write
      id-token: write

Union of what the reusable's two jobs (authorize: contents: read; review: contents: read + pull-requests: write + id-token: write) need. Placement at the calling-job level — not workflow-level — per GitHub's canonical pattern.

Empirical verification (from the superseded #84)

Same caller-side pattern was already run on #84's CI:

  • review / authorizepassed (~10s)
  • review / reviewstarted successfully, ran for 34s
  • review / review — bailed at the end with the documented upstream OIDC ref-validation gotcha (workflow-modifying PR — "this is normal and you should ignore this error")

That's proof the permissions pattern gets the workflow past startup and into the reusable's jobs. Once merged, the next non-workflow-modifying PR exercises the full review path normally.

Prerequisite (already applied via gh label create)

  • claude-review label exists on this repo.

Not in this PR (queued separately)

  • gemini-review.yml pin bump — deferred until the Gemini reviewer's reliability issues clear up.
  • Same hardening on harper-pro and harper — will roll after this lands and a non-workflow-modifying PR confirms end-to-end behavior on oauth.

🤖 Generated with Claude Code

…caller permissions

Catches up oauth's claude-review.yml from `128656e4` to `f22bf7d`, picking up
three ai-review-prompts changes:

  - #37: harper/common.md gains "Meta-checks" section + reuse /
    CI hygiene / lockfile drift bullets.
  - #38: label-gated review for bot-authored PRs (`claude-review`
    label as opt-in gesture). Claude-only.
  - #40: the revert of #39's broken workflow-level `permissions: {}`
    (the reusable side is back to a verified-working state).

Caller changes:

  - Pin bumped to `f22bf7d`.
  - `pull_request: types:` adds `labeled` for the bot-PR gesture.
  - Caller-side `permissions:` block at the calling-job level:

      permissions:
        contents: read
        pull-requests: write
        id-token: write

    Union of what the reusable's `authorize` and `review` jobs
    need. Placement at the calling-job level — NOT workflow-level —
    is the documented canonical pattern; workflow-level placement
    caps the reusable's per-job grants below what they need
    (the ai-review-prompts#39 → #40 incident showed this empirically).
    Reference: https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations

Empirical verification:
  - The same caller-side pattern was tried earlier today on
    #84 (now superseded by this PR). CI showed
    `review / authorize` passing in ~10s and `review / review`
    starting cleanly and running for 34s before bailing on the
    upstream OIDC ref-validation gotcha (documented behavior for
    PRs that modify claude-review.yml itself — harmless). That's
    proof the permissions pattern gets the workflow past startup
    and into the reusable's jobs.

NOT in this PR (superseding #84's broader scope):

  - gemini-review.yml pin bump — Gemini reviewer has ongoing
    reliability issues being worked separately; no value in
    dragging its pin along.
  - gemini-review-debug.yml — diagnostic workflow from earlier
    Gemini iteration sessions; lives in branch history but not
    on main, not part of this PR.

Repo-side prerequisite (already applied via `gh label create`):

  - `claude-review` label exists on this repo.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@heskew heskew requested a review from a team as a code owner May 19, 2026 15:10
@github-actions
Copy link
Copy Markdown
Contributor

Reviewed; no blockers found.

@heskew heskew merged commit 1d5033c into main May 19, 2026
9 of 10 checks passed
@heskew heskew deleted the ci/claude-review-hardening branch May 19, 2026 20:16
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.

1 participant