fix(live): avoid hangs at fractional transcript grouping deadlines - #3970
Conversation
Castiron custom code✅ No new custom-code files detected. 47 mixed files remain; 0 existing customizations changed. Compared 47 existing customizations unchanged
7 more in the full report. A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 36338900263 --repo openai/openai-python \
--name castiron-custom-code-36338900263-1 --dir /tmp/castiron-custom-code-36338900263-1
git apply --stat /tmp/castiron-custom-code-36338900263-1/custom-code.patch
cat /tmp/castiron-custom-code-36338900263-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 43443d14c5ab8b9bc9d7aaf31263351f071afca2 7fbc8b75e566b0aa5a4cc1d3f035b7224bbace5e
python3 scripts/castiron/custom_code_report.py report \
--base 43443d14c5ab8b9bc9d7aaf31263351f071afca2 \
--head 7fbc8b75e566b0aa5a4cc1d3f035b7224bbace5e --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-7fbc8b75e566
cat /tmp/castiron-custom-code-7fbc8b75e566/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Reviewed 7fbc8b75e566b0aa5a4cc1d3f035b7224bbace5e: no blocking findings.
Using the same sums as deadline() fixes the fractional-boundary non-progress loop without changing public signatures, defaults or async dispatch ownership.
I independently exercised assistant-silence, speaker-separation and backchannel-isolation cases through both actual sync and async grouper methods: all six baseline processes timed out, and all six current-head cases completed with the expected closed segments/reasons. These in-memory probes used the actual listener/state/policy/dataclass modules, a controlled monotonic clock and synthetic event/error types; they did not exercise Pydantic or rerun the full package suite. I reviewed the complete diff and surrounding timer/closure paths. Exact-head hosted checks, including the Pydantic-v1 lane, are green.
Valid fractional Live transcript grouping timeouts can hang on the next transcript event. For example, after a fragment ends at 200 ms, a timeout of 0.1 ms is scheduled for 200.1; subtracting 200 later rounds to less than 0.1, so the scheduler never consumes that deadline.
Compare absolute times against the same deadlines that the scheduler creates. This preserves the existing API and options and adds bounded sync/async regressions for assistant silence, speaker separation, and isolated backchannels.
Validation: