Skip to content

Make thread unsubscribe test deterministic#18000

Open
starr-openai wants to merge 2 commits intomainfrom
starr/deterministic-thread-unsubscribe
Open

Make thread unsubscribe test deterministic#18000
starr-openai wants to merge 2 commits intomainfrom
starr/deterministic-thread-unsubscribe

Conversation

@starr-openai
Copy link
Copy Markdown
Contributor

Summary

  • replace the unsubscribe-during-turn test's sleep/polling flow with a gated streaming SSE response
  • add request-count notification support to the streaming SSE test server so the test can wait for the in-flight Responses request deterministically

Scope

  • codex-rs/app-server/tests/suite/v2/thread_unsubscribe.rs
  • codex-rs/core/tests/common/streaming_sse.rs

Validation

  • Not run locally; this is a narrow extraction from the prior CI-green branch.

starr-openai and others added 2 commits April 15, 2026 14:01
Gate the app-server unsubscribe-during-turn test on the mocked Responses request reaching the streaming SSE server instead of sleeping and polling for a second request.

Add request-count notification support to the streaming SSE test server so the test can wait for the in-flight turn deterministically before unsubscribing.

Co-authored-by: Codex <noreply@openai.com>
Replace the gated assistant-only response with a dynamic tool call that the test holds open across thread/unsubscribe. This keeps the test deterministic while proving the turn continues once the unresolved tool call is released.

Co-authored-by: Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants