Repository navigation
Import upstream #840, and pass --effort to native reviews (from #837) - #28
Merged
Merged
Conversation
…isions Conflicts: - plugins/codex/scripts/lib/git.mjs, collectBranchContext: upstream's options.currentBranch is taken, and the fork's NUL-separated file list (listFilesZ, from openai#817) is kept. - tests/git.test.mjs: both sides' imports and tests are kept. Upstream's two snapshot tests switch branches when they see `git diff --name-only` as the first arguments; this fork runs git as `git -c core.quotePath=false ...`, so the trigger never fired and both failed. The trigger now looks past that prefix. Nothing else in them changes. Restoring the fork's previous lib/git.mjs fails three of the imported tests. Note that --end-of-options needs git 2.24 or newer.
…ng effort `/codex:review --effort <level>` was validated and then dropped (fork issue #19): a native review starts a thread and calls review/start, and never sends turn/start, the only request that carries a per-turn effort. Adapted from upstream openai#837. Only this piece is taken; the rest of that PR (--sandbox, --model/--effort on reviews, atomic writes, gating detached workers, interrupting a disconnected client's turns) is already in this fork in its own form. The effort goes on thread/start as the config override model_reasoning_effort. It is merged into any config the access parameters already carry (the --read-root permission profile uses that same field, which is how we know thread/start accepts it), and it is only sent when set, so without --effort the user's config.toml still decides. Not verified against a real codex here. The new test checks the override reaches thread/start, and that nothing is sent without --effort; dropping the effort in the companion fails it. Also records the openai#840 import in README and CHANGELOG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This imports upstream openai#840 as a merge commit, keeping upstream authorship. It also adapts one piece of upstream openai#837, which fixes fork issue #19.
openai/codex-plugin-cc#840: branch review pinned to commits
buildBranchComparisonnow resolves HEAD and the base to commits once (rev-parse --verify --end-of-options <ref>^{commit}) and builds both ranges from those SHAs. The adversarial-review guidance tells Codex to read surrounding files withgit show <commit>:<path>. This fixes two problems that the fork also had:--end-of-optionsalso keeps a base starting with-from being parsed as a git option. It needs git 2.24 or newer.lib/git.mjs: I took upstream'soptions.currentBranchand kept the fork's NUL-separated file list (listFilesZ, from fix: keep the status column and non-ASCII file names in review context openai/codex-plugin-cc#817).tests/git.test.mjs: both sides' imports and tests are kept.git diff --name-onlyas the first git arguments. This fork runs git asgit -c core.quotePath=false …, so that trigger never fired. The trigger now skips that prefix; nothing else in the tests changed.lib/git.mjsmakes three of the imported tests fail./codex:review --effortreaches Codex (adapted from openai/codex-plugin-cc#837)Before this change,
--effortwas validated and then dropped (fork issue #19). A native review starts a thread and callsreview/start. It never sendsturn/start, which is the only request that carries a per-turn effort.The effort now goes on
thread/startas the config overridemodel_reasoning_effort:configthe access parameters already carry. The--read-rootpermission profile uses that same field, which is how we knowthread/startacceptsconfig.--effortis given, so otherwise the user'sconfig.tomlstill decides.Nothing else from openai#837 is taken. Its other changes are already in this fork in its own form:
--sandbox,--model/--efforton reviews, atomic writes, gating detached workers, and interrupting a disconnected client's turns. Itsmaxeffort stays out, as with openai#761.thread/startand that nothing is sent without--effort. Removing the effort from the companion call makes it fail.codex, which is not available here.README now describes the effort as set on the review's thread, instead of saying it is dropped. The CHANGELOG is updated too.
Verification
node --test tests/*.test.mjs: 451/451 on two full runs. No broker was left running afterwards.npx tsc -p tsconfig.app-server.json: clean.Not imported
SHELLon Windows): the fork never consultsSHELLthere, since fix: avoid shell:true deprecation on Windows openai/codex-plugin-cc#725.Generated by Claude Code