Skip to content

Support pending remote environment registration - #32231

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/5c05be2b72291b77a1f71176d7075b1ad63332a5
Jul 10, 2026
Merged

Support pending remote environment registration#32231
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/5c05be2b72291b77a1f71176d7075b1ad63332a5

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 10, 2026

Copy link
Copy Markdown

Support pending remote environment registration

Why

Remote environment provisioning can finish after a thread starts, before an
exec-server WebSocket URL is available.

What changed

  • Add EnvironmentManager::register_pending_environment and a one-shot
    PendingEnvironmentRegistration handle that resolves to either a validated
    WebSocket URL or a terminal provisioning error.
  • Let lazy remote exec-server clients wait for that result, while preserving
    reconnection behavior after a successful registration.
  • Keep replacement registrations isolated so completing an older handle does
    not resolve the current environment with the same ID.

Testing

Add coverage for successful connection and reconnection, provisioning and
dropped-registration failures, invalid URLs, replacement isolation, and the
deferred-executor startup flow.

## Why

Remote environment provisioning can finish after a thread starts, before an
exec-server WebSocket URL is available.

## What changed

- Add `EnvironmentManager::register_pending_environment` and a one-shot
  `PendingEnvironmentRegistration` handle that resolves to either a validated
  WebSocket URL or a terminal provisioning error.
- Let lazy remote exec-server clients wait for that result, while preserving
  reconnection behavior after a successful registration.
- Keep replacement registrations isolated so completing an older handle does
  not resolve the current environment with the same ID.

## Testing

Add coverage for successful connection and reconnection, provisioning and
dropped-registration failures, invalid URLs, replacement isolation, and the
deferred-executor startup flow.

GitOrigin-RevId: 5c05be2b72291b77a1f71176d7075b1ad63332a5
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/5c05be2b72291b77a1f71176d7075b1ad63332a5 branch from 7026aab to 4472698 Compare July 10, 2026 18:09
@copyberry
copyberry Bot merged commit 4472698 into main Jul 10, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/5c05be2b72291b77a1f71176d7075b1ad63332a5 branch July 10, 2026 18:10
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 2026
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.

2 participants