Skip to content

Add connection-bound reply handles for app-server requests - #53049

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/940d0951ab67529b05919ca8ec7adb5813834b8c
Oct 11, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Add connection-bound reply handles for app-server requests

Why

Server request IDs can be reused across connections. Retained replies need to target the connection that emitted the request, even if the UI selection later changes.

What changed

  • Expose AppServerReplyHandle through AppServerRequestHandle::server_request_reply_handle, capturing the originating client and request ID for explicit resolve or reject calls.
  • Share single-use completion state across clones so only the first reply is submitted. Dropping a handle sends nothing; stale connections return I/O errors without retrying or switching connections.
  • Route existing client reply methods through request handles and use the new API in the managed worktree model test.

Testing

Add in-process and WebSocket tests for replies on separate connections with identical request IDs, rejection routing, duplicate completion, and stale handles after worker shutdown. Also check that debug output redacts handle details.

## Why

Server request IDs can be reused across connections. Retained replies need to target the connection that emitted the request, even if the UI selection later changes.

## What changed

- Expose `AppServerReplyHandle` through `AppServerRequestHandle::server_request_reply_handle`, capturing the originating client and request ID for explicit `resolve` or `reject` calls.
- Share single-use completion state across clones so only the first reply is submitted. Dropping a handle sends nothing; stale connections return I/O errors without retrying or switching connections.
- Route existing client reply methods through request handles and use the new API in the managed worktree model test.

## Testing

Add in-process and WebSocket tests for replies on separate connections with identical request IDs, rejection routing, duplicate completion, and stale handles after worker shutdown. Also check that debug output redacts handle details.

GitOrigin-RevId: 940d0951ab67529b05919ca8ec7adb5813834b8c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/940d0951ab67529b05919ca8ec7adb5813834b8c branch from 3fd44fa to 8c0f701 Compare October 11, 2026 06:08
@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-11T06:08:52.893233Z 3fd44fa 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 8c0f701 into main Oct 11, 2026
1 check failed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/940d0951ab67529b05919ca8ec7adb5813834b8c branch October 11, 2026 06:08
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 11, 2026
@mfuzalam
mfuzalam deployed to issue-triage October 11, 2026 06:21 — with GitHub Actions Active
@mfuzalam
mfuzalam deployed to issue-triage October 11, 2026 06:21 — with GitHub Actions Active
@mfuzalam
mfuzalam deployed to issue-triage October 11, 2026 06:21 — with GitHub Actions Active
@mfuzalam
mfuzalam deployed to issue-triage October 11, 2026 06:22 — with GitHub Actions Active
@kevinmarty
kevinmarty deployed to issue-triage October 11, 2026 06:22 — with GitHub Actions Active
@kevinmarty
kevinmarty deployed to issue-triage October 11, 2026 06:22 — with GitHub Actions Active
@kevinmarty
kevinmarty deployed to issue-triage October 11, 2026 06:22 — with GitHub Actions Active
@grogonn
grogonn deployed to issue-triage October 11, 2026 06:26 — with GitHub Actions Active
@grogonn
grogonn deployed to issue-triage October 11, 2026 06:26 — with GitHub Actions Active
@grogonn
grogonn deployed to issue-triage October 11, 2026 06:26 — with GitHub Actions Active
@grogonn
grogonn deployed to issue-triage October 11, 2026 06:26 — with GitHub Actions Active
@Kkkkkuro
Kkkkkuro deployed to issue-triage October 11, 2026 06:32 — with GitHub Actions Active
@Kkkkkuro
Kkkkkuro deployed to issue-triage October 11, 2026 06:32 — with GitHub Actions Active
@Kkkkkuro
Kkkkkuro deployed to issue-triage October 11, 2026 06:32 — with GitHub Actions Active
@Amberspring
Amberspring deployed to issue-triage October 11, 2026 06:37 — with GitHub Actions Active
@Amberspring
Amberspring deployed to issue-triage October 11, 2026 06:37 — with GitHub Actions Active
@Amberspring
Amberspring deployed to issue-triage October 11, 2026 06:37 — with GitHub Actions Active
@NBS327
NBS327 deployed to issue-triage October 11, 2026 07:09 — with GitHub Actions Active
@NBS327
NBS327 deployed to issue-triage October 11, 2026 07:09 — with GitHub Actions Active
@frostlytexd
frostlytexd deployed to issue-triage October 11, 2026 07:40 — with GitHub Actions Active
@frostlytexd
frostlytexd deployed to issue-triage October 11, 2026 07:40 — with GitHub Actions Active
@frostlytexd
frostlytexd deployed to issue-triage October 11, 2026 07:40 — with GitHub Actions Active
@hyodur
hyodur deployed to issue-triage October 11, 2026 07:42 — with GitHub Actions Active
@hyodur
hyodur deployed to issue-triage October 11, 2026 07:42 — with GitHub Actions Active
@hyodur
hyodur deployed to issue-triage October 11, 2026 07:42 — with GitHub Actions Active
@Xgoyeezy
Xgoyeezy deployed to issue-triage October 11, 2026 08:11 — with GitHub Actions Active
@Xgoyeezy
Xgoyeezy deployed to issue-triage October 11, 2026 08:11 — with GitHub Actions Active
@Xgoyeezy
Xgoyeezy deployed to issue-triage October 11, 2026 08:11 — with GitHub Actions Active
@Xgoyeezy
Xgoyeezy deployed to issue-triage October 11, 2026 08:12 — with GitHub Actions Active
@PROROBLOX43
PROROBLOX43 deployed to issue-triage October 11, 2026 08:29 — with GitHub Actions Active
@PROROBLOX43
PROROBLOX43 deployed to issue-triage October 11, 2026 08:29 — with GitHub Actions Active
@PROROBLOX43
PROROBLOX43 deployed to issue-triage October 11, 2026 08:29 — with GitHub Actions Active
@Msirkovsky
Msirkovsky deployed to issue-triage October 11, 2026 08:30 — with GitHub Actions Active
@Msirkovsky
Msirkovsky deployed to issue-triage October 11, 2026 08:30 — with GitHub Actions Active
@Msirkovsky
Msirkovsky deployed to issue-triage October 11, 2026 08:30 — with GitHub Actions Active
@PROROBLOX43
PROROBLOX43 deployed to issue-triage October 11, 2026 08:30 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 8c0f7011 Deployed Oct 11, 2026 by daleel-center via Generate label suggestions #54355
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.