Skip to content

fix(review): GPT-4.1을 첫 승인 후보로 우선#604

Open
seonghobae wants to merge 10 commits into
mainfrom
agent/opencode-gpt-first-bootstrap
Open

fix(review): GPT-4.1을 첫 승인 후보로 우선#604
seonghobae wants to merge 10 commits into
mainfrom
agent/opencode-gpt-first-bootstrap

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

변경 사항

  • 실제 current-head 리뷰에서 구조화 응답을 반환한 GPT-4.1을 첫 승인 후보로 둡니다.
  • DeepSeek V3, GPT-5.6 Luna, GPT-5/o3, DeepSeek R1 계열은 순서가 보장된 fallback으로 유지합니다.
  • 워크플로, Python 계약, Strix 정적 계약의 후보 순서를 하나로 맞춥니다.
  • PR 테스트 로그를 Actions 명령 채널에 표시할 때 충돌 없는 무작위 stop-commands 경계로 감쌉니다.
  • PR worktree의 심볼릭 링크·gitlink·비정규 모드를 trusted reader 전에 거부하고, CodeGraph 상태를 trusted 초기화 직전에 재생성합니다.
  • coverage 비교용 base/head 스냅샷은 Git 이력 없이 전달하고 수신 작업에서 합성 Git 저장소로 복원합니다.
  • 실제 fetched commit graph가 필요한 replay guard는 이력 삭제 전에 trusted source로 실행합니다.
  • 교차 저장소 coverage 아티팩트는 공개 저장소만 허용하며 비공개 소스가 중앙 저장소 artifact namespace로 넘어가지 못하게 합니다.
  • PR에서 유래한 CodeGraph·replay 로그는 Actions 명령 채널에 원문 재생하지 않고 크기와 상태만 기록합니다.

근거

  • 선행 current-head 실행에서 DeepSeek V3는 제한시간을 소진했고, Luna는 할당량, GPT-5는 요청 크기, o3는 인증 문제로 결론을 만들지 못했습니다.
  • GPT-4.1은 같은 실행에서 가장 빠르게 구조화 응답을 반환했습니다.
  • 저장소 AGENTS.md에는 GPT-4.1을 승인 후보에서 금지하는 계약이 없습니다.
  • current-head Strix가 coverage-log workflow-command 재생, PR 심볼릭 링크를 통한 trusted CodeGraph 경계 이탈, 대상 저장소 Git 이력 및 비공개 소스의 artifact 경계 노출, snapshot-only 저장소에서의 Git/replay 실패를 재현했으며 각 경로를 fail-closed로 막았습니다.

자동 리뷰 증거 계약

  • adversarial_validation의 각 probe는 구조화된 path와 양의 line, evidence의 정확한 path:line을 서로 같게 작성해야 합니다.
  • source-line-sha256 receipt는 그 동일한 current-head 줄에 결합되어야 합니다.
  • 테스트는 공격 명령이 중지 토큰 내부에만 남는지, 토큰 충돌·비정상 토큰이 거부되는지, 외부 파일 링크가 trusted reader 전에 차단되는지, 소스 아티팩트에 Git 이력이 없는지, base/head diff가 합성 저장소에서도 유지되는지 실제 셸 실행으로 검증합니다.

검증

  • bash scripts/ci/test_strix_quick_gate.sh
  • python3 -m pytest -q tests/test_opencode_agent_contract.py tests/test_opencode_model_pool_runner.py — 59 passed
  • python3 -m pytest -q — 639 passed
  • python3 -m ruff check .github scripts tests
  • actionlint -no-color -shellcheck= -pyflakes= .github/workflows/opencode-review.yml
  • YAML 파싱, Bash 구문 검사, CodeGraph sync/status, git diff --check

@seonghobae
seonghobae enabled auto-merge (squash) July 20, 2026 18:02
@seonghobae seonghobae changed the title fix(review): GPT-4.1을 첫 리뷰 후보로 사용 fix(review): GPT-4.1 승인 후보 제거 Jul 20, 2026
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head governance correction: 871db61579d7ed2652af2fba00fb225b32427278 removes GPT-4.1 from the OpenCode approval candidate pool instead of promoting it. The contract now bans openai/gpt-4.1; full central pytest is 634 passed and the focused model-pool contract is 37 passed. Hosted current-head Checks/reviews are pending.

@seonghobae seonghobae changed the title fix(review): GPT-4.1 승인 후보 제거 fix(review): GPT-4.1을 첫 승인 후보로 우선 Jul 20, 2026
Copilot AI review requested due to automatic review settings July 21, 2026 01:36

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

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR reprioritizes the OpenCode review model candidate order to try GPT-4.1 first (based on observed reliability/performance), while keeping other models as ordered fallbacks, and aligns this ordering across workflow + Python + Strix contracts. It also hardens trusted execution boundaries by preventing GitHub Actions command injection from coverage logs and by failing closed on non-regular or symlink entries in the materialized PR worktree.

Changes:

  • Reorders OPENCODE_MODEL_CANDIDATES to start with github-models/openai/gpt-4.1 and updates corresponding assertions.
  • Adds stop-command enveloping for replaying untrusted coverage summaries (collision-safe token).
  • Adds fail-closed validation of tracked file modes and symlink presence in the PR worktree; cleans .codegraph state before indexing.

Reviewed changes

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

File Description
tests/test_opencode_agent_contract.py Updates ordering expectations and adds regression tests for stop-command replay + symlink rejection contracts.
scripts/ci/test_strix_quick_gate.sh Updates Strix gate assertions to match the new model candidate ordering.
.github/workflows/opencode-review.yml Reorders model candidates and introduces new security checks (stop-commands envelope, worktree entry validation, .codegraph cleanup).

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

Comment thread .github/workflows/opencode-review.yml Outdated
Comment thread tests/test_opencode_agent_contract.py
Comment thread .github/workflows/opencode-review.yml
Copilot AI review requested due to automatic review settings July 21, 2026 03:42
@seonghobae
seonghobae enabled auto-merge (squash) July 21, 2026 03:45
@opencode-agent
opencode-agent Bot disabled auto-merge July 21, 2026 03:45

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/opencode-review.yml Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 04:16

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

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

Comment thread .github/workflows/opencode-review.yml
Comment thread .github/workflows/opencode-review.yml
Comment thread .github/workflows/opencode-review.yml Outdated
Comment thread .github/workflows/opencode-review.yml Outdated
@seonghobae

Copy link
Copy Markdown
Contributor Author

current HEAD 039c3c1에서 Strix HIGH 원인을 수정했습니다.

  • target Git object database와 .git 메타데이터는 아티팩트 생성 전에 제거합니다.
  • base/head의 일반 파일 스냅샷만 전달하고, symlink·gitlink·비정상 모드·.git 경로·unsafe tar member를 fail-closed로 거부합니다.
  • coverage job에서는 두 스냅샷으로 job-local synthetic Git 이력만 재구성해 diff-aware coverage를 유지합니다.
  • runner command delimiter는 /usr/bin/python3 절대 경로와 48자리 hex 형식 검증을 사용합니다.
  • 안정적인 sentinel 기반 계약 테스트와 tracked/untracked symlink 회귀 테스트를 추가했습니다.

로컬 검증: OpenCode 계약 및 보안 경계 74 tests passed, Strix required-workflow smoke passed, Ruff passed, YAML parse 및 git diff check passed. actionlint는 이 머신에서 기존 여러 프로세스와 동일하게 장시간 정지하여 current-head CI 결과를 기준으로 계속 추적합니다.

Copilot AI review requested due to automatic review settings July 21, 2026 04:25

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/opencode-review.yml Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 04:43

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

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

@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 could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 2fbfdf6fc9eb8b2059ac4d78d7b05e7c3307da29.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

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

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 2fbfdf6fc9eb8b2059ac4d78d7b05e7c3307da29
  • Workflow run: 29802519356
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 2fbfdf6fc9eb8b2059ac4d78d7b05e7c3307da29.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

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 AI review requested due to automatic review settings July 21, 2026 05:12
@seonghobae
seonghobae enabled auto-merge (squash) July 21, 2026 05:14

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

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