Skip to content

Coalesce concurrent remote metadata requests - #36184

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f91e51b94db3fb984597aec8d302b8715778121c
Jul 30, 2026
Merged

Coalesce concurrent remote metadata requests#36184
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f91e51b94db3fb984597aec8d302b8715778121c

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 30, 2026

Copy link
Copy Markdown

Coalesce concurrent remote metadata requests

Why

Concurrent callers can request metadata for the same remote path, resulting in duplicate fs/getMetadata RPCs.

What changed

  • Share an unsandboxed metadata request with concurrent callers for the same path while the RPC is in flight.
  • Remove completed and failed requests so later callers fetch fresh metadata, and clear in-flight entries after filesystem mutations, including failed mutations.
  • Keep requests for different paths separate and bypass sharing for sandboxed requests.

Testing

Add WebSocket-backed tests covering shared results and errors, retry after cancellation or failure, mutation invalidation, and path and sandbox isolation.

## Why

Concurrent callers can request metadata for the same remote path, resulting in duplicate `fs/getMetadata` RPCs.

## What changed

- Share an unsandboxed metadata request with concurrent callers for the same path while the RPC is in flight.
- Remove completed and failed requests so later callers fetch fresh metadata, and clear in-flight entries after filesystem mutations, including failed mutations.
- Keep requests for different paths separate and bypass sharing for sandboxed requests.

## Testing

Add WebSocket-backed tests covering shared results and errors, retry after cancellation or failure, mutation invalidation, and path and sandbox isolation.

GitOrigin-RevId: f91e51b94db3fb984597aec8d302b8715778121c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f91e51b94db3fb984597aec8d302b8715778121c branch from 96ff61c to 483559c Compare July 30, 2026 16:36
@copyberry
copyberry Bot merged commit 483559c into main Jul 30, 2026
32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f91e51b94db3fb984597aec8d302b8715778121c branch July 30, 2026 16:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants