fix(audio): preserve recording outcomes during cancellation and cleanup (#2482)
## Summary - Preserve the first recording result when caller/timeout abort listeners, output-stream cleanup, logging sinks, or subprocess cancellation callbacks throw or reenter. - Reliably observe caller and timeout cancellation during listener registration while preserving listener ownership, intentional-stop semantics, and captured-audio privacy. - Add 37 regression tests through the documented `openai/helpers/audio` public entrypoint, including independent cleanup failures, late private output, cross-signal races, and native subprocess failure modes. ## Validation - Node.js 22.23.0 and 26.7.0: 6,566 handwritten tests plus 556 generated tests pass on each runtime. - Canonical lint, strict TypeScript, production build, published-source TypeScript 4.9 and 6, and package lint. - Packed CommonJS/ESM package validation on both runtimes, including actual public audio-helper cancellation regressions.
H
Hayden committed
dafcac4ac4fbec0679257d12a911785ce1778952
Parent: 520d604
Committed by GitHub <noreply@github.com>
on 8/26/2026, 8:38:10 PM