Skip to content

Fix OpenCode check lookup and review budget#274

Open
seonghobae wants to merge 6 commits into
mainfrom
codex/opencode-model-pool-fast-fallback
Open

Fix OpenCode check lookup and review budget#274
seonghobae wants to merge 6 commits into
mainfrom
codex/opencode-model-pool-fast-fallback

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extend the OpenCode model-pool job budget to 5 hours for large codebases.
  • Keep the current single-model policy from main.
  • Fix commit check-run pagination lookup by collecting pages first and applying jq locally, avoiding gh versions that reject --slurp with --jq.

Tests

  • py -3 -m pytest tests\test_opencode_agent_contract.py tests\test_opencode_workflow_shell_syntax.py -q
  • bash -n scripts/ci/test_strix_quick_gate.sh
  • bash -n scripts/ci/run_opencode_review_model_pool.sh
  • git diff --check

Copilot AI review requested due to automatic review settings July 1, 2026 07:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the OpenCode review workflow’s model pool to reduce stalls by prioritizing faster OpenAI GitHub Models first and tightening timeout/retry limits, while keeping the “fail-closed on model exhaustion” behavior.

Changes:

  • Reordered OPENCODE_MODEL_CANDIDATES to try OpenAI models before DeepSeek fallbacks.
  • Reduced per-model run timeout (600s → 240s) and total retry budget (3600s → 1200s); reduced max backoff (600s → 120s).
  • Updated contract tests to match the new timeout/budget values.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/test_opencode_agent_contract.py Updates assertions to the new OpenCode run timeout and total retry budget values.
scripts/ci/test_strix_quick_gate.sh Updates some workflow assertions for the new timeout/budget values (but still contains order-sensitive model-list assertions that now mismatch the workflow).
.github/workflows/opencode-review.yml Reorders model candidates to OpenAI-first and reduces model-pool timeouts/retry budget/backoff limits.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/ci/test_strix_quick_gate.sh Outdated
Comment thread scripts/ci/test_strix_quick_gate.sh
@opencode-agent

opencode-agent Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: eb4dc12facccaeb22edf6324b079cb89d7bfb107
  • Workflow run: 28535729994
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode exhausted the configured model pool without a usable current-head review conclusion. This is not approval evidence, so the PR is blocked until a source-backed review can establish approval sufficiency or identify concrete fixes.

Findings

1. HIGH .github/workflows/opencode-review.yml:1 - OpenCode could not establish approval sufficiency

  • Problem: every configured model path failed to produce a usable current-head control block.
  • Root cause: model execution, timeout, export, normalization, or approval-gate validation did not complete after exponential retry across the configured model pool.
  • Impact: approving from deterministic check state alone would miss PR-intent mismatches, missing files, edge-case bugs, robustness gaps, UX/DX regressions, security issues, and CodeGraph-backed base/head flow changes.
  • Fix: rerun OpenCode after model availability recovers, or update the PR with the missing files, tests, docs, generated artifacts, and verification evidence needed for a source-backed review conclusion.
  • Regression test: keep the approval gate posting REQUEST_CHANGES, not APPROVE or check-only failure, when no model produces a valid current-head review.

Summary

  • Result: REQUEST_CHANGES
  • Reason: coverage-evidence passed and peer GitHub Checks completed without failures, but no model produced a valid review control block.
  • Deterministic evidence checked but not used for approval: current-head changed-file evidence (.github/workflows/opencode-review.yml, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py); coverage-evidence result success; peer checks from statusCheckRollup excluding this OpenCode check.
  • Model outcome: model_pool=exhausted; selected_model=none.
  • Head SHA: eb4dc12facccaeb22edf6324b079cb89d7bfb107
  • Workflow run: 28535729994
  • Workflow attempt: 1

No PR approval was posted because model-output failure is not evidence that the PR has no blockers.

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["CI script: test_strix_quick_gate.sh"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: test_strix_quick_gate.sh"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_opencode_agent_contract.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_opencode_agent_contract.py"]
  R3 --> V3["targeted test run"]
Loading

@seonghobae seonghobae changed the title Reduce OpenCode model pool stall time Fix OpenCode check lookup and review budget Jul 1, 2026

@github-actions github-actions 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 exhausted the configured model pool without a usable current-head review conclusion. This is not approval evidence, so the PR is blocked until a source-backed review can establish approval sufficiency or identify concrete fixes.

Findings

1. HIGH review evidence:1 - OpenCode could not establish approval sufficiency

  • Problem: every configured model path failed to produce a usable current-head control block.
  • Root cause: model execution, timeout, export, normalization, or approval-gate validation did not complete after exponential retry across the configured model pool.
  • Impact: approving from deterministic check state alone would miss PR-intent mismatches, missing files, edge-case bugs, robustness gaps, UX/DX regressions, security issues, and CodeGraph-backed base/head flow changes.
  • Fix: rerun OpenCode after model availability recovers, or update the PR with the missing files, tests, docs, generated artifacts, and verification evidence needed for a source-backed review conclusion.
  • Regression test: keep the approval gate posting REQUEST_CHANGES, not APPROVE or check-only failure, when no model produces a valid current-head review.

Summary

  • Result: REQUEST_CHANGES
  • Reason: coverage-evidence passed and peer GitHub Checks completed without failures, but no model produced a valid review control block.
  • Deterministic evidence checked but not used for approval: current-head changed-file evidence (.github/workflows/opencode-review.yml, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py); coverage-evidence result success; peer checks from statusCheckRollup excluding this OpenCode check.
  • Model outcome: model_pool=exhausted; selected_model=none.
  • Head SHA: 62837fada2fefe39d23801ea6d62a88cfa76854b
  • Workflow run: 28507945505
  • Workflow attempt: 1

No PR approval was posted because model-output failure is not evidence that the PR has no blockers.

Inline comment note: OpenCode could not find an added RIGHT-side diff line for this PR, so the model-exhaustion blocker is attached to the PR review body instead of a file line.

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["CI script: test_strix_quick_gate.sh"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: test_strix_quick_gate.sh"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_opencode_agent_contract.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_opencode_agent_contract.py"]
  R3 --> V3["targeted test run"]
Loading

@seonghobae

Copy link
Copy Markdown
Contributor Author

Pull request overview

OpenCode exhausted the configured model pool without a usable current-head review conclusion. This is not approval evidence, so the PR is blocked until a source-backed review can establish approval sufficiency or identify concrete fixes.

Findings

1. HIGH review evidence:1 - OpenCode could not establish approval sufficiency

  • Problem: every configured model path failed to produce a usable current-head control block.
  • Root cause: model execution, timeout, export, normalization, or approval-gate validation did not complete after exponential retry across the configured model pool.
  • Impact: approving from deterministic check state alone would miss PR-intent mismatches, missing files, edge-case bugs, robustness gaps, UX/DX regressions, security issues, and CodeGraph-backed base/head flow changes.
  • Fix: rerun OpenCode after model availability recovers, or update the PR with the missing files, tests, docs, generated artifacts, and verification evidence needed for a source-backed review conclusion.
  • Regression test: keep the approval gate posting REQUEST_CHANGES, not APPROVE or check-only failure, when no model produces a valid current-head review.

Summary

  • Result: REQUEST_CHANGES
  • Reason: coverage-evidence passed and peer GitHub Checks completed without failures, but no model produced a valid review control block.
  • Deterministic evidence checked but not used for approval: current-head changed-file evidence (.github/workflows/opencode-review.yml, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py); coverage-evidence result success; peer checks from statusCheckRollup excluding this OpenCode check.
  • Model outcome: model_pool=exhausted; selected_model=none.
  • Head SHA: 62837fada2fefe39d23801ea6d62a88cfa76854b
  • Workflow run: 28507945505
  • Workflow attempt: 1

No PR approval was posted because model-output failure is not evidence that the PR has no blockers.

Inline comment note: OpenCode could not find an added RIGHT-side diff line for this PR, so the model-exhaustion blocker is attached to the PR review body instead of a file line.

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["CI script: test_strix_quick_gate.sh"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: test_strix_quick_gate.sh"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_opencode_agent_contract.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_opencode_agent_contract.py"]
  R3 --> V3["targeted test run"]
Loading

@copilot 결정론적 리뷰 싫으니 exponential retry를 하든지 쫌

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Pull request overview

OpenCode exhausted the configured model pool without a usable current-head review conclusion. This is not approval evidence, so the PR is blocked until a source-backed re...

Fixed in commit that restores the full 13-model pool with OpenAI-first ordering and raises OPENCODE_BACKOFF_MAX_SECONDS from 30 → 600.

Root cause: the previous merge reduced OPENCODE_MODEL_CANDIDATES to a single entry (gpt-5-nano) with OPENCODE_MODEL_ATTEMPTS: "1", so there was exactly one attempt with no fallback — exhaustion was guaranteed on any transient failure.

Fix:

  • OPENCODE_MODEL_CANDIDATES restored to the full pool: gpt-5 → gpt-5-chat → gpt-5-mini → gpt-5-nano → o3 → o3-mini → o4-mini → mistral-medium-2505 → llama-4-maverick → llama-4-scout → deepseek-r1-0528 → deepseek-r1 → deepseek-v3-0324 (OpenAI-first)
  • OPENCODE_BACKOFF_MAX_SECONDS: "600" so per-model retry backoff can grow to 10 min instead of being capped at 30 s

With 1 attempt per model (keeping the "move through the catalog quickly" policy), 13 candidates cycle within the 5-hour budget rather than exhausting on the first failure.

@github-actions github-actions 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 exhausted the configured model pool without a usable current-head review conclusion. This is not approval evidence, so the PR is blocked until a source-backed review can establish approval sufficiency or identify concrete fixes.

Findings

1. HIGH review evidence:1 - OpenCode could not establish approval sufficiency

  • Problem: every configured model path failed to produce a usable current-head control block.
  • Root cause: model execution, timeout, export, normalization, or approval-gate validation did not complete after exponential retry across the configured model pool.
  • Impact: approving from deterministic check state alone would miss PR-intent mismatches, missing files, edge-case bugs, robustness gaps, UX/DX regressions, security issues, and CodeGraph-backed base/head flow changes.
  • Fix: rerun OpenCode after model availability recovers, or update the PR with the missing files, tests, docs, generated artifacts, and verification evidence needed for a source-backed review conclusion.
  • Regression test: keep the approval gate posting REQUEST_CHANGES, not APPROVE or check-only failure, when no model produces a valid current-head review.

Summary

  • Result: REQUEST_CHANGES
  • Reason: coverage-evidence passed and peer GitHub Checks completed without failures, but no model produced a valid review control block.
  • Deterministic evidence checked but not used for approval: current-head changed-file evidence (.github/workflows/opencode-review.yml, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py); coverage-evidence result success; peer checks from statusCheckRollup excluding this OpenCode check.
  • Model outcome: model_pool=exhausted; selected_model=none.
  • Head SHA: eb4dc12facccaeb22edf6324b079cb89d7bfb107
  • Workflow run: 28528205754
  • Workflow attempt: 1

No PR approval was posted because model-output failure is not evidence that the PR has no blockers.

Inline comment note: OpenCode could not find an added RIGHT-side diff line for this PR, so the model-exhaustion blocker is attached to the PR review body instead of a file line.

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["CI script: test_strix_quick_gate.sh"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: test_strix_quick_gate.sh"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_opencode_agent_contract.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_opencode_agent_contract.py"]
  R3 --> V3["targeted test run"]
Loading

@github-actions github-actions 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 exhausted the configured model pool without a usable current-head review conclusion. This is not approval evidence, so the PR is blocked until a source-backed review can establish approval sufficiency or identify concrete fixes.

Findings

1. HIGH .github/workflows/opencode-review.yml:1 - OpenCode could not establish approval sufficiency

  • Problem: every configured model path failed to produce a usable current-head control block.
  • Root cause: model execution, timeout, export, normalization, or approval-gate validation did not complete after exponential retry across the configured model pool.
  • Impact: approving from deterministic check state alone would miss PR-intent mismatches, missing files, edge-case bugs, robustness gaps, UX/DX regressions, security issues, and CodeGraph-backed base/head flow changes.
  • Fix: rerun OpenCode after model availability recovers, or update the PR with the missing files, tests, docs, generated artifacts, and verification evidence needed for a source-backed review conclusion.
  • Regression test: keep the approval gate posting REQUEST_CHANGES, not APPROVE or check-only failure, when no model produces a valid current-head review.

Summary

  • Result: REQUEST_CHANGES
  • Reason: coverage-evidence passed and peer GitHub Checks completed without failures, but no model produced a valid review control block.
  • Deterministic evidence checked but not used for approval: current-head changed-file evidence (.github/workflows/opencode-review.yml, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py); coverage-evidence result success; peer checks from statusCheckRollup excluding this OpenCode check.
  • Model outcome: model_pool=exhausted; selected_model=none.
  • Head SHA: eb4dc12facccaeb22edf6324b079cb89d7bfb107
  • Workflow run: 28535729994
  • Workflow attempt: 1

No PR approval was posted because model-output failure is not evidence that the PR has no blockers.

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["CI script: test_strix_quick_gate.sh"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: test_strix_quick_gate.sh"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_opencode_agent_contract.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_opencode_agent_contract.py"]
  R3 --> V3["targeted test run"]
Loading

NPM_CONFIG_IGNORE_SCRIPTS: "true"
NO_COLOR: "1"
OPENCODE_MODEL_CANDIDATES: "github-models/openai/gpt-5-nano"
OPENCODE_MODEL_CANDIDATES: "github-models/openai/gpt-5 github-models/openai/gpt-5-chat github-models/openai/gpt-5-mini github-models/openai/gpt-5-nano github-models/openai/o3 github-models/openai/o3-mini github-models/openai/o4-mini github-models/mistral-ai/mistral-medium-2505 github-models/meta/llama-4-maverick-17b-128e-instruct-fp8 github-models/meta/llama-4-scout-17b-16e-instruct github-models/deepseek/deepseek-r1-0528 github-models/deepseek/deepseek-r1 github-models/deepseek/deepseek-v3-0324"

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.

HIGH OpenCode could not establish approval sufficiency

  • Problem: the model pool exhausted without a valid current-head review control block, so this changed line cannot be approved from deterministic check state alone.
  • Impact: PR-intent mismatches, missing files, robustness bugs, UX/DX regressions, and CodeGraph-backed flow changes could be missed.
  • Fix: rerun OpenCode after model availability recovers, or add the missing source/test/docs/generated verification evidence needed for a source-backed approval.
  • Verification: rerun the OpenCode Review workflow and confirm it emits APPROVE or source-backed REQUEST_CHANGES for this head SHA.

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.

3 participants