Skip to content

Handle completion events in either order in shell snapshot tests - #52660

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

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Handle completion events in either order in shell snapshot tests

Why

A tool can return before its background watcher emits ExecCommandEnd. Waiting for that event first can discard an earlier TurnComplete, causing the shell snapshot test helper to time out.

What changed

Update run_tool_turn_on_harness to track both the matching ExecCommandEnd and TurnComplete in a single event loop, returning only after both have arrived regardless of order.

)

## Why

A tool can return before its background watcher emits `ExecCommandEnd`. Waiting for that event first can discard an earlier `TurnComplete`, causing the shell snapshot test helper to time out.

## What changed

Update `run_tool_turn_on_harness` to track both the matching `ExecCommandEnd` and `TurnComplete` in a single event loop, returning only after both have arrived regardless of order.

GitOrigin-RevId: c9b749a46eda1244aa3e80fd88b663d110d67d1b
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/c9b749a46eda1244aa3e80fd88b663d110d67d1b branch from cbce3ef to b49e221 Compare October 9, 2026 17:56
@copyberry
copyberry Bot merged commit b49e221 into main Oct 9, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/c9b749a46eda1244aa3e80fd88b663d110d67d1b branch October 9, 2026 17:56
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 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.

1 participant