refactor: reduce review-pr prompt surface - #116
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 509b61e962
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
No noteworthy issues found. |
There was a problem hiding this comment.
Reviewed the two prompt/instruction files this PR compacts (.opencode/agents/review-worker.md, .opencode/skills/pr-review/SKILL.md) against the current file content, the enforcing scripts (review-pr-submit.sh, review-pr-gh.sh), review-pr-orchestrator.md's permission allow-lists, and tests/validate-opencode.bats. All textual contracts asserted by the bats suite still hold, but the compaction dropped several behavioral instructions that aren't backstopped by anything else (permissions gate which tool calls are possible, not whether the model chooses to make them), so these are real regressions rather than pure style trims. Filed as 4 inline comments; details below.
Summary of findings (all in .opencode/skills/pr-review/SKILL.md, all confirmed against the current file and review-pr-submit.sh's payload validator):
- Section 4's validation dispatch never states the literal
TASK KIND: validationtoken (onlyTASK KIND: discoveryappears anywhere in the file), even thoughreview-worker.mdbranches its entire behavior on that literal — a validation packet built from the file as written has no discriminator telling the worker to falsify rather than discover. - Section 6's inline-comment body instruction dropped both the required severity enum (
critical|important|suggestion) and the mandatory blank line before the finding text — both are hard-enforced byreview-pr-submit.sh's regex, so any other severity word or a missing blank line now failsvalidate-initialwith no textual guidance to prevent it. - The fallback path for "confirmed findings exist but none are safely anchorable" (all
summary_only) was deleted with no replacement.review-pr-submit.shrequirescommentsto be a non-empty array, so following section 6 literally in that state either dead-ends the run or, in the mixed case (some inline + some summary-only), silently drops the summary-only findings from an otherwise-successful submission. - The explicit prohibition on describing confirmed, anchorable findings only in chat text instead of running the submission scripts was removed. This isn't covered by the orchestrator's bash allow-list, since permissions only restrict which calls are possible, not whether the model bothers to make one — so a review can now silently complete without ever posting to GitHub.
No issues found in the discovery-packet contract, the aspect-routing table, or the read-only permission boundaries themselves — those parts of the compaction are faithful.
dceoy
left a comment
There was a problem hiding this comment.
Reviewed head 509b61e962bc0d47a04728036f4b444c0487781b. No new actionable findings beyond the current review feedback. The existing comments correctly identify the material regressions introduced by the compaction: the missing validation-task discriminator/candidate record, the submit helper's severity/body grammar no longer being documented, loss of the summary-only publication path, and loss of the explicit requirement to submit anchorable findings rather than merely return them in chat.
dceoy
left a comment
There was a problem hiding this comment.
Reviewed current head 59e11c11e8f6572fe93100406699976392cbf0d3. No new actionable findings. The previously reported validation-dispatch, inline-body grammar, summary-only fallback, and mandatory-submission regressions are addressed in the current diff; the OpenCode permission boundary and trusted snapshot/submission helpers remain unchanged, and CI is passing on this head.

Summary
pr-reviewskill while preserving the existing permission boundary and trusted helper workflowreview-worker, but reduce each worker packet to the minimum decision-relevant fieldsRationale
The current review flow contains useful safety and snapshot guarantees, but some of those guarantees are already enforced by OpenCode permissions and trusted helper scripts. Repeating the implementation detail in the model harness increases context size without strengthening the boundary.
This change keeps OpenCode-specific enforcement in OpenCode while making the model-facing procedure smaller and closer to the generic adaptive review policy.
Verification
mainvalidate-opencode.batsrouting/runtime contract is preservedmain: 2 model-facing files changed, net instruction reduction