Skip to content

fix: correct header overrides and streaming lifecycle behavior - #2

Merged
moonyue-w merged 3 commits into
mainfrom
codex/java-header-realtime-fixes
Oct 20, 2026
Merged

moonyue-w merged 3 commits into
mainfrom
codex/java-header-realtime-fixes

Conversation

@moonyue-w

Copy link
Copy Markdown
Contributor

Change

Fix four Java SDK transport behaviors:

  • Repeated default headers now use the last value regardless of header-name casing; per-request overrides still take precedence.
  • Realtime handshake and connection failures retain their underlying transport exception in RealtimeException.getCause().
  • Resumable SSE subscriptions honor valid Retry-After and retry-after-ms after the per-handshake retry budget is exhausted. Cancellation and total deadlines interrupt these waits; the existing exponential backoff remains the fallback.
  • Closing an active event subscription records cancellation before releasing the reader, preventing a race that previously reported successful completion.

Update the changelog, streaming guidance and stale Identity SAT / SSE / Realtime documentation. These changes are Java-specific; Go, Python and TypeScript are unaffected. No version bump or caller migration is required.

Validation

  • SDK build, tests and Javadoc pass.
  • Independent examples consume the installed JAR and pass.
  • Java 8 package checks pass; changed runtime behavior is checked on Java 8 and Java 17.
  • Documentation and changelog reflect public behavior changes.
  • make quality passes on JDK 17 (including 38 maintenance-script tests and local-link checks).
  • Version files are unchanged.

Executed make test on both Java 8 and Java 17: each passed 545 SDK tests and 62 packaged-consumer tests, with no failures, errors or skips. This also builds Javadoc and checks package contents and Java 8 bytecode. Re-ran make quality after the documentation updates.

Regression coverage includes mixed-case headers, synchronous/asynchronous handshake failures, retry delays after zero and nonzero retry budgets, cancellation/deadline interruption during server-directed waits, and deterministic reader/close interleaving. Local loopback probes on both runtimes confirmed a 3-second server delay was respected and all 2,000 explicit cancellations reported cancellation.

No live CN/Global calls, AoneCI runs or Maven publication were performed for this fix. Java 11/21/25 validation is delegated to the GitHub CI matrix. These offline results do not replace production acceptance or human QA approval.

@moonyue-w
moonyue-w merged commit 1f9db9a into main Oct 20, 2026
12 checks passed
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