Fix enclave forwarder backpressure and disconnect cleanup - #916
Open
AnthonyRonning wants to merge 12 commits into
Open
AnthonyRonning wants to merge 12 commits into
AnthonyRonning wants to merge 12 commits into
Conversation
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.
This was referenced Sep 14, 2026
Preserve forwarder bytes under backpressure and clarify disconnects
OpenSecretCloud/nitro-toolkit#13
Open
AnthonyRonning
force-pushed
the
codex-session-v2-cutover
branch
from
September 14, 2026 19:06
68ffce4 to
f16084a
Compare
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.
An enclave forwarding helper can drop unsent bytes when a slow downstream write hits its polling timeout. Pin the fix from OpenSecretCloud/nitro-toolkit#13 and run its offline socket regression suite as part of the backend Nix checks.
The toolkit change preserves pending bytes across partial writes/timeouts, maintains TCP half-close responses, and coordinates cleanup when either forwarding direction fails. Disconnect logs now identify the process and VSOCK service with bounded metadata. EPIPE/ECONNRESET indicate peer disconnects at INFO; unexpected errors remain ERROR. The recent dev EPIPE records are still not proven to be application failures or consequences of the timeout bug.
This PR is stacked on #873 (
codex-session-v2-cutover). Its own diff is only the toolkit gitlink and the new Nix check; #873 remains unchanged. Merge the toolkit PR first, then reconcile this pin with its final merged commit. After #873 merges, retarget this PR to master and run the normal backend CI before merging.Validation on macOS:
Toolkit Linux and macOS CI passes on the pinned commit. Backend CI only automatically targets PRs whose base is master; it is not an automatic gate while this PR is stacked. Local sockets do not establish actual VSOCK, EIF/PCR or deployed behavior. Adopting the runtime fix later requires the usual backend EIF/PCR rollout; this PR does not deploy, update PCR approvals, migrate data or release an SDK.