Skip to content

test(realtime): reuse canonical terminal fixture promise helpers - #134949

Merged
steipete merged 1 commit into
mainfrom
codex/test-realtime-terminal-promise-helpers
Sep 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-realtime-terminal-promise-helpers

Conversation

@steipete

@steipete steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The OpenAI and xAI real-socket terminal fixtures carry local deferred and timeout implementations already provided by the public plugin SDK.

Why This Change Was Made

Reuse the canonical helpers and explicitly type all seven completion signals as void. Preserve each event producer, the OpenAI terminal microtask, the seven existing two-second diagnostics and the fixture teardown sequence.

User Impact

Test-only: production +0/-0; tests +37/-64 (net -27). Both complete describe bodies remain byte-identical: eight OpenAI cases and nineteen xAI cases, with all original assertions and payloads. The removed timeout copies already cleared their timers; no new timer-leak fix, removed socket startup or elapsed-time speedup is claimed.

Evidence

Source and dependency review confirms the helper contracts and retained fixture boundaries. Parser-only checks preserve the 8/19 expanded case counts, 11/12 source expect calls, seven explicit void-deferred sites and all seven two-second diagnostics.

Normal before/after pass 8/8 OpenAI and 19/19 xAI, with identical ordered native identities/statuses including repeated truncated labels. The OpenAI terminal/bridge-events sibling run passes 25/25. Suppressing only the OpenAI terminal completion signal produces the sole selected failure, 'timed out waiting for terminal response', through the existing two-second helper; seven cases skip, with no unhandled/global timeout. The saved post-close observation records a disconnected bridge, one closed tracked socket, zero ws clients and no HTTP listener after the actual completed event/outcome. This covers only that normal-setup, suppressed-signal path. Exact source restoration and managed runner group/leader/output completion were recorded and the restored source hashes match. Full changed-file gate exit 0 is confirmed. Scoped Codex autoreview returned no findings at its requested review threshold. This does not establish complete asynchronous settlement, setup-failure cleanup, a bound for the xAI nonqueued wait, hosted CI, or landing. No elapsed-time speedup is claimed.

The selected completed-only tool assertion is unchanged but is not reached under this fault; the normal passing run supplies that behavior proof.

node scripts/run-vitest.mjs extensions/openai/realtime-voice-terminal-outcomes.test.ts
node scripts/run-vitest.mjs extensions/xai/realtime-voice-terminal-outcomes.test.ts
node scripts/run-vitest.mjs extensions/openai/realtime-voice-terminal-outcomes.test.ts extensions/openai/realtime-voice-bridge-events.test.ts

Named follow-ups remain: setup precedes the fixture try/finally, and the xAI ordinary nonqueued completion wait remains unbounded. This change does not repair or prove setup-failure cleanup, and an outer test timeout must not be treated as proof that the unbounded path enters cleanup.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review September 1, 2026 07:05
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Sep 1, 2026
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Landing review: all 27 original terminal cases retain their exact native identities and pass, together with 25 OpenAI terminal/event sibling cases. The selected suppressed completion signal fails through the unchanged two-second deadline; the post-close observation confirms disconnected bridge, closed tracked socket, zero ws clients and no HTTP listener. Source restoration and managed process/output completion were verified. Full local changed-file checks and scoped Codex autoreview passed; production delta is zero, tests +37/-64.

Exact-head CI run 33480520793 passed. The latest ClawSweeper comment is its pickup acknowledgement, with no findings or Rank-up moves to apply. No completed ClawSweeper review is claimed.

The PR retains the documented setup-before-try and xAI nonqueued-wait follow-ups. This consolidation claims no elapsed speedup or general asynchronous-settlement guarantee.

@steipete
steipete merged commit 4a2edc5 into main Sep 1, 2026
173 checks passed
@steipete
steipete deleted the codex/test-realtime-terminal-promise-helpers branch September 1, 2026 07:18
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant