enforce read-only PR reviews#31
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1859f7c9d
ℹ️ 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".
dceoy
left a comment
There was a problem hiding this comment.
PR Review Summary
No new actionable issues meeting the review’s reporting threshold were identified beyond the existing unresolved review threads.
Checked
- review-only mode detection and slash-command expansion consistency
- read-only orchestrator and reviewer-agent boundaries
- repository binding for
gh pr viewandgh pr diffreads - pinned PR context and stale-head checks before writes
- project/inherited OpenCode configuration isolation
- existing unresolved review threads and current-head identity
Notes
Two existing unresolved findings remain applicable and were not duplicated: review-only detection can diverge from actual command expansion, and GitHub CLI PR reads are not explicitly pinned to the event repository. The combined commit-status endpoint returned no status contexts, so current-head CI was not independently confirmed through that endpoint.
Recommended Action
Address the existing unresolved command-routing and repository-binding findings before merge.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c1824aeea
ℹ️ 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".
dceoy
left a comment
There was a problem hiding this comment.
PR Review Summary
No new actionable issues meeting the review’s reporting threshold were identified beyond the existing unresolved review thread.
Checked
- current-head changes to review-only command detection and trusted command expansion
- repository binding for all
gh pr viewandgh pr diffreads - pinned repository, PR number, and head-SHA validation before review writes
- token-verification freshness checks and structured review payload validation
- review-only OpenCode configuration isolation and helper installation
- current unresolved review threads and changed documentation
Notes
The previously reported command-routing and repository-binding defects are resolved in the current head. One existing unresolved documentation finding remains and was not duplicated: the README describes the token resolver as the sole external-path exception even though the configured review boundary also permits the review helpers and review-state files. The combined commit-status endpoint returned no status contexts, so current-head CI was not independently confirmed through that endpoint.
Recommended Action
Correct the existing README trust-boundary description before merge. No additional automated blocking concerns were identified.
Detect review-only mode from the same mention-stripped effective prompt the dispatcher expands, instead of scanning the raw comment body, so a mid-sentence /review-pr mention can no longer slip past detection while still expanding into the orchestrator agent. Also pass --repo explicitly to every gh pr view/diff call in the review helpers so reads stay pinned to the event repository.
6c1824a to
011b214
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 011b2146d1
ℹ️ 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".
|
I'm unable to write the review payload to the state file due to tool permission restrictions. Let me provide the comprehensive review findings directly. OpenCode PR Review: 7 inline finding(s), 3 summary-only finding(s)Inline Findings1. README inaccurately describes external_directory allow-listed paths (important · documentation-accuracy-reviewer)File: The README claims
Fix: Update the README to enumerate all six allow-listed external paths so the documented security boundary matches the real configuration. 2. Review-only detection regex does not handle newlines in effective prompt (important · security-code-reviewer)File: The regex Fix: Strip or split on newlines before the regex check, e.g. 3.
|
dceoy
left a comment
There was a problem hiding this comment.
Reviewed the current head. I found one additional configuration-isolation gap and left it inline. The three existing unresolved findings also remain applicable: the README overstates the external-path boundary, pinned PR read failures can fall back to local mode, and no-finding/summary-only exits do not revalidate the pinned head. CI/CD and the OpenCode workflow are currently green, but these trust-boundary issues should be addressed before merge.
|
Addressed the concrete findings in 29345df, including the trust-boundary, stale-head, portability, helper-error, documentation, and focused regression-test fixes; the broader test-coverage inventory remains follow-up work. |
dceoy
left a comment
There was a problem hiding this comment.
Reviewed the current head. I found two remaining configuration-boundary regressions in action.yml: the minimum-version check admits prereleases below the required stable floor, and the non-review branch clears a caller-provided project-config opt-out. Existing review threads are resolved and CI/CD run 206 is green, but these two issues should be fixed before merge.
dceoy
left a comment
There was a problem hiding this comment.
PR Review Summary
No actionable issues meeting the review’s reporting threshold were identified.
Checked
- Current-head review-only mode detection and slash-command expansion
- Isolation from project and inherited OpenCode configuration and plugins
- Pinned repository, PR number, and head-SHA handling for GitHub reads and review writes
- App-token verification and stale-head checks before initial submission and review updates
- Structured inline-comment payload validation and read-only agent/tool boundaries
- Added Bats trust-boundary regressions and existing review discussion
Notes
The combined commit-status endpoint returned no status contexts, so current-head CI was not independently confirmed through that endpoint.
Recommended Action
No automated blocking concerns were identified. Merge remains a maintainer decision after required checks pass.
dceoy
left a comment
There was a problem hiding this comment.
Reviewed the current head. The read-only boundary, pinned-head checks, configuration isolation, and structured-review write path are materially improved, and CI/CD run 207 is green. I found one remaining control-flow inconsistency: the documented local review mode is unreachable when the event has no PR context because the command first requires the context helper to succeed and stop on any failure.
dceoy
left a comment
There was a problem hiding this comment.
Reviewed the current head. No additional actionable issues meeting the reporting threshold were identified.
Verified:
- all existing review threads are resolved
- review-only command detection matches slash-command expansion
- project and inherited OpenCode configuration are isolated
- trusted PR context and head SHA are revalidated before reads and writes
- structured inline-review payloads and helper commands remain constrained
- local review fallback is limited to events without a trusted PR number
CI/CD run 208 completed successfully, including Bats, ShellCheck, actionlint/security scans, YAML lint, and CodeQL. No blocking concerns remain from this review.
Summary
Fixes #24.
/review-prthrough a dedicated fail-closed orchestrator and read-only reviewer agents/review-pr simplifybehavior from Restore retained command dispatch and review correctness improvements #30Root cause
Review agents could execute repository-controlled commands that dirtied the checkout, while
opencode github runretained an App token capable of committing and pushing those changes. Project-controlled OpenCode configuration and plugins were also still loadable during review runs.Impact
PR review execution is now analysis-only: repository tools cannot mutate the checkout, project configuration/plugins are excluded, inherited explicit config overrides are cleared, and review submission is limited to the pinned PR head.
Validation
.agents/skills/local-qa/scripts/qa.sh