From c549cd86b86b0dd74eabcd5314a0e5d60d2cf2cb Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Tue, 5 May 2026 18:26:52 -0700 Subject: [PATCH] ci(claude): pass ai-review-prompts-ref explicitly from caller The reusable's auto-derive of the called-workflow ref doesn't work: in a workflow_call context, github.workflow_ref resolves to the CALLER's ref (e.g. refs/pull/72/merge), not the called workflow's ref. The reusable then tries to check out HarperFast/ai-review-prompts at refs/pull/72/merge and fails: "couldn't find remote ref". Until GitHub exposes the called-workflow ref to reusables, the caller passes the SHA explicitly via the existing ai-review-prompts-ref input (already supported as an override). The pin lives in two places now, but they bump together. Followup: HarperFast/ai-review-prompts will drop the broken auto-derive once both callers (oauth + harper) are passing the input explicitly. --- .github/workflows/claude-review.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml index db48393..986efab 100644 --- a/.github/workflows/claude-review.yml +++ b/.github/workflows/claude-review.yml @@ -26,6 +26,18 @@ jobs: review: uses: HarperFast/ai-review-prompts/.github/workflows/_claude-review.yml@0a5ccbc6daf746472be16ac6cea0a96277bf38e4 # main 2026-05-05 (incl. resolution-status sharpening + honest allowlist comment + reusable workflow) with: + # Pass the same SHA the `uses:` ref above is pinned to. The reusable + # uses this to check out HarperFast/ai-review-prompts (for layer + # files + bash scripts) at the SAME ref as the workflow logic + # itself — keeps the upgrade motion atomic (bump the pin in both + # places at once). + # + # We can't auto-derive this in the reusable: in a `workflow_call` + # context, `github.workflow_ref` resolves to the CALLER's ref + # (e.g. `refs/pull/72/merge`), not the called workflow's ref. + # Until GitHub exposes the called-workflow ref to reusables, the + # caller has to pass it explicitly. + ai-review-prompts-ref: 0a5ccbc6daf746472be16ac6cea0a96277bf38e4 review-layers: | universal harper/common