Skip to content

fix(review): pin gateway with 429 recovery for review sidecar - #2369

Draft
seonghobae wants to merge 2 commits into
mainfrom
fix/review-sidecar-rate-limit-pin-20260925
Draft

seonghobae wants to merge 2 commits into
mainfrom
fix/review-sidecar-rate-limit-pin-20260925

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Observed failure

Noema run 36024200990 provisioned the review sidecar at 767e67fbc6b881a452761f32abb69b9971b9b03b and ended with HTTP 429 after one caller request and 1288 seconds. The caller count does not establish how many provider candidates the gateway tried.

That pin predates the gateway's rate-limit-aware virtual-pool admission path. The merged contextual-orchestrator main commit 5665b0ad1e07ffb5e9f8c59e44b6b2a785298013 includes cooldown and candidate recovery for orchestrator/free. This PR advances only the exact sidecar pin, its contract assertion, and ADR evidence.

Local verification

  • Organization repository: 3394 passed, 3 skipped, 40 subtests passed from uv run --no-sync python -m pytest -q tests after installing the CI hash-locked review dependencies into the project .venv.
  • Sidecar-related tests: 225 passed; GITHUB_ACTIONS=true contract subset: 33 passed.
  • Pinned gateway source: tests/test_rate_limit_aware_admission.py: 23 passed.
  • bash -n scripts/ci/contextual_orchestrator_review_sidecar.sh and git diff --check passed.

Acceptance boundary

This is a reviewed pin proposal, not proof that the live free pool can recover every 429. The pinned source commit's push checks currently include failures, and the organization PR still needs its own exact-head checks, human review, and a fresh hosted Noema/OpenCode verdict. No review approval or released gateway artifact is claimed here.

Newly verified structured-output dependency

Noema's JSON-schema request also uses the gateway's final structured-synthesis path. The pinned 5665b0ad source covers conduct and passthrough cooldown recovery but still exhausts an all-429 final-synthesis round. Owner PR contextual-orchestrator#1251 reproduces and repairs that path; it is stacked on #1209 and has not reached protected main or an immutable release. This pin therefore remains a partial source update. Before accepting this consumer migration as a Noema 429 repair, update the pin to the eventual protected released revision and obtain a fresh hosted review verdict.

Parser preparation; CO pin/live revalidation HOLD

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a54bdcde-2753-4677-a023-8907ab4636d0

📥 Commits

Reviewing files that changed from the base of the PR and between e6334e2 and 7bcd704.

📒 Files selected for processing (5)
  • docs/adr/0003-contextual-orchestrator-vendored-free-zdr.md
  • scripts/ci/contextual_orchestrator_review_sidecar.sh
  • scripts/ci/noema_review_gate.py
  • tests/test_contextual_orchestrator_review_sidecar_contract.py
  • tests/test_noema_review_gate.py

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.

❤️ Share

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

Copy link
Copy Markdown
Contributor Author

CO pin compatibility check for exact 26a84cd0: the proposed 5665b0ad CO source has requirements.lock:366 as fast-mlsirm @ git+https://github.com/ContextualWisdomLab/fast-mlsirm.git@09f762... with no hash, while this sidecar invokes pip --require-hashes; CO #995 is the pending released-dependency repair. This is static source evidence, not a fresh hosted install result. The same pin also predates CO #1251, the distinct Noema JSON-schema final-synthesis all-429 fix. Please keep pin acceptance gated on a clean exact-source hash install, protected immutable release identity, and a fresh hosted Noema/OpenCode request verdict; no blind pin bump or required-check rerun.

@seonghobae

Copy link
Copy Markdown
Contributor Author

CO owner dependency handoff for this PR's current head 26a84cd0a5980b2b7be1640c2565a5c28eb3b479:

The proposed pin 5665b0ad1e07ffb5e9f8c59e44b6b2a785298013 predates two complementary CO changes: #1249 at 0cf0a3cbe77af4171a333262f10974a3a0f3b31e addresses immediate same-agent recall after an explicit 429; #1251 at aa00d635b48589a26b705a37506ef2923549956d addresses structured final-synthesis cooldown. CO lead's exact merge-tree review says neither carries the other, with conflicts in tests/test_rate_limit_aware_admission.py and docs/doctoring/autonomous_kpi_runbook.md; orchestrator.py auto-merges. #1251 also depends on #1209, which is still open.

Treat #2369 as the historical partial-recovery candidate already described in its body. A complete Noema 429 consumer pin requires CO's combined behavior on protected main, an immutable reviewed release, then a fresh exact-head .github pin and hosted Noema/OpenCode evidence. This comment neither advances the pin nor claims either CO PR is merge-ready. No workflow rerun or merge is requested.

@seonghobae

Copy link
Copy Markdown
Contributor Author

CO owner handoff for fast-mlsirm #2157 Noema job, with its sanitized sidecar artifact. This job used CO 767e67fb, not a repaired or released head. One JSON-schema orchestrator/free caller request ran 1532s. The same gateway request had earlier unknown transport outcomes and ended with two distinct candidates returning 429. The later GitHub App 403 blocked continuation separately.

CO #1249 changes route_once, outside this structured request path. CO #1251 can wait after an all-429 final synthesis/repair round, but deliberately stops after mixed unknown transport and 429 in the same round. The old log does not mark conduct versus synthesis/repair, so this job is not proof #1251 would have served. CO #1252 tracks the smallest sanitized stage/route receipt and paired synthetic checks.

The Noema parser at trusted .github e6334e2 reads allowlisted top-level error.detail.attempts; #1251's structured route receipt is nested at error.detail.route.attempted. Please own the paired consumer allowlist/check after the CO receipt contract is reviewed. Keep this consumer pin on HOLD for the full incident claim until protected-main CO merge, independent review, immutable release, and current-head hosted verification. No live rerun, raw prompt logging, or speculative pin change is requested.

@seonghobae

Copy link
Copy Markdown
Contributor Author

CO owner exact-head parser handoff (2026-09-25 17:11 UTC): CO #1253 is Ready at f6d52e3ea4bd41d69b650231543cf78e6512f544, stacked on #1251 aa00d635. Its typed HTTP error error.detail.route contains stage (conduct, structured_synthesis, structured_repair), ordered attempted rows, eligible_agent_ids, and terminal_reason. The attempted rows are limited to candidate ID/model, outcome, error code, provider status, retryable flag, and transport; no raw exception, prompt, credential, or provider body was added. The synthetic mixed RemoteDisconnected→429→429 check confirms three candidate sends and no replay; all-429 recovery remains covered.

At this PR's exact head 26a84cd0a5980b2b7be1640c2565a5c28eb3b479, scripts/ci/noema_review_gate.py:1466 reads top-level detail.attempts and has no detail.route handling. Please own an allowlisted projection of the new route scalars with synthetic parser tests, then acknowledge the resulting head and tests here or to the paired coordinator. CO's four current-head Security jobs are queued and independent review is absent. Keep the sidecar pin and any #2157 repair claim on HOLD until CO protected delivery and a fresh hosted request verdict.

@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 reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • docs/adr/0003-contextual-orchestrator-vendored-free-zdr.md — operator or user guidance
  • scripts/ci/contextual_orchestrator_review_sidecar.sh — review and security gate shell path
  • scripts/ci/noema_review_gate.py — review and security gate shell path
  • tests/test_contextual_orchestrator_review_sidecar_contract.py — regression suite
  • tests/test_noema_review_gate.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Docs: 0003-contextual-orchestrator-vendored-free-zdr.md"]
  S1 --> I1["operator or user guidance"]
  I1 --> R1["Review risk: Docs: 0003-contextual-orchestrator-vendored-free-zdr.md"]
  R1 --> V1["docs review"]
  Evidence --> S2["CI script: contextual_orchestrator_review_sidecar.sh"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: contextual_orchestrator_review_sidecar.sh"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["CI script: noema_review_gate.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: noema_review_gate.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test: test_contextual_orchestrator_review_sidecar_contract.py (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_contextual_orchestrator_review_sidecar_contract.py (2 files)"]
  R4 --> V4["targeted test run"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: 7bcd7048293c732d4de2c84a9fe9ef611a3a534f
  • Workflow run: 36201032472
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Docs: 0003-contextual-orchestrator-vendored-free-zdr.md"]
  S1 --> I1["operator or user guidance"]
  I1 --> R1["Review risk: Docs: 0003-contextual-orchestrator-vendored-free-zdr.md"]
  R1 --> V1["docs review"]
  Evidence --> S2["CI script: contextual_orchestrator_review_sidecar.sh"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: contextual_orchestrator_review_sidecar.sh"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["CI script: noema_review_gate.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: noema_review_gate.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test: test_contextual_orchestrator_review_sidecar_contract.py (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_contextual_orchestrator_review_sidecar_contract.py (2 files)"]
  R4 --> V4["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment.

Copy link
Copy Markdown
Contributor Author

Admission correction — exact head 7bcd7048293c732d4de2c84a9fe9ef611a3a534f

Current-head Python Security run 36166453349 fails on AnyIO 4.14.2 vulnerability findings inherited by the Strix lock, CodeQL run 36166453254 fails in central verdict settlement, and an active opencode-agent CHANGES_REQUESTED remains. The complete canonical foundation successor is now .github#2385@950ab88553fe7415a73401c7ccc2e4749554395e, which preserves the AnyIO/coverage and CodeQL owner parents by ordinary ancestry. This PR is returned to Draft/Proposed without copying those fixes; reconcile after protected owner integration and reacquire exact-head evidence.

@seonghobae
seonghobae marked this pull request as draft September 26, 2026 09:06

This branch has not been deployed

No deployments
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