Uh oh!
There was an error while loading. Please reload this page.
[codex] Harden OpenCode model pool retries - #246
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the OpenCode PR-review “model pool” by reducing prompt payload size, detecting context-window overflow failures to avoid wasting retries, and expanding/retuning the fallback model set and time budgets so the workflow can reach viable candidates more reliably.
Changes:
- Split the full review contract into a separate on-disk file and send models a compact launcher prompt that points to the contract.
- Add context-window overflow detection to skip same-model retries after
ContextOverflowError/tokens_limit_reached-class failures. - Expand the configured GitHub Models pool and increase attempts/timeouts/retry-budget for long-running reviews.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/test_opencode_agent_contract.py | Updates contract/workflow assertions for new models, launcher prompt behavior, overflow detection, and new timeouts/budgets. |
scripts/ci/test_strix_quick_gate.sh | Adjusts quick-gate assertions to match the new launcher text, overflow detection, and updated model pool/time budgets. |
scripts/ci/run_opencode_review_model_pool.sh | Implements compact launcher prompt generation, context-overflow detection, and updated retry-budget defaults. |
opencode.jsonc | Adds new cataloged tool-calling fallback models and preserves high reasoning-effort configuration for reasoning-capable candidates. |
.github/workflows/opencode-review.yml | Mirrors model/config additions and raises model-pool attempts/timeouts/retry budgets in the workflow environment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
8d362a6 to
dc8f0fdCompareOpenCode Review Overview
Pull request overviewOpenCode reviewed the current-head bounded evidence and found no blocking issues. FindingsNo blocking findings. SummaryApproval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: opencode-review.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: opencode-review.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Changed file: opencode.jsonc"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Changed file: opencode.jsonc"]
R2 --> V2["required checks"]
Evidence --> S3["CI script (2 files)"]
S3 --> I3["review and security gate shell path"]
I3 --> R3["Review risk: CI script (2 files)"]
R3 --> V3["bash -n plus Strix self-test"]
Evidence --> S4["Test: test_opencode_agent_contract.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_opencode_agent_contract.py"]
R4 --> V4["targeted test run"]
|
There was a problem hiding this comment.
Pull request overview
OpenCode reviewed the current-head bounded evidence and found no blocking issues.
Findings
No blocking findings.
Summary
Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including .github/workflows/opencode-review.yml, opencode.jsonc, scripts/ci/run_opencode_review_model_pool.sh, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence reports supported repository test suites passed.
Docstring coverage: coverage execution evidence reports configured repository docstring gates passed or docstring coverage was advisory.
DAG: CodeGraph/source-backed behavior map connects .github/workflows/opencode-review.yml to the affected review, runtime, or workflow path and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions, object naming, and reserved-word safety for schema/API/config/code surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: Playwright visual, DOM locator, ARIA snapshot, console, and responsive evidence were checked when a web UI surface was present; for non-web surfaces, API/CLI/log/docs/workflow interaction evidence was reviewed instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.
- Result: APPROVE
- Reason: Hardens model pool retries with new models and increased timeouts
- Head SHA:
dc8f0fd7ca48d255736f3ee923d3898e09b9622d - Workflow run: 28484446843
- Workflow attempt: 1
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: opencode-review.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: opencode-review.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Changed file: opencode.jsonc"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Changed file: opencode.jsonc"]
R2 --> V2["required checks"]
Evidence --> S3["CI script (2 files)"]
S3 --> I3["review and security gate shell path"]
I3 --> R3["Review risk: CI script (2 files)"]
R3 --> V3["bash -n plus Strix self-test"]
Evidence --> S4["Test: test_opencode_agent_contract.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_opencode_agent_contract.py"]
R4 --> V4["targeted test run"]
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
OpenCode reviewed the current-head bounded evidence and found no blocking issues.
Findings
No blocking findings.
Summary
Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including .github/workflows/opencode-review.yml, opencode.jsonc, scripts/ci/run_opencode_review_model_pool.sh, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence reports supported repository test suites passed.
Docstring coverage: coverage execution evidence reports configured repository docstring gates passed or docstring coverage was advisory.
DAG: CodeGraph/source-backed behavior map connects .github/workflows/opencode-review.yml to the affected review, runtime, or workflow path and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions, object naming, and reserved-word safety for schema/API/config/code surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: Playwright visual, DOM locator, ARIA snapshot, console, and responsive evidence were checked when a web UI surface was present; for non-web surfaces, API/CLI/log/docs/workflow interaction evidence was reviewed instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.
- Result: APPROVE
- Reason: No material issues found
- Head SHA:
dc8f0fd7ca48d255736f3ee923d3898e09b9622d - Workflow run: 28484467385
- Workflow attempt: 1
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: opencode-review.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: opencode-review.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Changed file: opencode.jsonc"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Changed file: opencode.jsonc"]
R2 --> V2["required checks"]
Evidence --> S3["CI script (2 files)"]
S3 --> I3["review and security gate shell path"]
I3 --> R3["Review risk: CI script (2 files)"]
R3 --> V3["bash -n plus Strix self-test"]
Evidence --> S4["Test: test_opencode_agent_contract.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_opencode_agent_contract.py"]
R4 --> V4["targeted test run"]
Summary
ContextOverflowError/tokens_limit_reachedskips same-model retries and preserves retry budget for other models.openai/gpt-5-nano,deepseek/deepseek-r1, andmeta/llama-4-maverick-17b-128e-instruct-fp8.reasoning=trueandreasoningEffort=high, then raise the model pool to 3 attempts, 900s per run, 120s export, and 18,000s total retry budget.Evidence
ContextualWisdomLab/pg-erd-cloudexhausted the model pool: DeepSeek outputs failed control validation, OpenAI GPT-5/o3/o4 paths hitContextOverflowError/tokens_limit_reached, and Mistral/Llama paths timed out at 180s.openai/gpt-5-nano,deepseek/deepseek-r1, andmeta/llama-4-maverick-17b-128e-instruct-fp8; non-tool-calling catalog entries were not added to the review pool.Verification
bash -n scripts/ci/run_opencode_review_model_pool.shbash -n scripts/ci/test_strix_quick_gate.shpython3 -m json.tool opencode.jsonc >/dev/nullruby -e 'require "yaml"; YAML.load_file(".github/workflows/opencode-review.yml"); puts "yaml ok"'python3 -m pytest -qpython -m pytest -q --cov=scripts/ci --cov-report=term-missing-> 144 passed, 100% coverageinterrogate -q scripts/cipython3 scripts/ci/assert_opencode_reasoning_effort.py --config opencode.jsonc ...all workflow candidates...timeout 60 actionlint -shellcheck= .github/workflows/opencode-review.ymlgit diff --checkopencodecontext-overflow proof: onegpt-5attempt was made, remaining same-model attempts were skipped, and the model pool reportedreview_status=exhaustedwithout retrying the impossible context path.Notes
actionlint .github/workflows/opencode-review.ymldid not finish within 60s on this large inline-shell workflow; the YAML/action validation path passed with-shellcheck=, and shell syntax was checked separately withbash -n.timeout 180 bash scripts/ci/test_strix_quick_gate.shreached the long case matrix and timed out after the static contract section had progressed into existing NO_CONCLUSION scenarios.