Skip to content

fix(review): bound free-provider failover - #662

Merged
seonghobae merged 1 commit into
mainfrom
fix/opencode-free-failover-timeout
Jul 30, 2026
Merged

fix(review): bound free-provider failover#662
seonghobae merged 1 commit into
mainfrom
fix/opencode-free-failover-timeout

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

  • cap each opencode-free/* review attempt at 600 seconds
  • preserve the existing 90-minute window for paid/full review providers
  • reuse the shared provider timeout cap instead of adding a second runner path

Runtime evidence

The first production review after #659 passed coverage in 1m11s, then remained in opencode-free/nemotron-3-ultra-free for more than 20 minutes with no verdict or failover: central run 30503754266 against ContextualWisdomLab/saju-caldav#14.

Validation

  • focused model-pool + contract tests: 59 passed
  • full suite: 679 passed
  • Ruff, Bash syntax, workflow YAML parse, and git diff --check: passed

Follow-up to #659.

@coderabbitai

coderabbitai Bot commented Jul 30, 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: 39 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: ef5fa17d-be4a-420c-94db-0b63d055eef9

📥 Commits

Reviewing files that changed from the base of the PR and between 7231cb7 and 1142c4c.

📒 Files selected for processing (4)
  • .github/workflows/opencode-review-dispatch.yml
  • scripts/ci/run_opencode_review_model_pool.sh
  • tests/test_opencode_agent_contract.py
  • tests/test_opencode_model_pool_runner.py

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

@seonghobae
seonghobae force-pushed the fix/opencode-free-failover-timeout branch from aa7333a to 1142c4c Compare July 30, 2026 02:36
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head refresh: replaced the behind aa7333a head with 1142c4c, rebuilt as the same single-purpose change directly on current main 7231cb7.

Validation before push:

  • focused model-pool and workflow contract tests: 59 passed
  • full repository suite: 702 passed
  • actionlint, ShellCheck (excluding pre-existing informational SC2016 prompt-literal notices), Ruff, and git diff check: clean
  • live failure evidence: the previous current-head model pool allowed opencode-free candidates a 5,400-second attempt window; one free candidate consumed 5m52s before control rejection. The new trusted workflow pins OPENCODE_FREE_RUN_TIMEOUT_SECONDS=600 and the tested opencode-free/* branch preserves the remaining queue budget for failover.

The update was force-with-lease guarded against the exact former PR head. Superseded-head checks are not merge evidence; only 1142c4c current-head results will be used.

@seonghobae
seonghobae merged commit 7711503 into main Jul 30, 2026
46 checks passed
@seonghobae
seonghobae deleted the fix/opencode-free-failover-timeout branch July 30, 2026 02:44
@github-project-automation github-project-automation Bot moved this from In Progress to Done in naruon Platform Roadmap Jul 30, 2026
@seonghobae

Copy link
Copy Markdown
Contributor Author

Merged-audit evidence for current head 1142c4c:

  • 46 current-head checks completed without failures or pending work; CodeQL merge-preview and compatibility analyses, pip-audit, OSV, dependency review, Semgrep, Bandit, Trivy, gitleaks, Scorecard, Noema, coverage evidence, and Strix passed.
  • Open Medium/High/Critical code-scanning alerts: 0. Current unresolved review threads: 0.
  • Strix produced provider 429/403 logs and no vulnerability report artifact; all independent security gates were green.
  • The exact-head central OpenCode dispatch 30509193921 was force-cancelled because trusted workflow execution necessarily used pre-fix main and therefore could not exercise this PRs new free-provider timeout. This is the pipeline bootstrap defect covered by the explicitly authorized force-merge exception.
  • SHA-guarded squash merge 7711503 has the exact same tree as the PR head.
  • Governance was immediately restored: ruleset active, no bypass actors, 2 approvals plus last-push approval plus thread resolution required; strict branch protection, admins enforced, force-push/delete disabled.

Post-merge origin/main full-suite verification is running against the exact merge commit and will be recorded when complete.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Post-merge verification completed on the exact remote default-branch commit 7711503: 702 passed in 81.28s. The temporary detached worktree was removed after verification.

seonghobae pushed a commit that referenced this pull request Jul 30, 2026
The org-wide merge queue keeps stalling on opencode-review
OPENCODE_MODEL_POOL_OUTCOME=exhausted: the free anonymous Zen pool for
public repos was only 3 models (nemotron-3-ultra-free,
deepseek-v4-flash-free, north-mini-code-free), so concurrent org PRs
saturate it and reviews fall through to the rate-limited paid providers.

Double the free public-repo pool by adding the other 4 models the Zen
catalog currently promotes as free-tier, tried after the 3 proven ones and
before any paid github-models/openai/openrouter fallback:

  big-pickle, laguna-s-2.1-free, ling-3.0-flash-free, mimo-v2.5-free

Exact ids verified against four independent sources that agree on the
slugs and the free-tier set: the OpenCode Zen docs source
(anomalyco/opencode packages/web/src/content/docs/zen.mdx), openclaw's
provider catalog (which lists exactly these seven as the "currently
promoted free-tier rows"), NousResearch/hermes-agent, and CodeWhale. All
share the same https://opencode.ai/zen/v1 endpoint and @ai-sdk/openai-
compatible driver already used by the pool. Each is added with
tool_call: true (required by the review agent) and the same 256k/64k
limit as deepseek/north; #662's free-provider 600s failover means a
weaker candidate is skipped rather than stalling the run.

Kept private repositories on paid providers only (the free anonymous
models' data terms still forbid private code), and updated the
test_opencode_agent_contract.py pool + tool_call assertions in lockstep.

Verification: 115 opencode tests pass
(tests/test_opencode_agent_contract.py 37, test_opencode_workflow_shell_syntax.py 5,
plus model-pool/reasoning-effort/security/context/docker suites 73);
workflow YAML re-parses.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016wtuYFp4E22QnEU1bFMhsr
seonghobae pushed a commit that referenced this pull request Jul 30, 2026
…rlaps)

main advanced past this PR's base with two changes that overlapped it:

- #663 "defer R coverage-evidence to peer R CMD check when the package
  cannot load" reworked the same R coverage flow this branch had touched.
  Resolution: take main's design in full (the `run_r_package_testthat`
  helper + `scripts/ci/r_coverage_peer_gate.py`) and drop this branch's
  earlier inline `R CMD INSTALL`, which #663 supersedes. The now-redundant
  coverage-image R additions (`r-base-dev`, the fail-soft `r-cran-*` pull)
  are reverted so the image stays lightweight and aligned with #663's
  defer-not-install approach.

- #662 concurrently curated the OpenCode Zen free pool, adding the
  authoritative ids `big-pickle` (note: no `-free` suffix), `laguna-s-2.1-free`,
  `ling-3.0-flash-free`, and `mimo-v2.5-free`. Resolution: union — keep all of
  main's authoritative additions in their exact order, then append this
  branch's additions, dropping this branch's speculative `big-pickle-free`
  in favour of main's real `big-pickle`. The candidate string, provider
  model block, and all contract-test assertions are reconciled to the same
  unioned order.

Full suite: `python3 -m pytest tests/ -q` → 710 passed. YAML parses; no
conflict markers remain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEAGtwNR96cia2djq7XFCo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant