Skip to content

fix(agent-mention): respect repository dispatch payload limit - #826

Closed
seonghobae wants to merge 5 commits into
mainfrom
fix/agent-mention-dispatch-payload-limit
Closed

fix(agent-mention): respect repository dispatch payload limit#826
seonghobae wants to merge 5 commits into
mainfrom
fix/agent-mention-dispatch-payload-limit

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Root cause

The failing route-local-agent-mention job attempted to POST an agent-mention-opencode repository_dispatch whose client_payload contained 14 top-level properties. GitHub rejects repository-dispatch client payloads with more than 10 top-level properties, producing HTTP 422 before the OpenCode wrapper can run.

Fix

  • add a regression contract that caps the OpenCode wrapper payload at GitHub's ten-property limit;
  • group the five review-control fields under a single validated review_policy object, reducing the first dispatch from 14 top-level properties to 10 without weakening the invocation-key binding;
  • update the OpenCode wrapper to read the nested policy;
  • forward only the ten fields consumed by the generic merge scheduler, omitting wrapper-only provenance already validated and durably claimed before forwarding;
  • record the repair in CHANGELOG.md.

The production merge scheduler remains unchanged and continues to receive its existing top-level control fields. No token, permission, approval, merge, or review policy is weakened.

Fixes the HTTP 422 observed in Actions run 31183770526, job 92883146832.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 75bc0201-afc1-4a80-8071-5e6ebcbea5e2

📥 Commits

Reviewing files that changed from the base of the PR and between 1131b1b and c4e1119.

📒 Files selected for processing (5)
  • .github/workflows/agent-mention-opencode-dispatch.yml
  • CHANGELOG.md
  • scripts/ci/agent_mention_router.py
  • tests/test_agent_mention_repository_dispatch_limit.py
  • tests/test_agent_mention_router.py

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae enabled auto-merge (squash) August 7, 2026 13:47

Copy link
Copy Markdown
Contributor Author

Exact-current-head automated review request for c4e11196fcb85bff3c37905d81521ef7d64d5185 against protected main 1131b1bbafb24e455fc8619cdf316813e8721861.

The predecessor head exposed one deterministic contract drift after review-control fields moved under client_payload.review_policy; that stale assertion is repaired on this head. Agent Mention Router Quality CI is now successful, and current-head security/supply-chain checks are successful or still running; no predecessor result is being reused.

@coderabbitai review

Review only. Do not mutate the branch, merge, or infer approval from predecessor-head evidence.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

@seonghobae I will review the current head only. I will not mutate the branch, merge the PR, or use predecessor-head evidence as approval.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review review

Exact-current-head review only for c4e11196fcb85bff3c37905d81521ef7d64d5185 against protected main 1131b1bbafb24e455fc8619cdf316813e8721861. The deterministic nested-policy assertion drift is repaired and the exact-head Agent Mention Router Quality CI is successful. Do not mutate the branch, merge, synthesize approval, or reuse predecessor-head evidence.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for c4e11196fcb85bff3c37905d81521ef7d64d5185.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: agent-mention-opencode-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: agent-mention-opencode-dispatch.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["CI script: agent_mention_router.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: agent_mention_router.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (2 files)"]
  R4 --> V4["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: c4e11196fcb85bff3c37905d81521ef7d64d5185
  • Workflow run: 31187893261
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for c4e11196fcb85bff3c37905d81521ef7d64d5185.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: agent-mention-opencode-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: agent-mention-opencode-dispatch.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["CI script: agent_mention_router.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: agent_mention_router.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (2 files)"]
  R4 --> V4["targeted test run"]
Loading

@opencode-agent
opencode-agent Bot disabled auto-merge August 7, 2026 16:06

Copy link
Copy Markdown
Contributor Author

@opencode-agent address

Reconcile this PR with the exact current protected main without rewriting history. Current PR head is still c4e11196fcb85bff3c37905d81521ef7d64d5185; current protected main is 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. main...head is diverged by one protected-main commit. The only overlapping changed path introduced by that protected-main movement is the authoritative changelog: PR CHANGELOG.md blob c81d5a0065c9343d7c9c47bb4bd51622a091cf3d, protected-main blob bf30091dd6df4551f211142b4828b5c674362bb8.

Before writing, refetch and require the PR head, protected-main tip, and both changelog blobs to remain exactly those values. Merge the exact protected-main tip into the existing PR branch with a normal non-forced merge. Resolve CHANGELOG.md by preserving both independent [Unreleased] fixes: protected main's bounded Strix timeout-fixture entry and this PR's ten-property repository-dispatch payload-limit entry. Do not drop or rewrite any other protected-main or PR changelog item. No rebase/force-push, -X ours/-X theirs, temporary/write-capable workflow, branch-protection change, credential/reviewer change, or production-policy broadening.

After reconciliation, verify the effective product diff is still limited to the five intended files and the payload contract is unchanged. Rerun Agent Mention Router Quality CI, complete central/Strix quality, security/supply-chain checks, and request fresh exact-head review; the predecessor OpenCode CHANGES_REQUESTED referred to a cancelled Strix run and does not transfer to the new head. Keep merge disabled until qualifying independent non-author approval and all exact-head gates pass.

Copy link
Copy Markdown
Contributor Author

@opencode-agent address

Reconcile this operational HTTP-422 repair onto the current protected base without rewriting history. Exact PR head is c4e11196fcb85bff3c37905d81521ef7d64d5185; current protected main tip is 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. Primary changed blobs at the exact head are .github/workflows/agent-mention-opencode-dispatch.yml=dd3ce12abdb353bb16621c0dbd04828f06910bba and scripts/ci/agent_mention_router.py=33bda58af9c1266d8be5747a7814dbc7bb59f7c3; the corresponding current-main blobs are 160b4723d393074c7e5c99f6ec7a0a6e6a2e5a6f and bdb8ac3db68271784252290e3d8193d7e9667176. Do not write if the PR head, protected-main tip, or these relevant blobs have moved.

Use a trusted checkout and perform a normal non-forced merge of exact protected main into this existing branch. Resolve conflicts by preserving all newer protected-main behavior plus this PR's narrow permanent contract only:

  • the first agent-mention-opencode repository-dispatch payload remains at GitHub's maximum of 10 top-level client-payload properties;
  • the five review-control fields remain nested under one validated review_policy object and remain covered by the invocation-key binding;
  • the OpenCode wrapper reads that nested policy;
  • the downstream generic merge-scheduler dispatch forwards only the ten fields it consumes and does not duplicate wrapper-only provenance;
  • no token, permission, reviewer identity, merge policy, branch protection, model routing, or current protected-main security behavior is weakened.

Do not use force-push, -X ours/-X theirs, temporary/self-modifying workflows, encoded patches, or a second branch writer. After reconciliation, require the exact resulting head to run Agent Mention Router Quality CI, the complete central suite/Strix quick gate, exact 100% production statement/branch/public-docstring gates, Security Scan, SAST, CodeQL, Python Security, Secret Scan, OSV, Scorecard, and SBOM. Keep or return Draft if any current-head review/check is incomplete; do not merge or synthesize approval.

seonghobae commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Superseded before execution: do not write this branch from this request. The central mention-dispatch path being repaired by this PR is itself the unreliable writer-routing dependency, so this run is switching to an auditable connector-backed replacement from the exact current protected main instead of racing or relying on the broken route. Preserve c4e11196fcb85bff3c37905d81521ef7d64d5185 and its history unchanged; no predecessor checks/reviews/approvals transfer.

Copy link
Copy Markdown
Contributor Author

Superseded by #840, which is rebuilt from the current exact main and carries the bounded three-property envelope through both hops, strict live PR snapshot binding, stale-run cancellation isolation, organization-wide audit evidence, and complete regression coverage. This branch remains unchanged for audit history.

@seonghobae seonghobae closed this Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant