chore: revert per-push review trigger; drop synchronize from summary#7
Merged
Merged
Conversation
Restores pre-9bc9666 on-demand-only behavior for the PR review caller example. 9bc9666 added auto-runs on every PR push (opened, synchronize, reopened, ready_for_review) bundled into a structured_output fix; that trigger expansion caused token-burn storms downstream — one observed PR had 14 review runs in 24h from repeated pushes, and each review fans out to 30-67 Anthropic API calls. Review now runs only on: - /review comment (optionally /review opus or /review haiku) - needs-review label Summary loses the synchronize trigger (still runs on opened/reopened/ ready_for_review) and gains paths-ignore for docs. Security hardening from 9bc9666 (env-var refactor of get-pr / get-model steps to avoid shell injection in ${{ }} interpolation) is preserved. README updated to match new trigger semantics for both workflows. Downstream callers in LiskHQ/lisk-{backend,web,mobile,infra} need the same change applied to their .github/workflows/claude-pr-*.yml files; this PR fixes the example so future copies don't reintroduce the issue.
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.
Summary
9bc9666behavior):/reviewcomment orneeds-reviewlabel. No more auto-run on every PR push.synchronizefrom the PR summary caller; addpaths-ignorefor docs.Why
Commit
9bc9666("fix: wire review agent findings to aggregator via structured_output") bundled an unrelated trigger expansion into the example caller — switching review from on-demand to running on every PR push (opened, synchronize, reopened, ready_for_review). Downstream callers (LiskHQ/lisk-{backend,web,mobile,infra}) copied this and now burn Anthropic tokens at scale:mobi-186-...) racked up 14 review runs in 24h from repeated pushes alonecancel-in-progressdoesn't refund tokens already spent before cancel, so concurrency limits don't help.What changed
examples/workflows/claude-pr-review-caller.ymlon.pull_request.types:[opened, synchronize, reopened, ready_for_review, labeled]→[labeled]check-trigger.if: removed the auto-trigger branch (opened/synchronize/reopened/ready_for_review); kept thelabeled == needs-reviewand/reviewcomment branches9bc9666(env-var refactor ofget-pr/get-modelsteps to prevent shell injection via${{ }}interpolation)examples/workflows/claude-pr-summary-caller.ymlon.pull_request.types:[opened, synchronize, reopened, ready_for_review]→[opened, reopened, ready_for_review]paths-ignore: ['**/*.md', 'docs/**']to skip doc-only PRsREADME.mdNot in this PR
.github/workflows/claude-pr-{review,summary}.yml) — both areworkflow_callonly, no triggers to fix there.LiskHQ/lisk-{backend,web,mobile,infra}— those need the same change applied per repo. Will follow up.Test plan
python3 -c \"import yaml; yaml.safe_load(open(...))\")needs-reviewlabel, confirm review runs/review, confirm review runs (and/review opus//review haikuroute to the right model)gh run listbaseline; expect Review/Summary counts to drop ~5-10×