Skip to content

♻️ refactor(codex): keep only the app-server runtime - #35

Merged
SigureMo merged 1 commit into
mainfrom
refactor/codex-app-server-only
Sep 26, 2026
Merged

SigureMo merged 1 commit into
mainfrom
refactor/codex-app-server-only

Conversation

@SigureMo

@SigureMo SigureMo commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Remove the Codex CLI (exec) runtime: CodexExecBackend, the codex.backend switch, and NYANPASU_CODEX_BACKEND.
  • Backends.get("codex") now always constructs CodexAppServerBackend. The exec backend already delegated history reads and thread cleanup to an app-server child, so nothing else moves.
  • Drop exec-only imports (tempfile, JsonProcessRunner, Mapping) and the env argument that only served the exec delegation.
  • Remove exec-only tests and the config fixture key; Backends/config tests keep their app-server coverage.
  • Update README.md and examples/config.toml to drop backend = "app-server".
  • Kept on purpose after a dead-code audit: CodexSessionSource (the contract CodexHistorySource consumes; the test doubles and the transcript layer depend on it — typing the client concretely fails 5 type-checked call sites) and JsonProcessRunner + run_json_process (now claude-only, still covered by tests/test_execution.py). A vulture scan over src/nyanpasu reports no other unused definitions.

Breaking change

A config that sets [codex] backend or NYANPASU_CODEX_BACKEND now fails validation (codex.backend), because CodexConfig forbids 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 — clean
  • pytest -q — 297 passed
  • Against the real codex CLI (0.157.1): a config without the key loads, Backends.get("codex") yields CodexAppServerBackend + CodexHistorySource, and initialize → thread/read / thread/turns/list succeed on the existing PR #370 codex thread; a config that keeps the key fails with 1 validation error for NyanpasuConfig | codex.backend.
  • Not covered: running an actual turn (the local codex account is out of quota); this change does not touch the turn path.

🤖 Generated with Claude Code

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>
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@SigureMo
SigureMo merged commit c39573a into main Sep 26, 2026
6 checks passed
@SigureMo
SigureMo deleted the refactor/codex-app-server-only branch September 26, 2026 07:06
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