claude-code-review.yml: add a claude-debug label to skip the cost gate - #64
claude-code-review.yml: add a claude-debug label to skip the cost gate#64jnasbyupgrade wants to merge 1 commit into
Conversation
Debugging why the paid review isn't behaving as expected (e.g. the missing --comment flag that silently swallowed every review before Postgres-Extensions#57) previously meant either waiting 5-20+ min per iteration for the cost gate to clear, or hand-editing the workflow just to see the raw transcript. Adding the "claude-debug" label to a PR now (a) skips the cost gate entirely, and (b) sets show_full_output: true so the full raw Claude Code JSON transcript, including tool results, lands in the job log. The label is checked live via `gh pr view` rather than the static event payload, so adding it and clicking "Re-run jobs" picks it up without a new push. `labeled` is added as a trigger type so applying the label alone kicks off a fresh run; the job's `if:` scopes that to only the claude-debug label itself, so tagging a PR with anything else doesn't trigger another paid review.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| # push/re-run needed. Scoped in the job's `if:` below to only actually | ||
| # proceed when the label added IS claude-debug -- otherwise every | ||
| # unrelated label added to a PR would trigger another paid review. | ||
| types: [opened, synchronize, reopened, ready_for_review, labeled] | ||
|
|
||
| concurrency: | ||
| group: claude-review-${{ github.event.pull_request.number }} |
There was a problem hiding this comment.
Bug: adding labeled here can silently cancel an in-progress review with nothing replacing it.
The workflow-level concurrency block just below (group: claude-review-${{ github.event.pull_request.number }}, cancel-in-progress: true on the next line) is unchanged by this PR and is keyed only on the PR number. on.pull_request_target.types has no way to filter by which label was added — that filtering only happens in the job's if: (line 42). So labeled fires a new workflow run for any label, not just claude-debug.
Concurrency cancellation is resolved at run-creation time, before job-level if: conditions are evaluated. So the sequence: a review is running (triggered by synchronize) → a maintainer adds an unrelated label (e.g. documentation) → GitHub creates a new run in the same concurrency group → the in-progress review is cancelled → the new run's claude-review job is then skipped by the if: (since the label isn't claude-debug) → no review ever posts for that push, and nothing automatically retriggers it.
Before this PR, labeled wasn't a trigger at all, so this failure mode didn't exist. A fix would need to keep non-claude-debug labeled events out of the shared concurrency group (e.g. fold github.event.label.name into the group key for labeled events), rather than relying solely on the job-level if: to no-op them.
cat_tools/.github/workflows/claude-code-review.yml
Lines 18 to 24 in 59581e0
Debugging why the paid review isn't behaving as expected (e.g. the missing
--commentflag that silently swallowed every review before #57, or the missing inline-comment--allowedToolsflag before #62) previously meant either waiting 5-20+ min per iteration for the cost gate to clear, or hand-editing the workflow just to see the raw transcript.Adding the
claude-debuglabel to a PR now (a) skips the cost gate entirely, and (b) setsshow_full_output: trueso the full raw Claude Code JSON transcript, including tool results, lands in the job log. The label is checked live viagh pr viewrather than the static event payload, so adding it and clicking "Re-run jobs" on an existing run picks it up without a new push.labeledis added as a trigger type so applying the label alone kicks off a fresh run with no push/re-run needed; the job'sif:scopes that to only theclaude-debuglabel itself, so tagging a PR with anything else doesn't trigger another paid review.Created the
claude-debuglabel on the repo as part of this.