## Why
Different response paths recognize different request ID headers, so
diagnostics can lose the ID needed to correlate a failed request. For
example, an Azure response may carry only `x-ms-request-id`.
## What changed
Use `CodexHeaderMap` to share response header parsing across API clients,
OAuth errors, and response debug context. When a caller needs one
request ID, fall back to the next supported header if the preferred
value is missing, empty, or unreadable.
Preserve recognized request ID headers on Responses WebSocket
handshakes. Use a shared summary for remote control errors and tracing,
omitting sensitive, empty, unreadable, and unrelated values.
## Testing
Cover fallback from an empty or unreadable primary ID, Azure-only debug
context, filtering in diagnostic summaries, and preservation of request
IDs in WebSocket handshakes and remote control pairing errors.
GitOrigin-RevId: f728a4a867f4705b784916b331f413e560f8626b
## Why
Handshake probes can lose upgrade evidence when a subsequent read fails, and diagnostic output can expose URLs, server error messages, and close reasons containing sensitive values.
## What changed
- Retain successful upgrade status and allowlisted tracking headers, including on post-upgrade read failures.
- Return structured probe errors that distinguish typed TLS failures from failures with an unknown stage while preserving the underlying API error.
- Recognize empty close frames as immediate closes with code `1005`.
- Redact wire values from probe debug output and doctor error details, and remove URLs and raw errors from connection logs.
## Testing
Add local TLS and WebSocket fixtures covering certificate rejection, ordinary I/O failures, successful and rejected upgrades, immediate closes, malformed frames, header retention, and redaction. Add doctor output snapshots and error-detail redaction assertions.
GitOrigin-RevId: 1ee53720a7a752043943170d8e4da205ec4e55f3