Skip to content

fix(noema): isolate 429 continuation dispatch authority - #2373

Open
seonghobae wants to merge 6 commits into
mainfrom
fix/noema-continuation-dispatch-authority
Open

seonghobae wants to merge 6 commits into
mainfrom
fix/noema-continuation-dispatch-authority

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Cause

Noema's post-failure repository_dispatch selected the independent reviewer App token, whose Contents permission is read-only. The REST endpoint requires Contents write, so a typed capacity failure could terminate at 403 after the same-head check. OriginWeave's #2165 record shows this sequence. This also blocks review recovery relevant to .github#945.

Change

  • Keep the model/review job and its reviewer App token at Contents read.
  • Export the typed retry decision to a dependent dispatch-only job with repository-scoped GITHUB_TOKEN Contents write. The job has no checkout, model input, or reviewer credential.
  • Recheck the target repository, open PR, exact head, and admitted base after the bounded delay. Keep the original required review job failed and the two-continuation limit.
  • Record the authority boundary in ADR-0031 and execute the dispatch shell against valid/stale/cross-repository fixtures. Malformed retry counters now exhaust the budget instead of resetting it (carried from fix(noema): authorize exact-head 429 continuation dispatch #2372).

Validation

  • actionlint .github/workflows/noema-review.yml — passed.
  • GITHUB_ACTIONS=true uv run --no-sync python -m pytest tests/test_noema_orchestrator_workflow_contract.py tests/test_noema_review_gate.py tests/test_noema_two_phase_handoff.py tests/test_required_workflow_queue_contract.py -q — 217 passed.
  • Full suite before the retry-counter carryover: 3,393 passed, 5 skipped, 40 subtests passed. Final focused suite: 226 passed with GITHUB_ACTIONS=true. Hosted exact-head checks and independent review pending.

Related: .github#2165, .github#945. This is the least-privilege alternative to #2372, which grants Contents write to the model-processing review job. Gateway-side 429 cases are tracked in contextual-orchestrator#1249 and #1251; this PR does not change gateway routing or replay ambiguous provider outcomes.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 9 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: e60acad6-ac64-4402-827f-55e402ddf6d8

📥 Commits

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

📒 Files selected for processing (6)
  • .github/workflows/noema-review.yml
  • docs/adr/0031-noema-transport-capacity-redispatch.md
  • scripts/ci/noema_review_gate.py
  • tests/test_noema_orchestrator_workflow_contract.py
  • tests/test_noema_review_gate.py
  • tests/test_noema_reviewer_token_lifetime.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.

@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

  • .github/workflows/noema-review.yml — GitHub Actions review job
  • docs/adr/0031-noema-transport-capacity-redispatch.md — operator or user guidance
  • scripts/ci/noema_review_gate.py — review and security gate shell path
  • tests/test_noema_orchestrator_workflow_contract.py — regression suite
  • tests/test_noema_review_gate.py — regression suite
  • tests/test_noema_reviewer_token_lifetime.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: noema-review.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: noema-review.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Docs: 0031-noema-transport-capacity-redispatch.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0031-noema-transport-capacity-redispatch.md"]
  R2 --> V2["docs review"]
  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_noema_orchestrator_workflow_contract.py (3 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_noema_orchestrator_workflow_contract.py (3 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: 8f9720240633f8a1cd39d193489f56057027e46a
  • Workflow run: 36192948657
  • 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["Workflow: noema-review.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: noema-review.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Docs: 0031-noema-transport-capacity-redispatch.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0031-noema-transport-capacity-redispatch.md"]
  R2 --> V2["docs review"]
  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_noema_orchestrator_workflow_contract.py (3 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_noema_orchestrator_workflow_contract.py (3 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

Exact-head admission correction for 8f9720240633f8a1cd39d193489f56057027e46a.

Current review state includes CHANGES_REQUESTED. Python Security run 36148969782, job 108191580955, detects AnyIO 4.14.0 CVEs CVE-2026-63374, CVE-2026-64847, and CVE-2026-63349. The least-privilege dispatch delta remains preserved. Canonical dependency/compatibility owner convergence is .github#2385@8e1aba9…; moving this consumer to Draft/Proposed until owner integration and exact-head replacement evidence.

@seonghobae
seonghobae marked this pull request as draft September 26, 2026 10:04

Copy link
Copy Markdown
Contributor Author

Canonical consolidation rationale before branch mutation:

#2373 exact head 8f9720240633f8a1cd39d193489f56057027e46a and #2387 exact head 33b9028318ddd0cf6c34d1816b09b94e95346c10 diverge from the same protected main. This PR contributes the three-path least-privilege split (read-only model job, repository-scoped dispatch job, live-head check). #2373 carries those valid requirements and additionally binds the live base SHA/repository, requires the typed capacity output, constrains continuation attempts to 1/2, fails malformed counters closed, adds the executable valid/stale/cross-repository fixture, and records ADR-0031.

To preserve single-writer ancestry without weakening the stronger implementation, I will ordinary-forward #2373 with a two-parent commit whose first parent is #2373 current head, second parent is this exact head, and tree is byte-identical to #2373 current tree fb27729369c8491f38f53aef7c44b7e98f30e852. #2387 remains Draft/open until the successor reaches protected integration and equivalence is independently accepted; this is not a Close or merge claim.

Keep the stronger #2373 tree byte-identical while preserving #2387 as an explicit second parent. No force push or rebase.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exact-head successor-integration review for bf88c9c1c6dacb52f0eb60b1368835a8b1c91a35 (COMMENT, not approval).

The new commit preserves #2373 tree fb27729369c8491f38f53aef7c44b7e98f30e852 byte-for-byte and records #2387 exact head 33b9028318ddd0cf6c34d1816b09b94e95346c10 as its explicit second parent. GitHub compare reports zero changed files from prior #2373 head 8f972024…; #2387 is now an ancestor with no lost delta. The effective protected-main diff remains the six canonical Noema workflow/ADR/gate/test paths, 6 ahead / 0 behind, mergeable, unresolved threads 0.

Fresh exact-head Runtime 36240466170, CodeQL 36240466151, Python Security 36240466337, SAST 36240466238, and Security 36240466139 are queued. The predecessor CHANGES_REQUESTED review predates this exact head and no qualifying exact-head approval exists. This review records ancestry/equivalence only and is not merge authority.

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