Repository navigation
test(mobile): fix dictation bridge-budget test failing on main under Bun - #36938
Conversation
…e bridge The free-slot probe fills every desktop slot, so end()'s final chunk forward is refused by construction. Since #36922 reserved native slots, that final read now succeeds and its forward is refused, failing Mobile verify under Bun.
|
No actionable comments were generated in the recent review.
|
Main's Mobile verify / Mobile tests on main has failed since #36922. The cause is
dictation-capture-bridge-budget.test.tsx > keeps the shipped drain within the request budget(expected 1 to be +0).Cause:
runDictationcallsfillFreeDesktopSlots, which fills every desktop request slot, beforecapture.end(). #36922 reserved 4 slots for native verbs. Because of that, end()'s final native read now succeeds, and its desktopspeech.dictation.chunkforward is refused at the 60-slot desktop cap. That refusal is counted as a dictation refusal. Under the Bun runtime the forward lands before teardown; under Node it doesn't, so it only shows in the Bun half ofrun-mobile-ci-tests.Fix: count refusals made during the session, before the probe saturates the bridge. Production code is unchanged.
Verified: the test fails before and passes after with
bun --bun vitest run --config config/mobile-ci.vitest.config.mjs. It also passes under Node.