♻️ refactor(codex): keep only the app-server runtime - #35
Merged
Merged
Conversation
The CLI (exec) backend ran `codex exec` for each turn while still delegating history reads and thread cleanup to an app-server child. Drop it along with the `backend` switch (`[codex] backend` and NYANPASU_CODEX_BACKEND); CodexAppServerBackend is now the only Codex runtime. BREAKING CHANGE: configs that set `[codex] backend` or NYANPASU_CODEX_BACKEND now fail config validation. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
What
exec) runtime:CodexExecBackend, thecodex.backendswitch, andNYANPASU_CODEX_BACKEND.Backends.get("codex")now always constructsCodexAppServerBackend. The exec backend already delegated history reads and thread cleanup to an app-server child, so nothing else moves.tempfile,JsonProcessRunner,Mapping) and theenvargument that only served the exec delegation.Backends/config tests keep their app-server coverage.README.mdandexamples/config.tomlto dropbackend = "app-server".CodexSessionSource(the contractCodexHistorySourceconsumes; the test doubles and the transcript layer depend on it — typing the client concretely fails 5 type-checked call sites) andJsonProcessRunner+run_json_process(now claude-only, still covered bytests/test_execution.py). A vulture scan oversrc/nyanpasureports no other unused definitions.Breaking change
A config that sets
[codex] backendorNYANPASU_CODEX_BACKENDnow fails validation (codex.backend), becauseCodexConfigforbids extra keys. Deleting the line is behavior-preserving: app-server was already the default.Validation
ruff check .,ruff format --check .,ty check --error-on-warning src packages/nyanpasu-github-reviewer/src tests packages/nyanpasu-github-reviewer/tests— cleanpytest -q— 297 passedBackends.get("codex")yieldsCodexAppServerBackend+CodexHistorySource, andinitialize→thread/read/thread/turns/listsucceed on the existing PR #370 codex thread; a config that keeps the key fails with1 validation error for NyanpasuConfig | codex.backend.🤖 Generated with Claude Code