Skip to content

fix(review): add OpenCode Zen free fallback - #653

Closed
seonghobae wants to merge 2 commits into
mainfrom
fix/opencode-zen-free-reviewer
Closed

fix(review): add OpenCode Zen free fallback#653
seonghobae wants to merge 2 commits into
mainfrom
fix/opencode-zen-free-reviewer

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add anonymous OpenCode Zen free reviewers for public repositories, preferring deepseek-v4-flash-free and retaining North as fallback
  • keep the existing public-repository privacy gate and strict review-control validation
  • preserve reviewer tool calls; do not force response_format, which made OpenCode describe a Read call as text instead of executing it

Closes #648.
Unblocks ContextualWisdomLab/saju-caldav#14.
Supersedes #649 with the same verified final diff as one clean commit.

Runtime evidence

  • probe 1 — path .github/workflows/opencode-review-dispatch.yml, line 3364: challenged whether a free JSON-capable reviewer could still use tools; in an isolated OpenCode run, DeepSeek V4 Flash Free invoked Read on a sample file and then returned exact JSON
  • probe 2 — path .github/workflows/opencode-review-dispatch.yml, line 3720: challenged whether anonymous Zen could receive private-repository content; the existing is_private == false gate still wraps both free candidates, and the contract test parses that exact ordering
  • anonymous Zen endpoint smoke: DeepSeek V4 Flash Free returned exact JSON
  • North reached the provider; it remains a fallback

Verification

  • full python3 -m pytest -q — 674 passed for the identical final diff
  • tests/test_opencode_agent_contract.py — 37 passed on this commit
  • Bash syntax, focused Ruff, actionlint -shellcheck=, and git diff --check — passed

Summary by CodeRabbit

  • 개선 사항
    • 자동화된 OpenCode 리뷰 워크플로의 모델 선택지가 확대되었습니다.
    • opencode.jsonc 생성 시 opencode-free 후보 구성이 업데이트되어 모델 선택 풀/우선순위가 달라졌습니다.
    • DeepSeek 후보 추가에 맞춰 free-period 관련 코멘트가 갱신되었습니다.
  • 테스트
    • 모델 후보 문자열 및 생성된 모델 설정에 대한 검증이 더 엄격해졌습니다.
    • opencode-free의 DeepSeek/North Mini 대상에 대해 tool 호출 허용 여부와 응답 포맷 옵션 포함 여부를 추가로 확인합니다.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

OpenCode 설정에 deepseek-v4-flash-free 모델과 public 저장소용 후보를 추가하고, 후보 순서 및 생성된 모델 설정의 도구 호출·응답 형식을 검증하는 계약 테스트를 갱신합니다.

Changes

OpenCode 모델 풀 확장

Layer / File(s) Summary
무료 모델 설정 및 후보 연결
.github/workflows/opencode-review-dispatch.yml
deepseek-v4-flash-free 모델에 도구 호출과 컨텍스트·출력 제한을 설정하고, public 저장소 후보 목록 및 관련 설명을 갱신합니다.
모델 풀 계약 검증
tests/test_opencode_agent_contract.py
후보 문자열과 첫 후보 순서를 갱신하고, 두 무료 모델의 tool_callresponse_format 설정을 검증합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed 무료 Zen 모델에 JSON 응답과 툴 호출 구성을 반영하고, 공개 저장소 gate 및 회귀 테스트도 함께 보강했습니다.
Out of Scope Changes check ✅ Passed 변경은 워크플로와 테스트에 한정되어 있어 명시된 목표 밖의 수정은 보이지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 OpenCode Zen 무료 폴백 추가라는 핵심 변경을 간결하게 잘 요약합니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/opencode-zen-free-reviewer

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

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

Actionable comments posted: 1

🤖 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.

Inline comments:
In @.github/workflows/opencode-review-dispatch.yml:
- Line 3718: OPENCODE_MODEL_CANDIDATES 위의 주석을 실제 후보 순서에 맞게 수정하세요. DeepSeek v4
Flash Free를 우선 사용하고 North Mini Code Free를 fallback으로 설명하며, 두 free endpoint의 보존 및
개선 예외에 대한 설명도 동일한 우선순위를 반영하도록 정렬하세요.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bae3e0e5-44a6-4679-b898-2c117435e41a

📥 Commits

Reviewing files that changed from the base of the PR and between 5472a38 and dcacf10.

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

Comment thread .github/workflows/opencode-review-dispatch.yml
@opencode-agent
opencode-agent Bot disabled auto-merge July 29, 2026 16:16

@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 evidence but found unresolved reviewer or review-agent threads before approval.

Findings

1. HIGH .github/workflows/opencode-review.yml:1 - Unresolved reviewer thread blocks automated approval

  • Problem: OpenCode reached an APPROVE control result, but the approval step found unresolved, non-outdated human or review-agent thread evidence on the current pull request.
  • Root cause: Reviewer and review-agent feedback can arrive after bounded model evidence is prepared, so the approval step must re-query GitHub immediately before publishing an approval.
  • Fix: Address or resolve the listed reviewer thread(s), then re-run OpenCode on the current head.
  • Regression test: Keep the approval gate querying reviewThreads(first: 100) after model output and before create_pull_review APPROVE, including bot review agents other than OpenCode itself.

Review thread evidence

Latest unresolved reviewer thread evidence

.github/workflows/opencode-review-dispatch.yml line 3718

  • Latest reviewer comment: @coderabbitai at 2026-07-29T16:16:25Z

  • Comment URL: #653 (comment)

  • Comment excerpt: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win / <details> / <summary>🧩 Analysis chain</summary> / 🏁 Script executed: / '''shell / #!/bin/bash / set -euo pipefail / file=".github/workflows/opencode-review-dispatch.yml"

  • Result: REQUEST_CHANGES

  • Reason: unresolved reviewer or review-agent thread(s) were present before approval.

  • Head SHA: dcacf10804cad4af10f346cfa702b0a388c3628d

  • Workflow run: 30469752317

  • Workflow attempt: 1

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

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: dcacf10804cad4af10f346cfa702b0a388c3628d
  • Workflow run: 30469752317
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode reviewed the current-head evidence but found unresolved reviewer or review-agent threads before approval.

Findings

1. HIGH .github/workflows/opencode-review.yml:1 - Unresolved reviewer thread blocks automated approval

  • Problem: OpenCode reached an APPROVE control result, but the approval step found unresolved, non-outdated human or review-agent thread evidence on the current pull request.
  • Root cause: Reviewer and review-agent feedback can arrive after bounded model evidence is prepared, so the approval step must re-query GitHub immediately before publishing an approval.
  • Fix: Address or resolve the listed reviewer thread(s), then re-run OpenCode on the current head.
  • Regression test: Keep the approval gate querying reviewThreads(first: 100) after model output and before create_pull_review APPROVE, including bot review agents other than OpenCode itself.

Review thread evidence

Latest unresolved reviewer thread evidence

.github/workflows/opencode-review-dispatch.yml line 3718

  • Latest reviewer comment: @coderabbitai at 2026-07-29T16:16:25Z

  • Comment URL: fix(review): add OpenCode Zen free fallback #653 (comment)

  • Comment excerpt: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win / <details> / <summary>🧩 Analysis chain</summary> / 🏁 Script executed: / '''shell / #!/bin/bash / set -euo pipefail / file=".github/workflows/opencode-review-dispatch.yml"

  • Result: REQUEST_CHANGES

  • Reason: unresolved reviewer or review-agent thread(s) were present before approval.

  • Head SHA: dcacf10804cad4af10f346cfa702b0a388c3628d

  • Workflow run: 30469752317

  • Workflow attempt: 1

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

@seonghobae
seonghobae enabled auto-merge (squash) July 29, 2026 16:25
@opencode-agent
opencode-agent Bot disabled auto-merge July 29, 2026 16:25
@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by #654, which carries the CodeRabbit-verified final diff and corrected privacy/order comment as one clean commit so the required OpenCode review receives bounded current-head evidence without resolved review history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Fix Zen free review JSON output contract

1 participant