fix(opencode-review): reach a healthy fallback model within the step budget#372
Closed
seonghobae wants to merge 4 commits into
Closed
fix(opencode-review): reach a healthy fallback model within the step budget#372seonghobae wants to merge 4 commits into
seonghobae wants to merge 4 commits into
Conversation
…budget The Required OpenCode Review check timed out red on every gyeot PR (ContextualWisdomLab/gyeot #4, #5, #6 — including a one-file docs PR), so the model-pool step is structurally, not transiently, broken. Root cause (from the job logs): the 3-4 front-loaded mini models (o4-mini, gpt-5-mini, gpt-5-nano) each hang/rate-limit and are killed at the 90-min (5400s) per-model `timeout` (exit 124). Three hangs burn ~270 min before the pool can reach any high-quota fallback (deepseek/mistral/llama, candidates #6-11), so the 350-min hard step timeout kills the job first — opaquely, with no recorded review_status. Fix: - OPENCODE_RUN_TIMEOUT_SECONDS 5400 -> 1800 (30 min): still ample for a deep tool-using review (5x the 600s that was too short), but low enough that the full 13-candidate list is traversable inside the 350-min step even if every leading model hangs, so a responsive fallback is reached. - OPENCODE_TOTAL_RETRY_BUDGET_SECONDS 0 -> 20400 (340 min): a clean internal deadline 10 min under the step timeout. The pool already caps each run at min(run_timeout, deadline-now) and exits with an explicit "retry deadline elapsed" reason + recorded status, so a genuine exhaustion now prints its cause instead of GitHub's opaque "timed out after 350 minutes". Also updates the strix quick-gate assertions that pin these two values. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RTAMs4bpSZS77Xe3RQjv9P
This was referenced Jul 8, 2026
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Required OpenCode Review check fails (red) on every open PR in
ContextualWisdomLab/gyeot— #4, #5, and #6, including #6 which is a one-file docs change. Because a tiny docs PR fails identically to a large one, this is a structural failure of the model-pool step, not a transient flake or a real code finding. All other required checks on those PRs (CodeQL, osv-scanner, trivy-fs, scorecard, dependency-review, verify) pass.Root cause (from the actual job logs)
gh api repos/ContextualWisdomLab/gyeot/actions/jobs/<id>/logson all three runs shows the identical sequence in Run OpenCode PR Review model pool:exit 124= the process was killed by thetimeoutwrapper at the 90-min (OPENCODE_RUN_TIMEOUT_SECONDS=5400) cap — i.e. the model hung, it did not fast-fail. The three front-loaded mini models each burn the full 90 min (~270 min total) before the pool can reach any high-quota fallback (deepseek/mistral/llama, candidates #6–11), so GitHub's hard 350-min step timeout kills the job first — opaquely, with no recordedreview_status, which is why the check goes red instead of falling back.At 90 min/model the pool mathematically cannot traverse enough of the 13-candidate list to reach a responsive model whenever ≥3 leading models hang — which is happening on every run.
Fix
OPENCODE_RUN_TIMEOUT_SECONDS5400 → 1800 (30 min): still ample for a deep tool-using review (5× the 600 s the comment notes was "too short"), but low enough that the full 13-candidate list is traversable inside the 350-min step even in the worst case where every leading model hangs — so a responsive fallback is reached (worst case: candidate [codex] harden OpenCode agent evidence gate #11llama-4-scoutreached at 330 min < 340 min budget; in practice much sooner once a healthy model short-circuits).OPENCODE_TOTAL_RETRY_BUDGET_SECONDS0 → 20400 (340 min): a clean internal deadline 10 min under the step timeout. The pool already caps each run atmin(run_timeout, deadline-now)and exits with an explicitretry deadline elapsedreason plus a recorded status, so a genuine exhaustion now prints its cause in the log instead of GitHub's opaquetimed out after 350 minutes.scripts/ci/test_strix_quick_gate.shassertions that pin these two values.Verification
python3 -c yaml.safe_load(...)on the workflow — valid.bash -n scripts/ci/test_strix_quick_gate.sh— valid.pytest tests/test_opencode_workflow_shell_syntax.py— passes.20400 / 1800 = 11candidates reachable worst-case;llama-scout([codex] harden OpenCode agent evidence gate #11) reached by minute 330, within the 340-min budget.Notes / reconciliation
gyeotruns it via the trusted OpenCode source ref. This PR fixes it at the correct locus (.githubdefault branch);gyeot's inherited check turns green once this lands (a maintainer must re-pin if the trusted ref is a fixed SHA rather thanmain).scripts/ci/test_strix_quick_gate.shonmainis already broadly out of sync withmain'sopencode-review.yml(~15 pre-existing assertion mismatches: model-ordering string,timeout-minutes: 285, eventtypes:, etc.). It tracks an older pinned workflow version and is run against the trusted ref, not the PR head. This PR only reconciles the two timeout/budget assertions it directly changes; the remaining pre-existing drift is out of scope.🤖 Generated with Claude Code