Skip to content

fix(review): activate 3 declared github-models as review fallback candidates - #651

Open
seonghobae wants to merge 10 commits into
mainfrom
claude/contextualwisdomlab-audit-governance-qyxe67
Open

fix(review): activate 3 declared github-models as review fallback candidates#651
seonghobae wants to merge 10 commits into
mainfrom
claude/contextualwisdomlab-audit-governance-qyxe67

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

After rebasing onto current main, the three OpenCode Zen free models this PR
originally added (mimo-v2.5-free, laguna-s-2.1-free, ling-3.0-flash-free)
are already present in main (merged via the sibling Zen-pool widening,
alongside big-pickle). This PR was reduced to its one remaining non-redundant
delta: activating three github-models candidates that main declares in the
provider block but never places in the reviewer rotation.

The github-models provider block already declares these three models, but
OPENCODE_MODEL_CANDIDATES stopped at deepseek/deepseek-r1, so they were dead
declarations the pool never tried. This PR appends them to the candidate list so
a rate-limited or delisted leader falls through to three additional keyed
(GITHUB_TOKEN, free-tier) fallbacks before the pool is exhausted — directly
widening reviewer resilience during the org-wide review stall:

  • 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

Why this is safe

  • All three are already declared in the github-models provider block on
    main; this only adds them to the rotation, no new provider config.
  • All three are non-reasoning tool-calling models (not in the
    openai/gpt-5* / o3* / o4* / deepseek-r1* reasoning set), so
    scripts/ci/assert_opencode_reasoning_effort.py::validate_candidate accepts
    them with no reasoning/reasoningEffort requirement (verified green).
  • No scripts/ci/ changes, so the 100% coverage / docstring gates are
    unaffected.

Verification

  • python3 -m pytest tests -q710 passed (full suite, incl. the
    test_opencode_agent_contract.py candidate-pair + github_candidate_models
    contracts updated to pin the three new candidates).
  • yaml.safe_load parses the workflow; no conflict markers remain.

Files

  • .github/workflows/opencode-review-dispatch.yml — three github-models
    candidates appended to OPENCODE_MODEL_CANDIDATES.
  • tests/test_opencode_agent_contract.py — pins the expanded candidate list.

Summary by CodeRabbit

  • 개선 사항

    • R 테스트에서 패키지 로드 실패를 별도 보류 상태로 표시하고, current-head의 성공적인 R CMD check 이후에만 승인이 진행되도록 개선했습니다.
    • 승인 후 후속 검토 및 병합 일정 연계 절차를 보강했습니다.
    • 리뷰 처리 시간과 모델 후보 구성을 업데이트했습니다.
    • 모델별 추론 설정과 실행 사이클을 조정했습니다.
  • 버그 수정

    • R 테스트 증거가 보류된 경우 부적절하게 승인이 완료되지 않도록 수정했습니다.
    • 관련 보안 경계 및 검증 로직을 강화했습니다.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 601befda-589d-49e5-ba31-4a42b0727e9c

📥 Commits

Reviewing files that changed from the base of the PR and between ead890b and 56cc57b.

📒 Files selected for processing (2)
  • .github/workflows/opencode-review-dispatch.yml
  • tests/test_opencode_agent_contract.py
📝 Walkthrough

Walkthrough

R testthat 패키지 로드 실패를 peer R CMD check 디퍼로 분류하고 승인 게이트에 연결했습니다. OpenCode 모델 풀, 실행 사이클, 리뷰 예산을 갱신했으며 current-head 승인 후 Noema 핸드오프와 merge scheduler 환경 전달을 추가했습니다.

Changes

R 커버리지 및 승인 흐름

Layer / File(s) Summary
R testthat 디퍼 분류
.github/workflows/opencode-review-dispatch.yml, tests/test_opencode_agent_contract.py
testthat 로그를 분류해 패키지 로드 실패를 디퍼로 기록하고 coverage 결정에 peer R CMD check 필요 문구를 반영합니다.
디퍼 승인 게이트
.github/workflows/opencode-review-dispatch.yml, tests/test_opencode_agent_contract.py
current-head peer R CMD check 성공 증거를 검증하며, 검증되지 않은 경우 WAITING_FOR_R_CMD_CHECK로 승인 publish를 보류합니다.
승인 후 핸드오프와 리뷰 예산
.github/workflows/opencode-review-dispatch.yml, tests/test_opencode_agent_contract.py
리뷰 타임아웃을 325분으로 늘리고, current-head 승인 후 Noema dispatch 및 merge scheduler 환경 변수 전달을 추가했습니다.

OpenCode 모델 풀 구성

Layer / File(s) Summary
모델 카탈로그와 사이클 설정
.github/workflows/opencode-review-dispatch.yml, tests/test_opencode_agent_contract.py
opencode-free/big-pickle과 GitHub Models 후보를 추가하고 free 모델 제한값·reasoning 설정 및 모델 풀 사이클 값을 갱신했습니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CoverageEvidence
  participant PeerCheck
  participant ApprovalPublish
  participant NoemaHandoff
  CoverageEvidence->>ApprovalPublish: publish deferred coverage decision
  ApprovalPublish->>PeerCheck: verify current-head R CMD check evidence
  PeerCheck-->>ApprovalPublish: success or WAITING_FOR_R_CMD_CHECK
  ApprovalPublish->>NoemaHandoff: dispatch after current-head approval
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 reviewer fallback 후보로 3개의 github-models를 활성화한다는 핵심 변경을 정확히 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/contextualwisdomlab-audit-governance-qyxe67

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

The failing opencode-review status here is not a defect in this PR's diff — it is the org-wide central-reviewer outage this PR mitigates. The model pool exhausts and posts "did not produce approval evidence" on every current PR head right now (reproduced on #649 head 4b9422db at 13:27Z and on this head; the whole org backlog is blocked the same way). This PR's own substantive checks are green: coverage-evidence, coverage-source-tree, trivy-fs, osv-scan, dependency-review, CodeQL, Bandit, and the pinned contract tests all pass.

Because pull_request_target reviews run the base branch's workflow, this PR cannot exercise its own change (the two added Zen models land only after merge), so it cannot self-approve — the same bootstrap condition as #649/#587. It becomes mergeable the moment the model-provider quota recovers and one review run posts approval evidence, or once a sibling pool fix reaches main. No code change on this branch can make the base-branch reviewer produce approval, so I'm not force-pushing churn; the fix is to let a review run succeed (retried on the hour-out check-in) or to merge any one of the pool-fix PRs.

Local verification of this diff: 71 pytest passed (test_opencode_agent_contract, test_opencode_model_pool_runner, test_assert_opencode_reasoning_effort, test_opencode_workflow_shell_syntax), jq -n accepts the generated config (rc 0), and the reasoning-effort guard accepts both new candidates.


Generated by Claude Code

@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

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch claude/contextualwisdomlab-audit-governance-qyxe67 cannot be merged cleanly into main; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest main into claude/contextualwisdomlab-audit-governance-qyxe67, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 651 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:claude/contextualwisdomlab-audit-governance-qyxe67
# rebase path only: git push --force-with-lease origin HEAD:claude/contextualwisdomlab-audit-governance-qyxe67
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Merge Conflict Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_opencode_agent_contract.py"]
  S2 --> I2["regression suite"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["targeted test run"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 98266f8ce0cfc16dd0793a457e16dc1f6289e6f0
  • Workflow run: 30456390044
  • Workflow attempt: 2

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_opencode_agent_contract.py"]
  S2 --> I2["regression suite"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 56cc57b03c64727fcd489f2ca6184e4e07556dca
  • Workflow run: 30527071364
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 56cc57b03c64727fcd489f2ca6184e4e07556dca.

  • Head SHA: 56cc57b03c64727fcd489f2ca6184e4e07556dca

  • Workflow run: 30527071364

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: opencode-review-dispatch.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_opencode_agent_contract.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_opencode_agent_contract.py"]
  R2 --> V2["targeted test run"]
Loading

Widen the anonymous OpenCode Zen free reviewer pool with three additional
verified models so a single model's rate-limit, delisting, or transient
outage no longer exhausts the reviewer and blocks org PRs:

- opencode-free/mimo-v2.5-free      (MiMo-V2.5 Free)
- opencode-free/laguna-s-2.1-free   (Laguna S 2.1 Free)
- opencode-free/ling-3.0-flash-free (Ling-3.0-flash Free)

Complements #655/#659 (nemotron-3-ultra-free, deepseek-v4-flash-free): the
public-repo prefix now offers six free Zen candidates before the keyed
providers. Slugs verified against OpenCode's published Zen catalog
(https://opencode.ai/zen/v1). Declared as simple tool-calling models matching
the existing merged pattern (no reasoning claim), so the reasoning-effort
guard accepts them; gated behind the existing is_private == 'false'
public-repository guard so anonymous Zen never sees private code.

Contract test updated to pin the expanded candidate list.

Verification:
- python3 -m pytest tests/test_opencode_agent_contract.py tests/test_opencode_model_pool_runner.py tests/test_assert_opencode_reasoning_effort.py tests/test_opencode_workflow_shell_syntax.py -q  -> 71 passed
- jq -n over the generated config block: rc 0
- assert_opencode_reasoning_effort.validate_candidate accepts all three
- YAML safe_load parses the workflow

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msz8Dni5zRaqPatNCmZJZ8
@seonghobae
seonghobae force-pushed the claude/contextualwisdomlab-audit-governance-qyxe67 branch from 98266f8 to ee8f54d Compare July 30, 2026 00:52
@seonghobae seonghobae changed the title fix(review): add redundant OpenCode Zen free models to the review pool fix(review): add three more OpenCode Zen free models to the review pool Jul 30, 2026

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
tests/test_opencode_agent_contract.py (1)

131-133: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

새 free 모델의 생성 설정도 계약 테스트로 검증하세요.

현재 변경은 후보 ID와 순서만 검증합니다. opencode-free.models에 새 모델이 실제로 존재하고 tool_calllimit 값이 올바른지는 검증하지 않아, 후보 문자열은 통과하지만 실행 시 설정 누락·오타를 놓칠 수 있습니다. 기존 모델 검증과 동일하게 세 모델의 생성 설정을 직접 확인해 주세요.

제안하는 최소 테스트 보강
     free_models = generated_config["provider"]["opencode-free"]["models"]
+    for model_name in (
+        "mimo-v2.5-free",
+        "laguna-s-2.1-free",
+        "ling-3.0-flash-free",
+    ):
+        assert free_models[model_name]["tool_call"] is True
+        assert free_models[model_name]["limit"] == {
+            "context": 131000,
+            "output": 32000,
+        }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_opencode_agent_contract.py` around lines 131 - 133, Extend the
contract test around the new candidate IDs to inspect the corresponding entries
in opencode-free.models. Following the existing model-validation pattern, assert
that opencode-free, mimo-v2.5-free, laguna-s-2.1-free, and ling-3.0-flash-free
have the expected tool_call and limit generation settings, not just the expected
IDs and order.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/test_opencode_agent_contract.py`:
- Around line 131-133: Extend the contract test around the new candidate IDs to
inspect the corresponding entries in opencode-free.models. Following the
existing model-validation pattern, assert that opencode-free, mimo-v2.5-free,
laguna-s-2.1-free, and ling-3.0-flash-free have the expected tool_call and limit
generation settings, not just the expected IDs and order.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a6db473-2150-4a29-885f-cb805c2c1d92

📥 Commits

Reviewing files that changed from the base of the PR and between 68e573e and 42f0797.

📒 Files selected for processing (2)
  • .github/workflows/opencode-review-dispatch.yml
  • tests/test_opencode_agent_contract.py

claude and others added 3 commits July 30, 2026 01:28
Address CodeRabbit review on #651: the contract test verified the new free
models' candidate IDs and order but not that they actually exist in
opencode-free.models with the intended generation settings, so a config typo or
omission would pass the candidate-string checks yet fail at runtime.

Mirror the existing nemotron/deepseek/north validation for mimo-v2.5-free,
laguna-s-2.1-free, and ling-3.0-flash-free: assert tool_call is true, the
limit is {"context": 131000, "output": 32000}, and no response_format is set.

Verification: python3 -m pytest tests/test_opencode_agent_contract.py -q -> 37 passed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msz8Dni5zRaqPatNCmZJZ8
Adds three already-declared, tool-capable, non-reasoning github-models to the
OpenCode review candidate pool so provider rate-limiting on the OpenAI/DeepSeek
families no longer exhausts the fallback chain:

- 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

These are Mistral and Llama families with rate limits independent of the
existing OpenAI/DeepSeek github-models candidates, so they add real free
fallback capacity (github-models bills against GITHUB_TOKEN, no extra cost).
Each is already defined in opencode.jsonc's github-models provider block and in
the workflow, is not reasoning-capable (so the reasoning-effort guard requires
no extra config), and is not in the banned-candidate set.

Verification:
- tests/test_opencode_agent_contract.py — 37 passed (candidate_pairs +
  github_candidate_models assertions updated to match)
- tests/test_assert_opencode_reasoning_effort.py,
  test_opencode_workflow_shell_syntax.py, test_opencode_model_pool_runner.py
  — 34 passed
- validate_candidate() returns no errors for all three new candidates

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msz8Dni5zRaqPatNCmZJZ8
…omlab-audit-governance-qyxe67

# Conflicts:
#	.github/workflows/opencode-review-dispatch.yml
#	tests/test_opencode_agent_contract.py
@seonghobae seonghobae changed the title fix(review): add three more OpenCode Zen free models to the review pool fix(review): activate 3 declared github-models as review fallback candidates Jul 30, 2026

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (3)
tests/test_opencode_agent_contract.py (1)

167-214: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

reasoning-effort 검증 for 루프가 중복 작성됨

Line 187-192의 for model_name, model_config in free_models.items(): ... 루프가 Line 209-214에 동일하게 한 번 더 반복되어 있습니다. 두 루프는 완전히 같은 컬렉션(free_models)에 대해 같은 조건과 같은 단언을 수행하므로 후자는 실질적으로 아무 것도 추가 검증하지 않는 사문(死文)입니다. 사이에 추가된 개별 모델 limit 단언들과 분리하려다 실수로 복사된 것으로 보입니다.

♻️ 중복 루프 제거 제안
     assert free_models["mimo-v2.5-free"]["limit"] == {
         "context": 200000,
         "output": 32000,
     }
-    for model_name, model_config in free_models.items():
-        if model_config.get("reasoning") is True:
-            assert model_config["options"]["reasoningEffort"] == "high", model_name
-            assert model_config["variants"]["high"]["reasoningEffort"] == "high", (
-                model_name
-            )
     assert github_candidate_models == [
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_opencode_agent_contract.py` around lines 167 - 214, Remove the
duplicated reasoning-effort validation loop over free_models, keeping the first
loop and all individual model limit assertions unchanged.
.github/workflows/opencode-review-dispatch.yml (2)

6811-6814: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

모델 불가용 폴백 경로에서 R CMD check 요구 실패 시 메시지가 일반화됨

publish_blockers_after_model_unavailable()에서 require_r_cmd_check_for_deferred_coverage가 실패하면 단순히 return 1하여 결국 stop_without_review_after_model_unavailable(범용 "MODEL_OUTPUT_UNAVAILABLE" 메시지)로 빠집니다. 반면 정상 승인 흐름(Line 7199)에서는 동일 조건에서 hold_approval_without_review "WAITING_FOR_R_CMD_CHECK" ...로 구체적인 원인과 해결 방법을 안내합니다. 두 경로의 사용자 경험이 불일치하므로, 폴백 경로에도 동일한 WAITING_FOR_R_CMD_CHECK 본문을 재사용하도록 맞추는 것을 고려해 보세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/opencode-review-dispatch.yml around lines 6811 - 6814,
Update publish_blockers_after_model_unavailable() so a failed
require_r_cmd_check_for_deferred_coverage call uses the same
WAITING_FOR_R_CMD_CHECK hold-approval message and body as the normal approval
flow, rather than returning 1 and falling through to the generic
MODEL_OUTPUT_UNAVAILABLE path. Reuse the existing message implementation from
the normal flow and preserve the existing success behavior.

807-861: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

run_and_capture 계열의 샌드박스 래퍼를 공통 헬퍼로 묶어주세요 setpriv/timeout/환경 마스킹/로그 캡처가 run_and_capture, run_and_capture_advisory, run_r_package_testthat에 반복됩니다. command와 일부 env만 파라미터화하면 한쪽만 수정돼 설정이 어긋나는 drift를 줄일 수 있습니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/opencode-review-dispatch.yml around lines 807 - 861,
Extract the duplicated sandbox execution, environment masking, timeout, and
log-capture logic from run_and_capture, run_and_capture_advisory, and
run_r_package_testthat into one shared helper. Parameterize the command and only
the environment differences, then update all three callers to use it while
preserving their existing exit-code handling, logging, and
advisory/classification behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/opencode-review-dispatch.yml:
- Around line 6811-6814: Update publish_blockers_after_model_unavailable() so a
failed require_r_cmd_check_for_deferred_coverage call uses the same
WAITING_FOR_R_CMD_CHECK hold-approval message and body as the normal approval
flow, rather than returning 1 and falling through to the generic
MODEL_OUTPUT_UNAVAILABLE path. Reuse the existing message implementation from
the normal flow and preserve the existing success behavior.
- Around line 807-861: Extract the duplicated sandbox execution, environment
masking, timeout, and log-capture logic from run_and_capture,
run_and_capture_advisory, and run_r_package_testthat into one shared helper.
Parameterize the command and only the environment differences, then update all
three callers to use it while preserving their existing exit-code handling,
logging, and advisory/classification behavior.

In `@tests/test_opencode_agent_contract.py`:
- Around line 167-214: Remove the duplicated reasoning-effort validation loop
over free_models, keeping the first loop and all individual model limit
assertions unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ecffc7e1-2d21-4b20-9f72-a5836ae275f1

📥 Commits

Reviewing files that changed from the base of the PR and between 7ed4593 and ead890b.

📒 Files selected for processing (2)
  • .github/workflows/opencode-review-dispatch.yml
  • tests/test_opencode_agent_contract.py

@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

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 56cc57b03c64727fcd489f2ca6184e4e07556dca.

  • Head SHA: 56cc57b03c64727fcd489f2ca6184e4e07556dca

  • Workflow run: 30527071364

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: opencode-review-dispatch.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_opencode_agent_contract.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_opencode_agent_contract.py"]
  R2 --> V2["targeted test run"]
Loading

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.

2 participants