Skip to content

Transport V2: consolidate SDK, proxy, and Maple client cutover - #873

Merged
AnthonyRonning merged 12 commits into
masterfrom
codex-session-v2-cutover
Sep 14, 2026
Merged

AnthonyRonning merged 12 commits into
masterfrom
codex-session-v2-cutover

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Maple’s TypeScript and Rust clients now use Transport V2 with authenticated request envelopes and response records. This consolidates the complete reviewed client implementation into one PR against current monorepo master and supersedes #872.

Rebased onto master b8c0aa9d after the separately merged Rustls security fix #917. All twelve transport patches are unchanged; all five Rustls dependency records match master. The backend and toolkit trees also match master.

The changes include native and hosted account confirmation, session-bound OAuth handoff, persistence before credential publication, proxy response deadlines and authenticated CORS, and one bounded session-recovery resend. The isolated V1 browser bridge remains available for OAuth continuations from already-installed V1 desktop clients.

The monorepo rebase preserves current package names and published versions, links Research, Agent, and the shared proxy to the in-tree SDK, and keeps the newer inference-send budget across session and capacity recovery. The new Agent consumer retains its originating OAuth SDK session through completion and handles cancellation through UI delivery. Backend source is unchanged.

Browser compatibility also fixes native Window.fetch receiver binding for fresh and restored V2 sessions. Regression tests reproduce the pre-fix failure. Browser-storage fixtures now restore their globals, and concurrent recovery coverage no longer depends on encryption completion order. Settings logout also limits its authentication redirect to Settings routes, preventing the exiting layout from recursively wrapping the login URL after credentials clear. The comparison preserves case-insensitive routing and the original return URL; nine real-router regression cases cover the transition.

Validation completed before the final rebase:

  • TypeScript SDK: 221 tests passed, 3 hosted-attestation skips; build and formatting passed.
  • Rust SDK: 103 library tests passed, plus focused session-recovery coverage; strict pinned Clippy and documentation passed.
  • Research: 895 frontend tests and 417 native tests passed (2 native tests ignored); formatting, lint, typecheck, and the dev-configured web build passed.
  • Agent: 730 workspace tests passed (3 ignored), plus 33 headless tests; OAuth cancellation and UI receipt regressions, pinned format, all four Clippy modes, and warning-denied builds passed.
  • Proxy: 35 tests passed; pinned format/Clippy, documentation, and dependency checks passed.
  • Disposable in-tree backend integration: all six TypeScript suites passed (82 tests, 18 skips); Rust integration passed, including the explicitly enabled native OAuth handoff round trip. Live-provider and hosted-attestation checks were disabled.
  • Root Nix flake checks and single-SDK dependency-identity checks passed.
  • Independent source review found no remaining actionable issues after the Agent OAuth receipt fix.

Post-rebase validation on f16084aa: Rust SDK formatting, strict locked Clippy, 103 library tests (including all 18 session-recovery tests; 1 other test ignored), and warning-denied documentation passed. Proxy formatting, strict locked Clippy, 35 tests, documentation, and dependency checks passed. Research and Agent locked dependency graphs both resolve the in-tree SDK and a single local proxy. Independent review confirmed unchanged transport patches, preserved upstream changes, and valid signatures on all twelve commits. New-head GitHub CI is pending; the live smoke evidence below predates this rebase.

Live dev web smoke passed using the local PR-profile production bundle with the development enclave, PCR policy, flags, and billing endpoints. Verified email login, account/plan loading, chat and follow-up context, incremental streaming, mid-stream cancellation and subsequent send, reload/history, model selection, image analysis, web search, logout isolation, fresh login, and restored/searchable history. Document upload correctly remains desktop/mobile-only.

Dev CloudWatch was checked using the latest observability master instructions (baa69bc) for 2026-09-14 07:10–07:29 UTC, with complete pagination over all listed dev streams. The six user response flows correlated with five normal completions and one intentional cancellation, followed by a successful request. No application authentication, transport, or storage error marker was observed; four forwarder broken-pipe records lacked request correlation and remain unattributed. Provider completion is separate from durable storage; browser relogin/history checks supplied the persistence evidence. Inference router markers were Legacy/StaticSplit, so this smoke does not establish active Router V2 routing.

The agent-run smokes cover the web app in Chrome. The user separately verified GitHub and Google OAuth on dev. Native desktop/mobile flows, Apple's production callback, Safari-specific runtime, and forced failover remain separate validation. No SDK publication, service deployment, feature-flag change, or installed-client update was performed during these smokes.

A repeat dev smoke on 2026-09-14 initially exposed the Settings logout redirect loop described above. After the fix, the rebuilt PR-profile bundle passed email login, account/plan loading, normal chat, incremental streaming, deliberate cancellation, follow-up context, reload, logout, signed-out access to the prior conversation URL, fresh login with restored history, and a second clean logout. This repeat used a fresh tab in the existing Chrome profile at the local preview origin. Full frontend checks passed with 895 tests; independent source review passed, and negative controls reproduced both the original loop and the mixed-case regression.

The matching fixed dev CloudWatch window, 17:10:25–17:12:40 UTC, covered 122 chunks / 337 lines with complete pagination over the sole listed dev stream. The three synthetic requests correlated with two normal provider completions and one intentional cancellation. No auth, decryption, transport, storage, panic, or missing-terminal error indicator was observed. One uncorrelated forwarder broken-pipe record remains part of the separate deferred follow-up (Maple #916 / OpenSecretCloud/nitro-toolkit#13). Browser reload and fresh-login checks independently verified persisted history.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: ca2b329
Status: ✅  Deploy successful!
Preview URL: https://ce703cff.maple-ca8.pages.dev
Branch Preview URL: https://codex-session-v2-cutover.maple-ca8.pages.dev

View logs

Comment thread sdk/rust/src/transport_v2/network.rs Dismissed
Comment thread sdk/rust/src/transport_v2/network.rs Dismissed
Comment thread sdk/rust/src/transport_v2/network.rs Dismissed
Comment thread sdk/rust/src/transport_v2/tests.rs Fixed
Comment thread sdk/rust/src/transport_v2/tests.rs Fixed
@AnthonyRonning
AnthonyRonning force-pushed the codex-session-v2-cutover branch from 2318c6c to ca2b329 Compare September 1, 2026 17:17
@AnthonyRonning
AnthonyRonning force-pushed the codex-session-v2-cutover branch from ca2b329 to 73746ea Compare September 14, 2026 06:51
@AnthonyRonning
AnthonyRonning removed this pull request from stack #874 September 14, 2026 06:52
@AnthonyRonning AnthonyRonning changed the title Transport V2: cut over SDKs, proxy, and Maple Transport V2: consolidate SDK, proxy, and Maple client cutover Sep 14, 2026
@AnthonyRonning
AnthonyRonning changed the base branch from codex-session-v2-maple to master September 14, 2026 06:52
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Maple development preview: https://bf07f435.maple-ca8.pages.dev

Commit: f16084aaafc609a0f7e9b6ec4962e8a79ac4b421

Uses development API, billing, flags and PCR configuration. Cloudflare Access applies.

Keep the configured total deadline through non-streaming body completion while preserving incremental SSE idle-timeout behavior. Mirror requested CORS headers so browser callers can send the required Authorization header without saved-key fallback.

Validated with the pinned full proxy gate: 35 tests, formatting, strict Clippy and rustdoc, and dependency checks.
Keep hosted Apple confirmation across the anonymous-to-authenticated root transition. Require native credential persistence before publishing the account, with failure tests covering delayed storage recovery and fallible readback.

Validated with actual-root integration regressions, the full frontend gate, and SDK persistence regressions.
Allow one captured-operation resend after a verified replacement handshake for exact outer 400 contract-1 session_not_found or request_decryption_failed hints. Preserve the selected credentials, logical bytes, cache root, cancellation and account fences. Exclude session-bound OAuth/native completion and all ambiguous response or network failures.

The hints remain unauthenticated: this is the selected V1-equivalent best-effort policy and cannot guarantee cross-session at-most-once execution against a forged hint.

Validated with both SDK regression suites, proxy and Maple gates, independent source review, and a local real-backend restart test showing zero writes before recovery and one after the resend.

Pin SDK integration CI to the tested backend recovery-contract commit e488430.
@AnthonyRonning
AnthonyRonning force-pushed the codex-session-v2-cutover branch from 68ffce4 to f16084a Compare September 14, 2026 19:06
@AnthonyRonning
AnthonyRonning merged commit e3fec11 into master Sep 14, 2026
45 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-session-v2-cutover branch September 14, 2026 20:18

This branch was successfully deployed

1 active deployment
pages-pr-873 f16084aa Deployed Sep 14, 2026 by github-actions[bot]
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.

2 participants