Skip to content

Commit 5f9b684

Browse files
committed
Add permission_profile defaulting to :workspace, while keeping legacy sandbox as fallback when permission_profile is empty.
Add optional codex_version. Precompute changed files, diff stat, and a bounded patch snapshot before invoking Codex. Pass Codex a generated prompt-file and output-schema-file. Fail closed if Codex returns a meta-response claiming it cannot inspect the PR diff, instead of posting that as a review. Update actions/github-script, actions/setup-node, and pnpm/action-setup to Node-24-compatible majors.
1 parent 6ee7834 commit 5f9b684

2 files changed

Lines changed: 273 additions & 92 deletions

File tree

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
install_command: pnpm install --frozen-lockfile
7272
working_directory: .
7373
codex_effort: high
74-
sandbox: workspace-write
74+
permission_profile: ":workspace"
7575
review_focus: |
7676
Focus on:
7777
- correctness bugs
@@ -111,7 +111,9 @@ This is deliberate. Running fork code in a secret-bearing job is a real secret-e
111111
- `pnpm_version`: pnpm version for `pnpm/action-setup`
112112
- `install_command`: dependency installation command
113113
- `codex_effort`: Codex effort level
114-
- `sandbox`: Codex sandbox mode
114+
- `sandbox`: legacy Codex sandbox mode, used only when `permission_profile` is empty
115+
- `permission_profile`: Codex permission profile, default `:workspace`
116+
- `codex_version`: optional Codex CLI version passed through to `openai/codex-action`
115117
- `review_focus`: extra review criteria inserted into the prompt
116118
- `extra_prompt`: extra prompt text appended after the standard review instructions
117119

@@ -120,7 +122,9 @@ This is deliberate. Running fork code in a secret-bearing job is a real secret-e
120122
## Notes
121123

122124
- The action expects `pnpm` by default, but the caller can override `install_command`, `node_version`, `pnpm_version`, and `working_directory`.
123-
- The action embeds its output schema inline so callers do not need to copy schema files into their own repositories.
125+
- The action generates its output schema at runtime so callers do not need to copy schema files into their own repositories.
126+
- The action precomputes the PR diff stat, changed files, and a bounded patch snapshot before invoking Codex so the model has review context immediately and can still inspect the checkout for deeper analysis.
127+
- If Codex returns a meta-response claiming it cannot inspect the PR diff, the action fails closed instead of posting that response as a PR review.
124128
- The action emits inline comments in a single batched PR review when findings have a valid `path` and a line that GitHub can anchor on the right side of the PR diff.
125129
- The action posts inline comments only for initial PR review events (`opened`, `reopened`, `ready_for_review`) and for manual `workflow_dispatch` reruns; `synchronize` reruns update only the summary comment to avoid repeated inline comment spam.
126130
- The action preserves existing inline comments across reruns so review threads can be resolved manually; only the summary comment is updated in place after the initial inline review.

0 commit comments

Comments
 (0)