Skip to content

[bug-hunter] Guard meeting capture against stale stop completions#1573

Merged
r3dbars merged 33 commits into
mainfrom
codex/guard-stale-meeting-stop-completions-20260721
Jul 23, 2026
Merged

[bug-hunter] Guard meeting capture against stale stop completions#1573
r3dbars merged 33 commits into
mainfrom
codex/guard-stale-meeting-stop-completions-20260721

Conversation

@r3dbars

@r3dbars r3dbars commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Bug

Audio.stop() advances the capture generation synchronously but still emits its completion callback later with the stopped session's files. MeetingCaptureBridge previously matched that untagged callback to whichever stop continuation was current. If a timed-out meeting A was followed by meeting B, A's late callback could resolve B with A's files; starting B also discarded A's late-recovery callback.

Fix

  • Emit a generation-tagged completion callback from Core while preserving the legacy callback for other embedders.
  • Route bridge completions through an explicit expected/current/stale policy.
  • Retain timed-out completion handlers keyed by generation, so A's late repair remains owned by A while B resolves independently.
  • Add deterministic policy coverage for normal stop, late timeout, unexpected current completion, stale completion, and A-late/B-expected ordering.

Evidence and scope

Verification

  • bash run-tests.sh: 13,052 passed, 0 failed.
  • Focused bash run-tests.sh --filter testMeetingCaptureCompletionPolicy: 6 passed, 0 failed.
  • git diff --check: passed.
  • bash build-deps.sh --force: compiled 261 dependency targets, then environment-blocked while archiving libExternalDeps.a with errno=28 (No space left on device).
  • bash build.sh --no-open: blocked because the dependency archive was not produced.
  • bash run-integration-smoke.sh: blocked because dependencies were unavailable.
  • swift test: blocked by the same missing dependency setup (no such module: FluidAudio).
  • Manual real-Mac audio, permission, sleep/wake, Bluetooth, and crash/force-quit proof: UNKNOWN/not performed in this run.

@r3dbars
r3dbars marked this pull request as ready for review July 23, 2026 09:15
@r3dbars
r3dbars merged commit 94a62e6 into main Jul 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant