Skip to content

fix(review): bind verified evidence in scripts/ci/opencode_review_normalize_output.py#563

Open
seonghobae wants to merge 8 commits into
mainfrom
agent/opencode-binding-bootstrap
Open

fix(review): bind verified evidence in scripts/ci/opencode_review_normalize_output.py#563
seonghobae wants to merge 8 commits into
mainfrom
agent/opencode-binding-bootstrap

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

자동 리뷰 증거 계약

  • adversarial_validation의 각 probe는 구조화된 path와 양의 line, evidence의 정확한 path:line을 서로 같게 작성해야 합니다.
  • source-line-sha256 receipt는 그 동일한 current-head 줄에 결합되어야 합니다.

Purpose

This pull request repairs three fail-closed review-process edge cases observed on the protected base:

  1. A model may provide a sealed, exact structured path and positive line with one matching source-line-sha256 receipt while omitting only the redundant path:line text in free-form evidence.
  2. A model may cite and receipt-bind exactly one current-head changed-file line in evidence while copying a different valid changed-file location into the redundant structured fields.
  3. The workflow-less REST fallback may surface an old cancelled scan-pr-queue scheduler replacement even though the typed check-rollup path already ignores that scheduler cancellation.

The normalizer now restores the missing redundant citation, or rebinds the structured location only when the evidence contains exactly one distinct current-head changed-file citation whose recomputed sealed line digest matches the single receipt. The REST fallback ignores only cancelled scan-pr-queue; real failures, timeouts, action-required states, startup failures, and unrelated cancellations remain blockers.

Fail-closed boundaries

  • missing, duplicate, mismatched, or ambiguous source receipt/location
  • unsafe, nonexistent, or unchanged path
  • invalid or out-of-range line
  • proofless, circular, negated, or unobserved evidence
  • current-head artifact provenance mismatch
  • unreceipted runtime-tool claim
  • any non-scheduler cancelled check or any real failed check

Current HEAD evidence

  • Head SHA: 90f4c5171b6d6e4906b792100547ffef30b2cc5a
  • Changed files:
    • .github/workflows/opencode-review.yml
    • scripts/ci/opencode_review_normalize_output.py
    • scripts/ci/test_strix_quick_gate.sh
    • tests/test_opencode_model_pool_runner.py
  • python3 -m pytest -q: 639 passed
  • Focused normalizer/model-pool suite: 120 passed
  • Python coverage: 5,598 executable statements, 100% (0 missing)
  • ruff check .: passed
  • git diff --check: passed
  • relevant shell syntax/static contracts: passed
  • current-head CodeGraph index: synchronized

Review run 29728911432 correctly failed closed when the first version left two new guard branches uncovered. This head adds direct missing-receipt and invalid-line regressions; the exact sandbox command now reports 639 passed and 100% coverage. Earlier exact-head review run 29712237568 reached GPT-4.1 successfully but rejected its otherwise structured response because the evidence citation and redundant structured location differed. Other pool attempts ended in timeout, quota, context, authentication, or provider errors. This change addresses only that safely provable binding drift and keeps all ambiguous cases closed.

Verified current-head source traces

  • scripts/ci/opencode_review_normalize_output.py:686 observed comparison of a cited line's recomputed digest with the single receipt. source-line-sha256=749d101c3c3a59a42cc50783eddd72e1d5fef3a9f510feaa47091dee5d660ab6
  • scripts/ci/opencode_review_normalize_output.py:688 observed the exactly-one-distinct-location guard. source-line-sha256=56d7c2581137da6e2720fa3bd9d5e6e070f3944a4a7481e758cd6b1f516aa5cb
  • scripts/ci/opencode_review_normalize_output.py:750 observed structured-field rebinding through the receipt-verified locator. source-line-sha256=26801fb3ba1c564f5e5feec60c2e504e48068cc16aeacc09829960432ffa9c98
  • tests/test_opencode_model_pool_runner.py:192 observed the unique cited line replacing the drifted structured line. source-line-sha256=dd19cfb3e654e798e96f1f770cbd0b8a4c5c18dc58e88553a3614c16834e8e01
  • tests/test_opencode_model_pool_runner.py:220 observed identical multi-location evidence remaining unmodified and rejected. source-line-sha256=4088b2e8c04ae361be179c67b641283833fb799062d70ae8e7631c674617ccaa
  • .github/workflows/opencode-review.yml:6121 observed the narrowly scoped workflow-less scheduler cancellation filter. source-line-sha256=6c45a4ae7b52a024b440370824958af8c43445b1d5f610efbab63025810a6037
  • scripts/ci/test_strix_quick_gate.sh:1017 observed the matching static workflow contract. source-line-sha256=4050a1b3da1248f6e5f40262a6c81a241f3b491deb50976eaecf9dbc1c467eef

Expected review behavior

The protected-base normalizer may repair only redundant binding drift that is independently and uniquely proven by the current-head changed-file manifest, sealed source tree, exact line bytes, and one source-line receipt. It must continue to reject every missing, unsafe, ambiguous, mismatched, circular, or unobserved case. The approval gate should ignore only the superseded scheduler cancellation and continue to surface any real failed peer check.

@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 cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 4ff50eca109bb1410275e024c92fef348f278147.

  • Head SHA: 4ff50eca109bb1410275e024c92fef348f278147

  • Workflow run: 29404144238

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["CI script: opencode_review_normalize_output.py"]
  S1 --> I1["review and security gate shell path"]
  I1 --> R1["Review risk: CI script: opencode_review_normalize_output.py"]
  R1 --> V1["bash -n plus Strix self-test"]
  Evidence --> S2["Test (2 files)"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test (2 files)"]
  R2 --> V2["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 55219f0b317a63a5effab6e19e38fc5e2ab639cf
  • Workflow run: 29728911432
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 55219f0b317a63a5effab6e19e38fc5e2ab639cf.

  • Head SHA: 55219f0b317a63a5effab6e19e38fc5e2ab639cf

  • Workflow run: 29728911432

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 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 (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_model_pool_runner.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_opencode_model_pool_runner.py"]
  R3 --> V3["targeted test run"]
Loading

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review July 15, 2026 09:31

Superseded automated coverage review from previous head 4ff50ec; exact current head c28eb67 restores 100% measured statement coverage.

@seonghobae seonghobae changed the title fix(review): 봉인된 probe 위치 binding 부트스트랩 fix(review): bind verified probe evidence to exact path:positive-line Jul 15, 2026
@seonghobae seonghobae changed the title fix(review): bind verified probe evidence to exact path:positive-line fix(review): bind verified evidence in scripts/ci/opencode_review_normalize_output.py Jul 15, 2026
@opencode-agent
opencode-agent Bot force-pushed the agent/opencode-binding-bootstrap branch 2 times, most recently from 681447e to 0042e90 Compare July 16, 2026 22:15

@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 cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 0042e9079990d5478294a369200101d88a2df79b.

  • Head SHA: 0042e9079990d5478294a369200101d88a2df79b

  • Workflow run: 29538997259

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["CI script: opencode_review_normalize_output.py"]
  S1 --> I1["review and security gate shell path"]
  I1 --> R1["Review risk: CI script: opencode_review_normalize_output.py"]
  R1 --> V1["bash -n plus Strix self-test"]
  Evidence --> S2["Test: test_opencode_model_pool_runner.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_opencode_model_pool_runner.py"]
  R2 --> V2["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 cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 099f538b7503288325077595a11eb1a7d8f016b4.

  • Head SHA: 099f538b7503288325077595a11eb1a7d8f016b4

  • Workflow run: 29553130324

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 3

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["CI script: opencode_review_normalize_output.py"]
  S1 --> I1["review and security gate shell path"]
  I1 --> R1["Review risk: CI script: opencode_review_normalize_output.py"]
  R1 --> V1["bash -n plus Strix self-test"]
  Evidence --> S2["Test: test_opencode_model_pool_runner.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_opencode_model_pool_runner.py"]
  R2 --> V2["targeted test run"]
Loading

@opencode-agent
opencode-agent Bot force-pushed the agent/opencode-binding-bootstrap branch from 099f538 to 196c5a4 Compare July 17, 2026 08:28
@seonghobae
seonghobae dismissed stale reviews from opencode-agent[bot] and opencode-agent[bot] July 19, 2026 22:41

Current head 196c5a4 supersedes the reviewed 0042e90 coverage-failure head; dismissing only this stale review before an exact-head rerun.

@seonghobae
seonghobae enabled auto-merge (squash) July 19, 2026 22:42

@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 196c5a4c76dcbde28a374c55e975f9b45c74fc5a.
  • 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["CI script: opencode_review_normalize_output.py"]
  S1 --> I1["review and security gate shell path"]
  I1 --> R1["Review risk: CI script: opencode_review_normalize_output.py"]
  R1 --> V1["bash -n plus Strix self-test"]
  Evidence --> S2["Test: test_opencode_model_pool_runner.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_opencode_model_pool_runner.py"]
  R2 --> V2["targeted test run"]
Loading

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review July 20, 2026 02:14

Superseded by current head 3b2255b, which adds the regression-tested REST fallback filter for the cancelled scheduler check cited by this old-head review.

@opencode-agent
opencode-agent Bot disabled auto-merge July 20, 2026 02:14
@seonghobae
seonghobae enabled auto-merge (squash) July 20, 2026 02:15

@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 cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 55219f0b317a63a5effab6e19e38fc5e2ab639cf.

  • Head SHA: 55219f0b317a63a5effab6e19e38fc5e2ab639cf

  • Workflow run: 29728911432

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 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 (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_model_pool_runner.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_opencode_model_pool_runner.py"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent
opencode-agent Bot disabled auto-merge July 20, 2026 08:47
@seonghobae

Copy link
Copy Markdown
Contributor Author

중복 구현 감사 결과

current HEAD 90f4c5171b6d6e4906b792100547ffef30b2cc5a의 고유 수신증명 위치 재결합은 #560 current HEAD de8391f23ca9815df22615f3be5109acf08343d4에 더 강한 신뢰 경계로 흡수되어 있습니다.

  • #563은 모델 evidence가 인용한 변경 라인의 digest를 봉인 트리에서 다시 계산해 유일한 일치 위치를 찾습니다.
  • #560은 신뢰 실행 단계가 생성하고 artifact manifest가 봉인한 source-line receipt 인덱스만 사용하며, 동일 digest 다중 위치에서는 정확히 하나의 인용만 허용합니다.
  • #560은 변조 digest, 잘못된 위치, 봉인 evidence 읽기 실패, 다중/누락 receipt를 fail-closed하고 후보 수 진단도 남깁니다.
  • 대응 회귀 6개가 통과했고 전체 749 passed, scripts/ci 6,481 statements 100%, current-head Strix/CodeQL/Trivy/OSV/dependency-review/Bandit/pip-audit/Semgrep/gitleaks가 모두 통과했습니다. code-scanning alert와 미해결 review thread는 0건입니다.

#560의 current-head OpenCode review 실행 29745643580이 현재 진행 중입니다. 기능 유실을 막기 위해 #560이 병합될 때까지 이 PR은 열어 두고, 병합 직후 중복 PR로 정리하겠습니다. 오래된 55219f0... 대상 CHANGES_REQUESTED 리뷰는 현재 결함 근거로 사용하지 않습니다.

@seonghobae
seonghobae enabled auto-merge (squash) July 20, 2026 21:20
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.

1 participant