Skip to content

Upgrade embedded Codex runtime to 0.171.0 - #570

Merged
jsgrrchg merged 4 commits into
mainfrom
chore/upgrade-codex-runtime-0.171.0
Nov 20, 2026
Merged

jsgrrchg merged 4 commits into
mainfrom
chore/upgrade-codex-runtime-0.171.0

Conversation

@jsgrrchg

Copy link
Copy Markdown
Owner

NeverWrite currently embeds Codex 0.167.0. Upgrade the embedded runtime to stable 0.171.0 (ccf9be8cc458bd6b8336fe84d68d8893f2691a5e), including every Codex dependency, the local PTY package, the committed lockfile, and packaging source checks. Both runtime executables (codex-acp and codex-code-mode-host) use the same baseline.

The PR is split into reviewable commits:

  1. chore(codex): sync PTY snapshot with runtime 0.171.0 - upstream PTY changes (Windows pipe handles, revised spawn path, new Unix nix 0.28 dependency); local ConPTY patches untouched.
  2. chore(codex): pin runtime 0.171.0 and verify patched V8 - tags, lockfile regenerated from the upstream 0.171.0 graph, patch set, staging baseline and fixtures.
  3. refactor(codex-acp): adapt turn input and runtime APIs to 0.171.0 - adapter changes for the new core API.
  4. docs(codex): record 0.171.0 compatibility baseline - maintenance docs and rollback notes.

Notable changes:

  • V8 stays at 152.2.0, so the verified rusty-v8-v152.2.0 artifacts and their pinned manifest checksums are unchanged (re-checked against the live release manifests). Only the Rust-side cppgc patch source moves from seanh-oai/rusty_v8 350c5a85 to openai-oss-forks/rusty_v8 90a65f88.
  • Upstream's Rust toolchain now matches NeverWrite's 1.99.1, so there is no toolchain change.
  • The patch set follows upstream: sqlx-core/sqlx-sqlite (needed by libsqlite3-sys 0.39.1), tungstenite, tokio-tungstenite. The Rama prerelease family stays coordinated at 0.3.0-alpha.4; rmcp resolves to 3.6.0.
  • Op::TurnInput no longer exists upstream. Prompts now start through CodexThread::start_turn_if_idle, whose result can only start a turn or decline. Declined submissions still fail the pending ACP prompt; the impossible "steered" branch and its test are removed because the type no longer expresses it.
  • The thread manager is built through build_startup_models and ThreadStoreBuilder; new thread-store listing fields are left unset.
  • New protocol fields (environment_id, rejected_audio_file_ids) are accepted without changing the ACP projection, and the new inference_hook_denied error classification passes through like the existing ones (covered by the existing classification test).
  • The bundled fallback catalog now defaults to GPT-6.2 Sol; explicit selections and the authenticated account's catalog remain authoritative. The related test is updated.
  • Rejected or cancelled patch approvals keep using PatchApproval with an abort decision, which upstream still routes to its cancellation path. The new turn-scoped CancelPatchApproval operation is not adopted here.
  • ACP v1 contracts and the existing feature restrictions are retained. No native backend or frontend changes were needed.

Rollback baseline is 0.167.0. Upstream adds state migrations 63 (session_model_ids) and 64 (thread listing indexes); the rollback notes in vendor/README.md cover this.

Validation on Linux x64:

  • Adapter workspace: 117 unit tests, 2 standalone-host integration tests, and 63 PTY tests passed with verified V8 artifacts.
  • Adapter formatting, locked all-target checking, and all-target Clippy with warnings denied passed.
  • PTY library and test sources pass cross-target checks for Windows x64 and macOS ARM64.
  • Native backend: 372 tests passed.
  • Frontend/review/staging/V8: 633 focused tests passed, along with the TypeScript check.
  • Independently built 0.167.0/0.171.0 runtime pairs passed upgrade, rollback, and re-upgrade load/resume, plus paginated history restoration, continued turns, and the missing-host fail-closed check.

Runtime smokes use isolated temporary state and a local Responses mock. Local runtime execution used debug builds; native macOS/Windows execution, signing, and full release packaging are covered by the existing package CI matrix.

Bring the local codex-utils-pty snapshot to upstream rust-v0.171.0: Windows output/diagnostic pipe handles for child commands, the updated PTY spawn path with the new unix nix dependency, and the matching platform tests. The local conpty and procthreadattr patches are untouched.
Pin every Codex git dependency to rust-v0.171.0 (ccf9be8c) and regenerate the adapter lockfile from the upstream 0.171.0 dependency graph, keeping the coordinated rama-* alpha family, rmcp 3.6.0 and libsqlite3-sys 0.39.1.

Follow the upstream patch set: the cppgc-patched V8 source moves to openai-oss-forks/rusty_v8 at 90a65f88 (V8 stays 152.2.0, so the verified rusty-v8-v152.2.0 artifacts and their pinned manifest checksums are unchanged), and sqlx-core/sqlx-sqlite plus tungstenite/tokio-tungstenite use the revisions upstream pins.

Update the staging baseline and its fixtures to the new tag, commit and V8 source.
Move prompt admission to CodexThread::start_turn_if_idle now that Op::TurnInput is gone. The StartIfIdleSubmission result can only start or decline, so the impossible-steer branch and its test are removed; declined submissions still fail the prompt with an ACP invalid-params error.

Build the thread manager through build_startup_models and ThreadStoreBuilder, and fill in the new fields on thread-store list parameters. Ignore the new environment_id and rejected_audio_file_ids event fields at the ACP boundary.

Update the bundled-default-model test for GPT-6.2 Sol, cover the new inference_hook_denied error classification, and refresh the event fixtures for the new protocol fields.
Document the 0.171.0 runtime pin, the relocated patched V8 source, the start_turn_if_idle prompt admission, the new default catalog model, the new state migrations in the rollback notes, and the validation run for this promotion.
@jsgrrchg
jsgrrchg merged commit 968aa85 into main Nov 20, 2026
21 checks passed
@jsgrrchg
jsgrrchg deleted the chore/upgrade-codex-runtime-0.171.0 branch November 20, 2026 23:18
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