feat(review): integrate codex-reviewer into stable review pipeline#356
feat(review): integrate codex-reviewer into stable review pipeline#356mvanhorn wants to merge 2 commits intoEveryInc:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f96cf6279
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| Extract the base branch from the review context passed by ce:review-beta. | ||
|
|
||
| Fallback resolution order: | ||
| 1. Base branch from PR metadata (if reviewing a PR) | ||
| 2. Detect from remote HEAD: |
There was a problem hiding this comment.
Pass PR base branch into codex reviewer context
This step assumes ce:review-beta provides the base branch in review context, but the current subagent template only passes intent, file list, and diff (skills/ce-review-beta/references/subagent-template.md, lines 36-43). In PRs that target a non-default branch (for example release/backport PRs), this reviewer will fall back to origin/HEAD or main and run codex review against the wrong baseline, which can both miss real regressions and introduce unrelated findings.
Useful? React with 👍 / 👎.
| 1. Base branch from PR metadata (if reviewing a PR) | ||
| 2. Detect from remote HEAD: | ||
| ```bash | ||
| git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' |
There was a problem hiding this comment.
Replace chained shell recipe with single-step commands
This command uses a pipe and redirection (... 2>/dev/null | sed ...), which violates the repository's required agent/skill rule to keep shell-only examples as single simple commands with no chaining, pipes, or redirects (plugins/compound-engineering/AGENTS.md, lines 116-118). Leaving this pattern in a published reviewer prompt creates cross-platform execution drift and avoidable approval friction in sub-agent runs.
Useful? React with 👍 / 👎.
76bf361 to
70e8729
Compare
|
#348 was merged to main, so rebase off main please |
3f96cf6 to
d7a5270
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7a5270386
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ".": "2.50.0", | ||
| "plugins/compound-engineering": "2.50.0", |
There was a problem hiding this comment.
Revert release-managed version bumps from feature commit
This feat(review) commit manually bumps release-owned versions to 2.50.0 (and adds release entries) even though release automation is the canonical source for versioning/changelogs in this repo. Pre-bumping these values here can desynchronize Release Please state and cause the next automated release PR to compute the wrong delta or skip expected notes, which is exactly what AGENTS.md warns against for routine feature PRs.
Useful? React with 👍 / 👎.
| ``` | ||
|
|
||
| ``` | ||
| if [ -n "$BASE" ]; then echo "BASE:$BASE" && echo "FILES:" && git diff --name-only $BASE && echo "DIFF:" && git diff -U10 $BASE && echo "UNTRACKED:" && git ls-files --others --exclude-standard; else echo "ERROR: Unable to resolve PR base branch <base> locally. Fetch the base branch and rerun so the review scope stays aligned with the PR."; fi |
There was a problem hiding this comment.
Split chained scope command into simple shell steps
This scope command packs many operations into one shell line using &&, which conflicts with the plugin rule in plugins/compound-engineering/AGENTS.md (tool-selection section) that shell examples must be single simple commands without chaining/pipes/redirection. Because this snippet is part of the published ce:review-beta workflow prompt, it will propagate avoidable execution drift and permission friction across agent platforms instead of the intended portable behavior.
Useful? React with 👍 / 👎.
d7a5270 to
93ae222
Compare
|
Rebased onto main. Squashed the branch to a single commit on top of current main since #348's merge created too many conflicts for a clean commit-by-commit rebase. Tests match main (same 42 pre-existing failures, no new ones). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93ae22240d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
src/utils/agent-content.ts
Outdated
| if (options.mappedTools && options.mappedTools.length > 0) { | ||
| return options.mappedTools |
There was a problem hiding this comment.
Fall back when tool mapping is only partially successful
In resolveStructuredAgentTools, any non-empty mappedTools list is accepted as final, even if some source tools were unmapped and silently dropped earlier. For example, a Claude agent with tools: ["Read", "Question"] becomes tools: ["read"] in Copilot/Kiro output with no warning, which can remove capabilities the agent depends on and cause runtime failures after conversion. This should treat partial mappings as lossy (warn + safe fallback) rather than narrowing permissions silently.
Useful? React with 👍 / 👎.
|
|
|
Noted - since review-beta is now promoted to stable, should I retarget this to integrate codex-reviewer into the stable review pipeline instead? Or close this if the integration approach has changed? |
Target the stable skill. |
|
Got it - will retarget the codex-reviewer integration to the stable |
Add codex-reviewer as a cross-cutting conditional persona in ce:review. Retargeted from ce-review-beta (now promoted to stable) per maintainer feedback on PR EveryInc#356. - Add codex-reviewer.md agent with Codex CLI delegation and environment guards (sandbox detection, CLI availability check) - Register codex in persona-catalog.md and SKILL.md dispatch table - Add codex-reviewer contract tests to review-skill-contract.test.ts - Update README.md agent table with codex-reviewer entry
93ae222 to
ec8ef55
Compare
💡 Codex ReviewThe PR-mode scope command still falls back to ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Add codex-reviewer as a cross-cutting conditional persona in ce:review. Retargeted from ce-review-beta (now promoted to stable) per maintainer feedback on PR EveryInc#356. - Add codex-reviewer.md agent with Codex CLI delegation and environment guards (sandbox detection, CLI availability check) - Register codex in persona-catalog.md and SKILL.md dispatch table - Add codex-reviewer contract tests to review-skill-contract.test.ts - Update README.md agent table with codex-reviewer entry
- Remove error suppression (2>/dev/null) from `which codex` check - Split chained `git symbolic-ref | sed` into separate steps per AGENTS.md shell rule (no chaining, no error suppression) - Add fail-closed guard: do not fall back to git rev-parse against local branch names that may track a different remote - Clarify that ce:review orchestrator provides base branch context Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ec8ef55 to
f524f46
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f524f46d7f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| Extract the base branch from the review context passed by ce:review. The orchestrator passes the base branch as part of the subagent dispatch context. | ||
|
|
||
| Resolution order (stop at the first success): | ||
| 1. Base branch from the review context (ce:review always provides this for PR reviews) |
There was a problem hiding this comment.
Stop assuming ce:review passes base branch context
This instruction is currently incorrect and causes Codex to review against the wrong baseline for PRs targeting non-default branches. Fresh evidence in this commit: the stable subagent template still only passes Intent, Changed files, and Diff (plugins/compound-engineering/skills/ce-review/references/subagent-template.md, lines 37-44), so the "always provides" claim is false and the agent falls back to origin/HEAD/main, which can miss or invent regressions on release/backport PRs.
Useful? React with 👍 / 👎.
| ## What you don't flag | ||
|
|
||
| - **Style preferences** -- codex often has opinions on naming and formatting. Suppress these entirely. | ||
| - **Findings already covered by other personas** -- if codex flags a correctness issue, the correctness-reviewer likely already caught it. Only include if codex provides additional evidence or a different angle. |
There was a problem hiding this comment.
Remove impossible cross-persona suppression rule
At this point the codex reviewer is running as an independent parallel subagent and does not receive other reviewers' outputs, so telling it to suppress findings "already covered by other personas" forces guesswork and can silently drop valid issues. Since deduplication already happens centrally in Stage 5, this early suppression introduces false negatives without any reliable signal that a finding is truly redundant.
Useful? React with 👍 / 👎.
|
Rebased onto main and addressed the Codex P1 findings in f524f46:
The P2 about partial tool mapping in @tmchow this is now targeting stable |
Summary
Add
codex-revieweras a cross-cutting conditional persona in the stablece:reviewpipeline. This agent delegates code review to OpenAI's Codex CLI for cross-model validation, catching blind spots that same-model reviewers share.Retargeted from
ce-review-betato stablece:reviewper @tmchow's feedback - beta was promoted to stable in #371.Changes
plugins/compound-engineering/agents/review/codex-reviewer.md- New agent with environment guards (Codex sandbox detection atcodex-reviewer.md:17, CLI availability check atcodex-reviewer.md:32), structured findings output matching the findings schema, and conservative confidence calibration (0.65 baseline)plugins/compound-engineering/skills/ce-review/SKILL.md- Register codex-reviewer in the cross-cutting conditional persona dispatch table (line 97)plugins/compound-engineering/skills/ce-review/references/persona-catalog.md- Add codex entry to catalog (line 35)tests/review-skill-contract.test.ts- 3 new tests: agent references stable skill, registered in catalog + SKILL.md, follows structured findings contractplugins/compound-engineering/README.md- Add codex-reviewer to review agent tableContext
ce-review-betawhich was promoted to stable in feat: promotece:review-betato stablece:review#371ce:reviewce:review(notce:review-beta), usingmode:autofix(notmode:autonomous)Testing
All 389 tests pass (
bun test), including 3 new codex-reviewer contract tests verifying:ce:reviewskill (noce:review-betaremnants)This contribution was developed with AI assistance (Claude Code).