fix(automation): keep @opencode-agent mention payloads within GitHub's 10-key limit - #1115
fix(automation): keep @opencode-agent mention payloads within GitHub's 10-key limit#1115seonghobae wants to merge 2 commits into
Conversation
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughOpenCode 디스패치 페이로드 생성을 공통화하고 최상위 키를 10개로 제한합니다. 병합 관련 플래그는 첫 디스패치에서 제거하고 invocation claim과 wrapper 단계에서 고정된 비활성화 값으로 전달합니다. 테스트는 이 계약과 워크플로 동작을 검증합니다. ChangesOpenCode 디스패치 흐름
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The change keeps mention dispatch payloads within GitHub’s 10-key limit and adds fail-closed validation with passing checks; no actionable merge-blocking risk remains after normal review. Sequence Diagram(s)sequenceDiagram
participant agent_mention_router
participant GitHub repository_dispatch
participant OpenCode workflow
participant agent_invocation_claim
participant merge-scheduler wrapper
agent_mention_router->>agent_mention_router: repository_dispatch_body로 페이로드 키 수 검증
agent_mention_router->>GitHub repository_dispatch: 식별 정보와 agent_invocation_key 전달
GitHub repository_dispatch->>OpenCode workflow: 제한된 client_payload 전달
OpenCode workflow->>agent_invocation_claim: 고정된 리뷰 및 병합 설정과 호출 정보 전달
agent_invocation_claim->>merge-scheduler wrapper: 병합 비활성화 설정 전달
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
@coderabbitai review |
|
…y limit @opencode-agent mentions could not enqueue because both the first-hop wrapper payload and the merge-scheduler forwarder sent 14 client_payload keys. GitHub's repository_dispatch API allows 10 and returns HTTP 422. Keep identity on both hops, bind review-only flags in the invocation claim, hardcode those flags in the wrapper, and fail closed if a payload grows past 10 keys. Co-authored-by: Seongho Bae <[email protected]>
8aa06f5 to
730508a
Compare
|
@coderabbitai review |
|
Summary
@opencode-agentmention pings could not enqueue a review. Both mentionrepository_dispatchhops sent a 14-keyclient_payload. GitHub's create-repository-dispatch endpoint allows 10 top-level properties and rejects the rest with HTTP 422.This PR cuts those payloads to ≤10 keys while keeping enough identity for the review dispatch (owner/repo, PR, head SHA, comment id / invocation key). The OpenCode invocation-claim key layout is unchanged: review-only flags stay bound in the SHA-256 claim and are hardcoded in the wrapper.
Payload key counts
agent-mention-opencodemerge-scheduler(mention-forwarder)agent-mention-noemanoema-reviewDropped from the first hop:
trigger_reviews,review_dispatch_limit,enable_auto_merge,update_branches,merge_mode(constants already bound in the invocation claim).Dropped from the merge-scheduler forwarder:
trigger_reviews(scheduler default is true),review_dispatch_limit(scheduler default is 1),requested_agent,requested_by. Kept the three flags that override scheduler defaults (enable_auto_merge=false,update_branches=false,merge_mode=disabled) so a mention cannot merge.Out of scope
review_dispatch_limit=1follow-upVerification
Local quality gate (same command as
agent-mention-router-quality-ci.yml):1120 passed, 16 subtests passed100%(agent_mention_router.py+agent_mention_sweep.py)100%git diff --checkcleanmergeable: MERGEABLEagainstmainContract test
tests/test_agent_mention_dispatch_payload_limit.pyfails if any mentionclient_payloadhas more than 10 keys. Router helperrepository_dispatch_body()fails closed before GitHub can return 422.GitHub docs: Create a repository dispatch event — "The maximum number of top-level properties is 10."
Summary by CodeRabbit
개선 사항
검증