-
Notifications
You must be signed in to change notification settings - Fork 0
fix(review): require every current-head file in OpenCode APPROVE #958
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
Closed
Closed
Changes from all commits
Commits
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
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
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,76 @@ | ||
| # OpenCode approval must name every current-head changed file | ||
|
|
||
| 검토 기준일: **2026-08-13** | ||
|
|
||
| ## Incident | ||
|
|
||
| The OpenCode normalizer accepted an APPROVE when the reason/summary named | ||
| *one* current-head path. CodeRabbit-style reviews walk every changed file. | ||
| Buyers comparing the two saw OpenCode approve after a single path citation | ||
| while leaving the rest of the diff unnamed. That is the “less detailed than | ||
| CodeRabbit” gap. | ||
|
|
||
| ## Decision | ||
|
|
||
| `unnamed_changed_files(reason, summary)` returns every path from | ||
| `current_changed_files()` that is not named as a whole path token. | ||
| Materialize accepts only exact SHA-256 pins or a bounded relative `-r` | ||
| include; a lone `--require-hashes` line is not lock evidence. | ||
| A longer sibling such as ``example.py.bak`` or ``docs/한.md추가`` contains | ||
| the shorter path as a prefix substring; that is not a disposition of the | ||
| shorter file (CWE-1288; MITRE, 2026). Path-token continuation uses | ||
| Unicode letters and digits, not an ASCII-only class, so a Hangul suffix | ||
| or prefix sibling cannot stand in for the shorter path (Unicode | ||
| Consortium, 2024). ``path:line`` still counts. `valid_control` | ||
| rejects APPROVE when that tuple is non-empty, both before and after | ||
| bounded-evidence repair. Developer experience / User experience | ||
| section labels were already required; this change only closes the file-walk | ||
| hole. | ||
|
|
||
| An empty changed-file set remains a no-op (`()`), so identity-only PRs are | ||
| unchanged. | ||
|
|
||
| IEEE 1028 requires every software product in the review package to | ||
| receive a recorded disposition (IEEE, 2008). Naming one path therefore | ||
| cannot authorize APPROVE when the trusted artifact lists more files. | ||
|
|
||
| ## Trust boundary | ||
|
|
||
| Changed-file identity still comes from the trusted workflow artifact, not | ||
| from model prose. The model cannot invent a smaller file set to pass the | ||
| walk. | ||
|
|
||
| ## Verification contract | ||
|
|
||
| `test_approval_must_name_every_current_head_changed_file` uses a two-file | ||
| current-head list (`scripts/ci/example.py` and `.github/workflows/strix.yml`). | ||
| Naming only the first file is rejected. Naming both is accepted. A post-repair | ||
| reason that drops the second path is still rejected. Naming only | ||
| ``scripts/ci/example.py.bak`` still leaves ``scripts/ci/example.py`` unnamed. | ||
| Naming only ``docs/한.md추가`` or ``추가docs/한.md`` still leaves | ||
| ``docs/한.md`` unnamed. | ||
|
|
||
| ## Rollback | ||
|
|
||
| Remove the `unnamed_changed_files` checks from the two APPROVE blocks and | ||
| the helper. Existing “at least one file” detection remains. | ||
|
|
||
| ## References (APA 7th) | ||
|
|
||
| MITRE. (2026). *CWE-1288: Improper validation of consistency within input*. | ||
| https://cwe.mitre.org/data/definitions/1288.html | ||
|
|
||
| IEEE. (2008). *IEEE standard for software reviews and audits* (IEEE Std | ||
| 1028-2008). https://doi.org/10.1109/IEEESTD.2008.4601584 | ||
|
|
||
| Bacchelli, A., & Bird, C. (2013). Expectations, outcomes, and challenges of | ||
| modern code review. In *Proceedings of the 35th International Conference on | ||
| Software Engineering* (pp. 712–721). IEEE. | ||
| https://doi.org/10.1109/ICSE.2013.6606617 | ||
|
|
||
| GitHub. (n.d.). *About pull request reviews*. GitHub Docs. Retrieved | ||
| August 13, 2026, from | ||
| https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews | ||
|
|
||
| Unicode Consortium. (2024). *The Unicode Standard* (Version 16.0.0). | ||
| https://www.unicode.org/versions/Unicode16.0.0/ |
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
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.