ci(bump-callers): wire cloud-code-bot review identity into flagged callers (BE-1814)#32
Conversation
…llers (BE-1814) Story 1.3 of BE-1800: fan out the optional bot-identity wiring the reusable cursor-review.yml gained in Story 1.1 (PR #13) through the caller-bump workflow instead of hand-editing each consumer. - New idempotent helper .github/cursor-review/wire-bot-identity.py injects bot_app_id: ${{ vars.APP_ID }} under with: and BOT_APP_PRIVATE_KEY: ${{ secrets.CLOUD_CODE_BOT_PRIVATE_KEY }} under secrets:, preserving comments/formatting (line-based, not a YAML round-trip). - bump-cursor-review-callers.yml gains a per-caller wire_bot flag (4th field); flagged only for repos that already hold the creds (cloud, mcp-server, comfy-inapp-agent, Comfy-iOS). Others stay github-actions[bot] (non-breaking). - Skip check is now content-based so a wiring-only change still opens a PR. - Unit tests for the helper run under the existing test-cursor-review-scripts CI.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
doing a blind approval since @mattmillerai you're driving this e2e. feel free to re-assign me if you need me to review it
# Conflicts: # .github/workflows/bump-cursor-review-callers.yml
main refactored bump-cursor-review-callers.yml to a JSON caller variable + shared bump-callers.sh while this branch was adding wire_bot support to the old hardcoded-CALLERS version. Re-implement the capability on the new architecture instead of reviving the old one: bump-callers.sh now accepts an optional wire_bot field per caller entry and an optional WIRE_BOT_SCRIPT env (set only by bump-cursor-review-callers.yml, pointing at wire-bot-identity.py), so the identity wiring folds into the same content-equality staging pass as the SHA rewrite.
ELI-5
The cursor-review bot can now post its review under a dedicated cloud-code-bot identity instead of the generic
github-actions[bot](that ability landed in Story 1.1, PR #13). Each consumer repo has to opt in by adding two lines to its thin caller: the app id (bot_app_id) and the paired private key secret. Rather than hand-edit every repo, this teaches the existing caller-bump machinery to add those two lines automatically — but only for the repos that actually hold the cloud-code-bot creds. Repos without the creds are untouched and keep posting asgithub-actions[bot].What & why
Story 1.3 of BE-1800, refit to the existing
cloud-code-botcreds (vars.APP_ID= app 2016716 /secrets.CLOUD_CODE_BOT_PRIVATE_KEY). No new secrets to provision — each consumer maps creds it already has..github/cursor-review/wire-bot-identity.py(new) — idempotently injects into a caller:bot_app_id: ${{ vars.APP_ID }}as the first child ofwith:BOT_APP_PRIVATE_KEY: ${{ secrets.CLOUD_CODE_BOT_PRIVATE_KEY }}undersecrets:It edits only those two anchors (line-based, not a PyYAML round-trip) so the fan-out PR diff is exactly the wiring — the callers' comments, folded
diff_excludes, and SHA-pin lines are preserved byte-for-byte. Already-wired callers are a no-op..github/bump-callers/bump-callers.sh— each caller entry in theCURSOR_REVIEW_CALLERSrepo variable gains an optionalwire_botfield. Whentrue, the caller is piped through the helper alongside the SHA bump (viaWIRE_BOT_SCRIPT, set only bybump-cursor-review-callers.yml— the shared script stays fleet-agnostic, sobump-agents-md-callers.ymlnever sets it). Intended only for repos confirmed to hold the creds:cloud+comfy-cloud-mcp-server— already wired by hand ⇒ injection would be a verified no-op (they still get the SHA bump).comfy-inapp-agent+Comfy-iOS— theircursor-review-auto-label.ymlcallers already usevars.APP_ID+secrets.CLOUD_CODE_BOT_PRIVATE_KEY, so the creds are provisioned. These are the repos this is meant to wire.comfy-local-mcp/ComfySwiftSDK/comfy-infra/ the public OSS repos (no cloud-code-bot creds), and notswarmhost(its own caller comment states the app isn't provisioned there yet).CURSOR_REVIEW_CALLERSvariable does not yet flag any entrywire_bot: true— this PR ships the capability; actually wiring the four repos above needs a follow-upgh variable set(see "How it propagates").Added unit tests (
tests/test_wire_bot_identity.py, 8 cases;test_bump_callers.shgains 4wire_botcases) that run under the existing CI.Non-breaking / incremental: both
bot_app_id(input) andBOT_APP_PRIVATE_KEY(secret) are optional in the reusable workflow — a caller without them keeps posting asgithub-actions[bot].How it propagates
This PR gives the bump script the capability; wiring only lands in a consumer repo once its
CURSOR_REVIEW_CALLERSentry is flagged"wire_bot": trueAND the workflow runs — either on the nextcursor-review.ymlpush, or via a manualworkflow_dispatchafter merge. Recommended sequence after merge:gh variable get CURSOR_REVIEW_CALLERS -R Comfy-Org/github-workflows→ add"wire_bot": trueto thecomfy-inapp-agentandComfy-iOSentries (optionallycloud/comfy-cloud-mcp-servertoo, where it's a no-op).gh variable set CURSOR_REVIEW_CALLERS -R Comfy-Org/github-workflows --body '<updated JSON>'.gh workflow run bump-cursor-review-callers.yml -R Comfy-Org/github-workflowsto propagate immediately.Verification
python3 -m unittest discovergreen across.github/cursor-review/testsand.github/agents-md-integrity/tests.shellcheck -x .github/bump-callers/bump-callers.sh .github/bump-callers/tests/test_bump_callers.shclean.bash .github/bump-callers/tests/test_bump_callers.sh— 86 passed, 0 failed (includes the 4 newwire_botcases: wired end-to-end, not-flagged never wires,WIRE_BOT_SCRIPTunset degrades to SHA-only, already-wired+already-current is a clean skip).Judgment calls
NEW_CONTENT == OLD_CONTENT) that gates the SHA bump, so a wiring-only change on an already-SHA-current caller still stages the file instead of being short-circuited — same intent as the originalgrep -qF "$NEW_SHA"early-skip this replaces, generalized.wire_bot: deliberately conservative — flagged only where creds are provably present (existing wiring or an auto-label caller using the same app).swarmhostexcluded per its own caller's note. A repo that references a missing secret would still degrade safely togithub-actions[bot], but flagging one without the app would be misleading, so it's opt-in per caller.WIRE_BOT_SCRIPTkept fleet-specific:bump-callers.shis shared with the agents-md-integrity fleet, which has no use for bot-identity wiring — onlybump-cursor-review-callers.ymlsets the env var, so a straywire_bot: truein the other fleet's variable degrades to a harmless warning instead of an error.