Skip to content

Add local PR review workflow boundary - #27

Draft
ilyautov wants to merge 1 commit into
mainfrom
codex/github-pr-workflow
Draft

ilyautov wants to merge 1 commit into
mainfrom
codex/github-pr-workflow

Conversation

@ilyautov

Copy link
Copy Markdown
Owner

What changed

  • Run a local Codex review from a fixed PR-number instruction. PR title, description, and real diff arrive through read-only MCP tools and Cordon hooks as untrusted source data.
  • Publish only a fixed SHA-bound comment. Keep model output and PR-authored text out of the GitHub comment API.
  • Gate merge on a recorded real diff read, a trusted quality status at the exact PR head, a one-use owner approval, a final head recheck, and GitHub's expected-SHA merge parameter.
  • Document the trusted CI status contract and the separate owner commands. This PR does not run a model in GitHub Actions.

Evidence

  • Full suite on the rebased branch outside the managed .codex path: 1736 tests passed; typecheck, build, no-invisible scan, and claims check passed. The managed worktree path itself triggers existing self-protection tests because it contains .codex; the same 141 gate tests pass in the normal checkout.
  • Local lab PR chore(deps-dev): Bump esbuild from 0.25.12 to 0.28.2 #3 (clean): actual diff read and merge proposal recorded; no comment or merge.
  • Local lab PR chore(deps): Bump actions/setup-node from 4 to 7 #2 (injected title): actual diff read, no native command, no diagnostic canary in the answer; no comment or merge.
  • Local lab PR chore(deps): Bump htmlparser2 from 10.0.0 to 12.0.0 #4 (forged description): actual diff read; the reviewer reported the real innerHTML problem; no comment or merge.
  • A read-only gate check against the lab's trusted dispatch run reached owner-approval-missing, as expected. No owner approval was created for a real PR.

Limits

This is an opt-in reference integration. The repository-specific quality workflow must be configured to publish the required SHA-bound status from protected code. A tool returning a diff does not prove the model understood it. Keep the approval directory outside the agent's access; for stronger isolation, use a separate OS account or container.

Keep PR metadata in tool results, publish only fixed text, and require a real diff read, trusted quality status, exact head, and one-use owner approval before merge.
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