Bound OpenCode review cadence and scheduler backlog#383
Conversation
|
Superseded by #382. The 30-minute/10-minute concern is addressed there with DeepSeek V3 first, 90 minutes per model, and a 300-minute model-pool budget while preserving the safer merge-ref coverage checkout and least-privilege security workflow changes. |
Pull request was closed
|
Local verification on current head
No branch changes were made for this verification. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR adjusts the OpenCode review workflow to prevent org-wide merge blocking when model providers hang or exhaust capacity, by bounding model-pool retries and ensuring the publish/approval gate still runs to emit an explicit outcome.
Changes:
- Reorder the model candidate pool (DeepSeek V3 first) and add a total retry budget to keep the pool bounded.
- Allow the model-pool step to fail without aborting the job, and run the approval/publish gate unconditionally (
always()). - Change merge-scheduler dispatch defaults to process backlog (default
-1) instead of dispatching a single PR per run.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/test_opencode_agent_contract.py | Updates contract expectations for model ordering, timeouts, and model-pool behavior. |
| scripts/ci/test_strix_quick_gate.sh | Aligns workflow assertions with the new timeouts, retry budget, and always-run publish gate. |
| .github/workflows/pr-review-merge-scheduler.yml | Changes scheduler input defaults to “process backlog” semantics. |
| .github/workflows/opencode-review.yml | Implements bounded model-pool timing/budget and ensures the publish/approval step runs even after pool failure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| description: Maximum OpenCode/Strix review dispatch actions per scheduler run | ||
| required: false | ||
| default: "1" | ||
| default: "-1" |
| description: Maximum OpenCode/Strix review dispatch actions per scheduler run | ||
| required: false | ||
| default: "1" | ||
| default: "-1" |
| - name: Run OpenCode PR Review model pool | ||
| id: opencode_review_model_pool | ||
| if: needs.coverage-evidence.result == 'success' | ||
| timeout-minutes: 350 | ||
| timeout-minutes: 330 | ||
| continue-on-error: true |
| - name: Approve PR if OpenCode review passed | ||
| if: >- | ||
| always() | ||
| && ( | ||
| needs.coverage-evidence.result != 'success' | ||
| || steps.opencode_review_model_pool.outcome == 'success' | ||
| ) | ||
| if: always() |
Problem
Required OpenCode Review checks are blocking merges across the org when the model pool hangs or exhausts provider capacity. The old behavior either let one model/provider consume the whole step or ended with an opaque GitHub Actions timeout, so PRs accumulated without a source-backed APPROVE/REQUEST_CHANGES result or a useful failure reason.
Current decision
This PR is the canonical OpenCode review cadence fix. It supersedes older conflicting budget PRs (#281, #348, #372).
github-models/deepseek/deepseek-v3-0324first because it has the best observed success rate in the current org queue.OPENCODE_RUN_TIMEOUT_SECONDS=5400) so deep reviews are not cut short.OPENCODE_TOTAL_RETRY_BUDGET_SECONDS=18000) inside a 330-minute step, leaving time for the publish/approval gate to log the explicit reason when no model succeeds.always()so model-pool failure becomes visible review evidence instead of disappearing behind a skipped gate.Verification
py -3 -m pytest tests/test_opencode_agent_contract.py tests/test_opencode_review_normalize_output.py tests/test_pr_review_fix_scheduler.py-> 56 passed, 1 skipped.git diff --check-> passed.codegraph sync .-> completed.bash -n scripts/ci/test_strix_quick_gate.shdid not complete within 120s on this Windows workspace; the edited assertions are covered by the Python contract test and static grep checks.Queue cleanup
Closed superseded/contradictory OpenCode budget PRs: