-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): restore OpenCode coverage honesty and mermaid surfaces #1363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
848d796
fix(ci): restore OpenCode coverage honesty and mermaid surfaces
seonghobae 7c9e472
fix(ci): restore OpenCode receipt-gate and coverage identity
seonghobae d450f56
fix(ci): retarget honesty-surface contract pins to live dispatch
seonghobae 664fd63
fix(ci): restore path-policy honesty-surface contracts
seonghobae 3705a5d
fix(review): restore required formal-verdict gate
seonghobae 809187e
test(opencode): reproduce coverage publication identity defects
seonghobae 7fec164
fix(opencode): bind coverage publication to workflow run
seonghobae 4c23b89
test(opencode): repin reviewed dispatch workflow blob
seonghobae cc6d065
test(opencode): reject arbitrary unchanged-workflow anchors
seonghobae 5692744
fix(opencode): reject spoofed workflow anchors
seonghobae a89c4d3
test(opencode): expose dead overview sentinel lookup
seonghobae 15ae377
test(opencode): make sentinel regression executable
seonghobae 4c97a37
test(opencode): isolate dead sentinel lookup
seonghobae ab76452
fix(opencode): remove dead overview sentinel lookup
seonghobae 9170d26
test(opencode): retire sentinel-read throttle contract
seonghobae 671b500
test: remove invalid blank line at EOF
seonghobae 5abc3dd
test: reject COMMENTED as formal OpenCode receipt
seonghobae 069ded2
fix: require substantive OpenCode review verdicts
seonghobae ce68e19
test: align receipt fixtures with formal verdict contract
seonghobae 263f565
test: execute required verdict workflow instead of mirror
seonghobae 63913cb
test: correct runtime jq fixture delimiter
seonghobae 360fa42
test: use unambiguous jq marker literal
seonghobae 34e02bd
refactor: remove test-only verdict mirror
seonghobae dea5106
test: retry transient coverage identity reads
seonghobae 0d11fdf
fix: retry transient coverage identity reads
seonghobae 5c42c79
test: reproduce bare HTTP 502 retry
seonghobae b41ff0e
fix: match transient HTTP status tokens
seonghobae e76a54b
test: reject workflow anchor path aliases
seonghobae f75e98b
fix: normalize untrusted workflow anchor paths
seonghobae 5725539
fix: correct workflow anchor regex escapes
seonghobae 3e31eb5
test(opencode): expose later comment verdict masking
seonghobae 3d98c59
fix(opencode): retain latest formal head verdict
seonghobae aa43e61
test(opencode): bind coverage to dispatch run job
seonghobae 61c0bab
test(opencode): require central run coverage authority
seonghobae 2ec8215
fix(opencode): verify exact dispatch coverage job
seonghobae 186996c
fix(opencode): bind coverage to central run
seonghobae 61a9624
fix(opencode): accept central dot repository
seonghobae 37cb0ea
test(opencode): scope dispatch argument assertions
seonghobae dc106b8
test(opencode): pin reviewed dispatch workflow
seonghobae e27eb23
test(opencode): expose redundant overview writes
seonghobae c451532
fix(opencode): publish coverage overview once
seonghobae fbd0e6f
test(opencode): repin reviewed dispatch workflow
seonghobae ef60df3
test(opencode): distinguish shell fallback operator
seonghobae d229fc6
test(opencode): align overview helper contract
seonghobae 82c5ed2
test(opencode): expose Rust merge-conflict diagram drift
seonghobae b4919d3
fix(opencode): retain Rust merge-conflict diagram state
seonghobae 8d7d137
fix(ci): bind coverage jobs to exact dispatch run
seonghobae c5772d8
fix(ci): reject parent workflow anchor aliases
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # OpenCode review surfaces and OriginWeave coverage sandbox | ||
|
|
||
| 검토 기준일: **2026-08-16** | ||
|
|
||
| ## Incident | ||
|
|
||
| ContextualWisdomLab/OriginWeave#47, head | ||
| `79cf275686e2376a51783a2d03128eca21e7c0e5`, workflow run `31951179896`, | ||
| published the same body as both the formal pull-request review and the issue | ||
| comment: a generic overview plus one HIGH finding on | ||
| `.github/workflows/opencode-review.yml:1` saying coverage-evidence failed. The | ||
| pull request actually changed | ||
| `crates/originweave-destination/src/lib.rs`, `resolution.rs`, and | ||
| `tests/resolution_freshness.rs` (FreshResolutionSnapshot / DNS-rebinding | ||
| TOCTOU). The mermaid inventory said `Changed file (3 files)` because unknown | ||
| paths, including `crates/`, were bucketed as "Changed file". Repository CI on | ||
| that head passed. The central isolated coverage job failed and replaced the | ||
| entire review. | ||
|
|
||
| ## Root cause | ||
|
|
||
| When `needs.coverage-evidence.result != success`, the publisher synthesized | ||
| `REQUEST_CHANGES`, posted it with `gh pr review` and again as an issue comment, | ||
| and exited before the model pool could review the diff. Coverage-evidence | ||
| failure became the review. The mermaid helper bucketed unknown paths, | ||
| including `crates/`, as a generic `Changed file (N files)` inventory and | ||
| findings were anchored to `.github/workflows/opencode-review.yml:1` even | ||
| when that file was not in the pull-request diff. | ||
|
|
||
| ## Decision | ||
|
|
||
| Coverage remains a fail-closed gate. It is no longer the review. | ||
|
|
||
| 1. The formal pull-request review is a source-backed walkthrough of the | ||
| current-head product diff, including a fallback review that names the | ||
| changed crate files when the model pool did not emit a control block. | ||
| 2. The issue comment is gate/status only: head SHA, run id/attempt, coverage | ||
| result, model-pool outcome, verdict, and a link to the formal review. It | ||
| must not repeat `## Pull request overview`, `## Findings`, mermaid, or the | ||
| model walkthrough. | ||
| 3. A coverage miss, skip, or unsupported-tooling result blocks approval and | ||
| fails the required review job after the diff review is published. It must | ||
| not cite `.github/workflows/opencode-review.yml:1` unless that file is in | ||
| the pull-request diff. | ||
| 4. Coverage-evidence failure is injected into `bounded-review-evidence.md` as | ||
| a `## Coverage gate` section. The model pool still runs. The publisher | ||
| does not early-return before the model path. `format_request_changes_review` | ||
| keeps model walkthrough/diagrams and appends structured findings. | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| ## Verification contract | ||
|
|
||
| Regression tests prove that: | ||
|
|
||
| 1. the formal review body is not equal to the status comment; | ||
| 2. a coverage-gate failure still produces a review that names the changed | ||
| crate files; | ||
| 3. no finding is anchored to `opencode-review.yml:1` unless that file is in | ||
| the diff; | ||
| 4. mermaid labels a `crates/...` change as a Rust crate surface, not | ||
| `Changed file (3 files)`; | ||
| 5. the publisher function | ||
| `request_changes_for_coverage_evidence_failure` updates the status comment | ||
| and does not call `create_pull_review`; | ||
| 6. the model pool still runs when coverage-evidence failed (`!= cancelled`); | ||
| 7. `publish_fallback_diff_review` restores `COVERAGE_BLOCKED` on the status | ||
| comment after the COMMENT product-file review, so a coverage miss never | ||
| looks finished as `Gate result: COMMENT`; and | ||
| 8. mermaid class diagrams list extracted public Rust API names only and do | ||
| not invent a `FirstType --> SecondType` class edge. | ||
|
|
||
| ## Limitations | ||
|
|
||
| A later coverage-image or tooling catalog change can still fail the isolated | ||
| coverage job. That failure remains a coverage-gate failure, not a synthesized | ||
| product-file finding. The sandbox does not weaken a genuine below-threshold | ||
| coverage miss. | ||
|
|
||
| ## References | ||
|
|
||
| GitHub, Inc. (2026). *REST API endpoints for pull request reviews*. GitHub | ||
| Docs. | ||
| https://docs.github.com/en/rest/pulls/reviews | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.