Repository navigation
test(azure-speech): make voices timeout proof deterministic - #124694
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 16, 2026 16:48
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 17, 2026
steipete
added a commit
that referenced
this pull request
Aug 25, 2026
The live-loopback + real-watchdog shape from #124694 still flaked on loaded CI shards (2s vitest timeout, e.g. run 32714053992 on #128514): real socket I/O raced the 1s watchdog and 2s test budget. fetchWithSsrFGuard already treats a vi.fn fetch stub as hermetic (no DNS pinning, no dispatcher) and passes its timeout abort signal via init.signal, so a never-resolving signal-honoring stub plus fake timers exercises the same production abort path with zero real I/O. The test now also proves the request is not aborted before the configured timeout and aborts exactly at it. 10/10 green in a local loop.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 26, 2026
The live-loopback + real-watchdog shape from openclaw#124694 still flaked on loaded CI shards (2s vitest timeout, e.g. run 32714053992 on openclaw#128514): real socket I/O raced the 1s watchdog and 2s test budget. fetchWithSsrFGuard already treats a vi.fn fetch stub as hermetic (no DNS pinning, no dispatcher) and passes its timeout abort signal via init.signal, so a never-resolving signal-honoring stub plus fake timers exercises the same production abort path with zero real I/O. The test now also proves the request is not aborted before the configured timeout and aborts exactly at it. 10/10 green in a local loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #124684
What Problem This Solves
Fixes an issue where the Azure Speech voice-timeout integration test could fail on a loaded runner even though the request timed out correctly. The 100 ms abort could fire before the loopback connection reached the server handler, leaving the request count at zero and making the test race the request it was trying to observe.
Observed in CI job
checks-node-changed-extensions-config-2:extensions/azure-speech/voices-timeout.test.ts:75expectedrequestCountto be 1 but received 0.Why This Change Was Made
The tests now hold only the timeout timers, start the real loopback request, await an explicit server-receipt promise under the existing real 1 s watchdog, and then advance the configured timeout exactly. This keeps the original 100 ms Azure budget and 250 ms Inworld budget while proving both dispatch and abort deterministically.
The sibling sweep found the same author and same race shape in Inworld, so that test uses the same proof. Mattermost already awaits server receipt, and Telegram receives response headers before testing its body deadline.
There is no production defect.
fetchWithSsrFGuardintentionally starts the timeout before DNS/SSRF preflight so the entire guarded operation is bounded, and the Azure caller has no behavior that depends on distinguishing a pre-dispatch timeout from an unanswered request. Production code and timeout defaults are unchanged.AI-assisted: yes.
User Impact
No runtime behavior changes. CI retains the full timeout contract without a scheduler-sensitive request-arrival race.
Evidence
checks-node-changed-extensions-config-2failed at the request-count assertion with expected 1, received 0.node scripts/run-vitest.mjs extensions/azure-speech/voices-timeout.test.ts extensions/inworld/voices-timeout.test.tspassed (2 tests per run).node scripts/run-vitest.mjs extensions/azure-speechpassed (4 files, 23 tests).node scripts/check-changed.mjspassed on Blacksmith Testboxtbx_01m05pfjh7yfprgj9m3qvgt83a(exit 0): https://github.com/openclaw/openclaw/actions/runs/31958741117oxfmtandgit diff --checkpassed..agents/skills/autoreview/scripts/autoreview --mode uncommitted --stream-engine-outputreported no accepted/actionable findings.