Skip to content

Add trace-safe diagnostics for Noise relay request progress - #58025

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b58b2f747c4050dcde8efb408c35ecadd3561b5f
Oct 29, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b58b2f747c4050dcde8efb408c35ecadd3561b5f

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Add trace-safe diagnostics for Noise relay request progress

Why

WebSocket heartbeat progress only establishes relay reachability, not executor receipt or completion. A blocked write or full application queue can also leave a Pong unread, so diagnosing stalled requests requires separate transport and application progress signals.

What changed

  • Trace request dequeue and completed writes under the request's trace context, and emit an executor receipt span immediately after decoding, before queueing or execution completes.
  • Record RPC enqueue wait time and queue occupancy.
  • Add bounded heartbeat events and a transport closure summary with fixed exit categories, queue depths, message counters, and read/write timing. Distinguish write timeouts from missing Pongs and report application delivery backpressure separately.
  • Keep request methods, IDs, payloads, raw errors, and peer-provided text out of the new trace-safe transport diagnostics.

Testing

Add coverage for blocked data and keepalive writes, missing Pongs, saturated application queues, read errors, and responsive relays without application responses. Verify trace correlation, immediate receipt span export, bounded Pong telemetry, and exclusion of payloads and raw error text.

## Why

WebSocket heartbeat progress only establishes relay reachability, not executor receipt or completion. A blocked write or full application queue can also leave a Pong unread, so diagnosing stalled requests requires separate transport and application progress signals.

## What changed

- Trace request dequeue and completed writes under the request's trace context, and emit an executor receipt span immediately after decoding, before queueing or execution completes.
- Record RPC enqueue wait time and queue occupancy.
- Add bounded heartbeat events and a transport closure summary with fixed exit categories, queue depths, message counters, and read/write timing. Distinguish write timeouts from missing Pongs and report application delivery backpressure separately.
- Keep request methods, IDs, payloads, raw errors, and peer-provided text out of the new trace-safe transport diagnostics.

## Testing

Add coverage for blocked data and keepalive writes, missing Pongs, saturated application queues, read errors, and responsive relays without application responses. Verify trace correlation, immediate receipt span export, bounded Pong telemetry, and exclusion of payloads and raw error text.

GitOrigin-RevId: b58b2f747c4050dcde8efb408c35ecadd3561b5f
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/b58b2f747c4050dcde8efb408c35ecadd3561b5f branch from e633192 to a369736 Compare October 29, 2026 08:51
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-29T08:51:32.562910Z e633192 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit a369736 into main Oct 29, 2026
18 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/b58b2f747c4050dcde8efb408c35ecadd3561b5f branch October 29, 2026 08:51
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 29, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — a3697361 Deployed Oct 29, 2026 by hieumediapub00-art via Generate label suggestions #59877
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants