Skip to content

OpenCode 거짓 no-source 승인 차단 - #95

Merged
seonghobae merged 1 commit into
mainfrom
codex/reject-false-no-source-approvals
Jun 28, 2026
Merged

OpenCode 거짓 no-source 승인 차단#95
seonghobae merged 1 commit into
mainfrom
codex/reject-false-no-source-approvals

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

요약

  • PR #94에서 OpenCode가 workflow/script/test 변경을 보고도 no source files changed, no test files changed, no executable changes라고 승인한 사례를 중앙 gate에서 막습니다.
  • OPENCODE_CHANGED_FILES_FILE의 실제 changed-file evidence를 기준으로 workflow, script, source, test 파일이 바뀐 경우 모순되는 approval summary를 NO_CONCLUSION으로 거절합니다.
  • OpenCode prompt에도 같은 금지 문구를 추가해 모델 출력과 normalizer 계약을 맞췄습니다.

검증

  • git diff --check
  • bash -n scripts/ci/test_strix_quick_gate.sh scripts/ci/opencode_review_approve_gate.sh scripts/ci/emit_opencode_failed_check_fallback_findings.sh scripts/ci/collect_failed_check_evidence.sh scripts/ci/validate_opencode_failed_check_review.sh
  • actionlint -shellcheck= .github/workflows/opencode-review.yml
  • python3 -m pytest tests/test_opencode_review_normalize_output.py tests/test_pr_review_merge_scheduler.py
  • python3 -m coverage run -m pytest tests/test_opencode_review_normalize_output.py tests/test_pr_review_merge_scheduler.py && python3 -m coverage report --fail-under=100
  • python3 -m interrogate --fail-under=100 scripts tests
  • python3 scripts/ci/pr_review_merge_scheduler.py --self-test
  • targeted shell test for assert_opencode_review_gate_rejects_approve_without_changed_file_evidence: targeted-test: PASS

Copilot AI review requested due to automatic review settings June 28, 2026 10:57

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

This PR strengthens the OpenCode approval “gate” contract by rejecting approvals whose summary text claims “no source/test/executable changes” despite the workflow-provided OPENCODE_CHANGED_FILES_FILE showing workflow/script/source/test changes. It aligns the normalizer logic, its tests, and the workflow prompt language so the same contradiction is consistently treated as NO_CONCLUSION.

Changes:

  • Add changed-file “kind” detection (source-like / test-like) and contradiction checks to the OpenCode output normalizer.
  • Extend shell and Python tests to assert approvals with contradictory “no * changed” claims are rejected with NO_CONCLUSION (exit code 4).
  • Update the OpenCode workflow prompt to explicitly forbid contradictory “no source/test/executable changes” claims when changed-file evidence includes relevant surfaces.

Reviewed changes

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

File Description
scripts/ci/opencode_review_normalize_output.py Adds source/test/executable contradiction detection based on OPENCODE_CHANGED_FILES_FILE, enforcing NO_CONCLUSION for contradictory approvals.
tests/test_opencode_review_normalize_output.py Adds unit coverage for file-kind classification and contradiction rejection behavior.
scripts/ci/test_strix_quick_gate.sh Adds an end-to-end gate test case ensuring contradictory approvals are rejected, and verifies the workflow prompt contains the new prohibition text.
.github/workflows/opencode-review.yml Updates the OpenCode prompt contract to forbid “no source/test/executable changes” claims when changed-file evidence includes workflow/script/source/test files.

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

@opencode-agent

opencode-agent Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 02948953c00e4e0ebe3a2e6afbe30efd34c0bea9
  • Workflow run: 28319959121
  • Workflow attempt: 1
  • Gate result: APPROVE (approval step)

Pull request overview

OpenCode reviewed the current-head bounded evidence and found no blocking issues.

Findings

No blocking findings.

Summary

Prevents false 'no changes' approvals in CI reviews. Verification: Linter/static: clean, TDD/regression: +73 test lines, Coverage: 100%, Docstring coverage: 100%, DAG: change flow validated, PoC/execution: test cases verified, Developer experience: improved accuracy, User experience: prevents misleading approvals

Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including .github/workflows/opencode-review.yml, scripts/ci/opencode_review_normalize_output.py, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_review_normalize_output.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 proves 100% test coverage.
Docstring coverage: coverage execution evidence proves 100% docstring coverage.
DAG: Change Flow DAG maps .github/workflows/opencode-review.yml through bounded evidence, review risk, 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, and current-head workflow evidence 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 and compatibility 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, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: changed files did not identify a user-facing UI surface; bounded evidence was reviewed for UX impact.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

  • Result: APPROVE
  • Reason: Validates contradictory approval summaries while maintaining full coverage
  • Head SHA: 02948953c00e4e0ebe3a2e6afbe30efd34c0bea9
  • Workflow run: 28319959121
  • Workflow attempt: 1

Change Flow DAG

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

OpenCode reviewed the current-head bounded evidence and found no blocking issues.

Findings

No blocking findings.

Summary

Prevents false 'no changes' approvals in CI reviews. Verification: Linter/static: clean, TDD/regression: +73 test lines, Coverage: 100%, Docstring coverage: 100%, DAG: change flow validated, PoC/execution: test cases verified, Developer experience: improved accuracy, User experience: prevents misleading approvals

Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including .github/workflows/opencode-review.yml, scripts/ci/opencode_review_normalize_output.py, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_review_normalize_output.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 proves 100% test coverage.
Docstring coverage: coverage execution evidence proves 100% docstring coverage.
DAG: Change Flow DAG maps .github/workflows/opencode-review.yml through bounded evidence, review risk, 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, and current-head workflow evidence 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 and compatibility 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, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: changed files did not identify a user-facing UI surface; bounded evidence was reviewed for UX impact.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

  • Result: APPROVE
  • Reason: Validates contradictory approval summaries while maintaining full coverage
  • Head SHA: 02948953c00e4e0ebe3a2e6afbe30efd34c0bea9
  • Workflow run: 28319959121
  • Workflow attempt: 1

@seonghobae
seonghobae merged commit 5314827 into main Jun 28, 2026
6 checks passed
@seonghobae
seonghobae deleted the codex/reject-false-no-source-approvals branch June 28, 2026 11:08
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