Skip to content

fix(opencode): preserve unlimited dynamic model cycles - #536

Merged
opencode-agent[bot] merged 1 commit into
mainfrom
fix/opencode-dynamic-max-cycles-cap
Jul 13, 2026
Merged

fix(opencode): preserve unlimited dynamic model cycles#536
opencode-agent[bot] merged 1 commit into
mainfrom
fix/opencode-dynamic-max-cycles-cap

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

  • keep non-central OpenCode dynamic cadence from converting max-cycles=0 into one model-pool cycle
  • default OPENCODE_DYNAMIC_MAX_CYCLES_CAP to disabled and set the required workflow env to 0
  • update contract/runner tests so queue caps may bound time without disabling retry-budget cycling

Verification

  • py -m pytest tests/test_opencode_agent_contract.py::test_workflow_provisions_sandbox_tool_and_reviewer_agent tests/test_opencode_model_pool_runner.py::test_dynamic_review_cadence_caps_large_change_queue_budget -q
  • py -m pytest tests/test_opencode_model_pool_runner.py -q
  • & 'C:\Program Files\Git\bin\bash.exe' -n scripts/ci/run_opencode_review_model_pool.sh
  • $env:PATH='C:\Program Files\Git\usr\bin;' + $env:PATH; py -m coverage erase; py -m coverage run -m pytest -q tests; py -m coverage report --show-missing -> 478 passed, 8 skipped, 100% coverage

Evidence

Naruon #965 current-head OpenCode run 29248550043 had OPENCODE_POOL_MAX_CYCLES: 0, but dynamic cadence logged max-cycles 1 -> 1 and failed after one invalid provider cycle with WAITING_FOR_CHECKS while image validations were still running. This preserves the intended retry-budget cycling.

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 40401a47e9bb24a3c01a6f223539d5e496b20543
  • Workflow run: 29250291265
  • Workflow attempt: 1
  • Gate result: APPROVE (exit 0)

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

@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

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, scripts/ci/run_opencode_review_model_pool.sh, tests/test_opencode_agent_contract.py, tests/test_opencode_model_pool_runner.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.

Findings

No blocking findings.

Adversarial validation

{"status":"passed","probes":[{"path":".github/workflows/opencode-review.yml","line":3240,"hypothesis":"Changing OPENCODE_DYNAMIC_MAX_CYCLES_CAP to 0 might break dynamic cadence logic.","attack_or_counterexample":"Set OPENCODE_DYNAMIC_MAX_CYCLES_CAP=0 and verify behavior in tests.","evidence":"Tests confirm dynamic cadence logic remains intact with max-cycles=0.","outcome":"falsified"},{"path":"scripts/ci/run_opencode_review_model_pool.sh","line":249,"hypothesis":"Cap logic might incorrectly handle max-cycles=0.","attack_or_counterexample":"Verify cap_dynamic_cadence_for_queue function with max-cycles=0.","evidence":"Function correctly preserves max-cycles=0 without capping.","outcome":"falsified"}],"residual_risk":"Low; changes are well-tested and verified."}

Evidence

  • Result: APPROVE
  • Reason: PR updates OpenCode dynamic cadence settings to preserve unlimited cycles when max-cycles=0, with passing tests and no unresolved issues.
  • Scope: central OpenCode/Strix review-process
  • Changed files: 4
  • Head SHA: 40401a47e9bb24a3c01a6f223539d5e496b20543
  • Workflow run: 29250291265
  • Workflow attempt: 1

This approval path is limited to ContextualWisdomLab/.github central review-process self-repair.

@opencode-agent
opencode-agent Bot merged commit 5c0d77e into main Jul 13, 2026
48 checks passed
@opencode-agent
opencode-agent Bot deleted the fix/opencode-dynamic-max-cycles-cap branch July 13, 2026 12:38
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