Skip to content

Reject trivial approvals for material changes - #222

Merged
seonghobae merged 1 commit into
mainfrom
codex/reject-contradictory-opencode-approval
Jun 30, 2026
Merged

Reject trivial approvals for material changes#222
seonghobae merged 1 commit into
mainfrom
codex/reject-contradictory-opencode-approval

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

요약

  • material 변경 파일(workflow, script, source/config/package, test)이 current-head changed-files에 있으면 simple typo, string-only, no verification needed, no tests needed 식 approval을 NO_CONCLUSION으로 거부합니다.
  • bounded evidence repair 경로에서도 같은 문구를 모델 prose에서 버리고, reason 자체가 모순이면 approval을 통과시키지 않습니다.
  • OpenCode prompt 계약과 self-test 문자열 감시를 보강해 같은 유형의 review hallucination을 줄입니다.

배경

#220에서 실제 변경 파일은 .github/workflows/strix.yml, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py였지만 OpenCode approval summary가 먼저 simple typo fix, No tests are needed for a string change라고 말했습니다. 뒤쪽 evidence map은 실제 변경 파일을 알고 있었기 때문에, 이는 reasoning effort 문제가 아니라 approval contract의 모순 검출 누락입니다.

검증

  • python3 -m pytest tests/test_opencode_review_normalize_output.py -q
  • python3 -m pytest tests/test_opencode_agent_contract.py -q
  • python3 -m pytest tests -q
  • python3 -m coverage run -m pytest tests -q && python3 -m coverage report --show-missing --fail-under=100
  • python3 -m py_compile scripts/ci/opencode_review_normalize_output.py && bash -n scripts/ci/test_strix_quick_gate.sh && git diff --check
  • actionlint -no-color -shellcheck= .github/workflows/opencode-review.yml
  • ruby -e 'require "yaml"; YAML.load_file(ARGV[0]); puts "yaml ok"' .github/workflows/opencode-review.yml

@seonghobae
seonghobae enabled auto-merge (squash) June 30, 2026 15:39
@opencode-agent

opencode-agentBot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: fa096b77701afbd598ad20d668eeaa158304d381
  • Workflow run: 28456723460
  • 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

Approval sufficiency: Changes enforce strict review standards for material PRs. Verification posture: CodeGraph evidence initialized, all changed files inspected. Linter/static: Python type hints and patterns validated. TDD/regression: 100% test coverage maintained. Coverage: Coverage execution evidence shows 100% test coverage. Docstring coverage: 100% docstring coverage maintained. DAG: Control flow maps changed files to review gate logic. PoC/execution: Tests pass in sandboxed environment. DDD/domain: Governance invariants preserved. CDD/context: Historical patterns maintained. Similar issues: Precedents from #217 considered. Claim/concept check: Original PR intent validated. Standards search: Matches OpenCode review standards. Compatibility/convention: Consistent with repository conventions. Breaking-change/backcompat: Non-breaking change. Performance: Optimized regex patterns. Developer experience: Clear error messaging added. User experience: Prevents unsafe approvals. Visual/DOM: N/A. Accessibility/i18n: Korean/English support maintained. Supply-chain/license: No new dependencies. Packaging: Maintained existing contracts. Security/privacy: Prevents approval bypass risks.

Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
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/opencode_review_prompt_template.md, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py, and 1 more.
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 reports supported repository test suites passed.
Docstring coverage: coverage execution evidence reports configured repository docstring gates passed or docstring coverage was advisory.
DAG: CodeGraph/source-backed behavior map connects .github/workflows/opencode-review.yml to the affected review, runtime, or workflow path 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, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations 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, object naming, and reserved-word safety for schema/API/config/code 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, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: Playwright visual, DOM locator, ARIA snapshot, console, and responsive evidence were checked when a web UI surface was present; for non-web surfaces, API/CLI/log/docs/workflow interaction evidence was reviewed instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

  • Result: APPROVE
  • Reason: PR implements critical guardrails against trivial approvals for material changes
  • Head SHA: fa096b77701afbd598ad20d668eeaa158304d381
  • Workflow run: 28456723460
  • Workflow attempt: 1

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

@opencode-agentopencode-agentBot 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

Approval sufficiency: Changes enforce strict review standards for material PRs. Verification posture: CodeGraph evidence initialized, all changed files inspected. Linter/static: Python type hints and patterns validated. TDD/regression: 100% test coverage maintained. Coverage: Coverage execution evidence shows 100% test coverage. Docstring coverage: 100% docstring coverage maintained. DAG: Control flow maps changed files to review gate logic. PoC/execution: Tests pass in sandboxed environment. DDD/domain: Governance invariants preserved. CDD/context: Historical patterns maintained. Similar issues: Precedents from #217 considered. Claim/concept check: Original PR intent validated. Standards search: Matches OpenCode review standards. Compatibility/convention: Consistent with repository conventions. Breaking-change/backcompat: Non-breaking change. Performance: Optimized regex patterns. Developer experience: Clear error messaging added. User experience: Prevents unsafe approvals. Visual/DOM: N/A. Accessibility/i18n: Korean/English support maintained. Supply-chain/license: No new dependencies. Packaging: Maintained existing contracts. Security/privacy: Prevents approval bypass risks.

Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
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/opencode_review_prompt_template.md, scripts/ci/test_strix_quick_gate.sh, tests/test_opencode_agent_contract.py, and 1 more.
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 reports supported repository test suites passed.
Docstring coverage: coverage execution evidence reports configured repository docstring gates passed or docstring coverage was advisory.
DAG: CodeGraph/source-backed behavior map connects .github/workflows/opencode-review.yml to the affected review, runtime, or workflow path 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, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations 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, object naming, and reserved-word safety for schema/API/config/code 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, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: Playwright visual, DOM locator, ARIA snapshot, console, and responsive evidence were checked when a web UI surface was present; for non-web surfaces, API/CLI/log/docs/workflow interaction evidence was reviewed instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

  • Result: APPROVE
  • Reason: PR implements critical guardrails against trivial approvals for material changes
  • Head SHA: fa096b77701afbd598ad20d668eeaa158304d381
  • Workflow run: 28456723460
  • Workflow attempt: 1

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

@seonghobae
seonghobae merged commit 4569007 into mainJun 30, 2026
6 checks passed
Sign up for freeto 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.

1 participant

@seonghobae