OpenCode 거짓 no-source 승인 차단 - #95
Conversation
There was a problem hiding this comment.
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 Review Overview
Pull request overviewOpenCode reviewed the current-head bounded evidence and found no blocking issues. FindingsNo blocking findings. SummaryPrevents 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.
Change Flow DAGflowchart 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"]
|
There was a problem hiding this comment.
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
요약
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으로 거절합니다.검증
git diff --checkbash -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.shactionlint -shellcheck= .github/workflows/opencode-review.ymlpython3 -m pytest tests/test_opencode_review_normalize_output.py tests/test_pr_review_merge_scheduler.pypython3 -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=100python3 -m interrogate --fail-under=100 scripts testspython3 scripts/ci/pr_review_merge_scheduler.py --self-testassert_opencode_review_gate_rejects_approve_without_changed_file_evidence:targeted-test: PASS