Skip to content

Fix extension turn item emitter test event ordering#24936

Merged
bolinfest merged 1 commit into
mainfrom
pr24936
May 28, 2026
Merged

Fix extension turn item emitter test event ordering#24936
bolinfest merged 1 commit into
mainfrom
pr24936

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented May 28, 2026

Why

PR #24813 added extension TurnItemEmitter coverage and introduced a test that records a conversation history item before asserting extension-emitted turn item events.

record_conversation_items() also emits a RawResponseItem event to observers. The test was reading from the same event receiver and expected the next event to be ItemStarted, so the test failed reliably once the setup history item was present.

What Changed

Update passes_turn_fields_and_scoped_turn_item_emitter_to_extension_call to consume and assert the expected setup RawResponseItem before checking the extension ItemStarted, WebSearchBegin, ItemCompleted, and WebSearchEnd events.

This is test-only and does not change extension runtime behavior.

Verification

  • cargo nextest run --no-fail-fast -p codex-core tools::handlers::extension_tools::tests::passes_turn_fields_and_scoped_turn_item_emitter_to_extension_call

@bolinfest bolinfest requested a review from a team as a code owner May 28, 2026 16:47
@bolinfest bolinfest changed the title test: account for extension raw history event Fix extension turn item emitter test event ordering May 28, 2026
@bolinfest bolinfest requested a review from sayan-oai May 28, 2026 16:47
@bolinfest bolinfest merged commit 2264fdd into main May 28, 2026
30 checks passed
@bolinfest bolinfest deleted the pr24936 branch May 28, 2026 16:59
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 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