Repository navigation
Conversation
With software echo cancellation, one refused writer enqueue ended the whole meeting with "AEC microphone pipeline failed closed (writerQueueFull)". The queue holds 128 samples, which is about 1.3 s of 10 ms AEC frames, so a short writer stall or a joiner burst was enough. The raw capture path already drops the sample and carries on. On overflow, the committer still demotes the track to unprotected, closes transcript admission and queues the fail-closed safety era. It now drops the frame instead of stopping capture. A promotion that overflows queues the same safety era. A full queue on the raw-demotion or safety-era command is not terminal either, because the writer's emergency run has already applied the demotion. Other writer errors still stop the meeting, and the next filtered frame must re-promote durably before captions resume. Fixes altic-dev#1412 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge; no blocking issue remains in the reviewed changes. SummaryKeeps recording after an AEC writer overflow while closing transcript admission and saving an unprotected era.
Reviews (3) · Last reviewed commit: "Count only audio-carrying overflows as d..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b1c4134c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The writer's emergency run applied the unprotected era in memory, wrote the manifest with try?, and always completed with queueFull. Now that the committer keeps recording on queueFull, a failed save would have continued the meeting while track.json still described the older protected era. The emergency run now completes with the write error when the manifest can't be saved, and with queueFull only after it was saved. The committer still ignores only queueFull, so a failed save takes the terminal metadataPersistence path. Related to altic-dev#1412 Co-Authored-By: Claude Opus 5.5 <[email protected]>
While an emergency demotion waits behind older work, the writer folds later fail-closed demotions into it. A promotion admitted behind that emergency run could outlive it, leaving later raw audio under a protected era once recording continues after an overflow. While the emergency is pending, the writer now refuses commands that are not fail-closed (only the committer's promotions) with queueFull. The committer handles that like any promotion overflow: it stays unprotected and tries again on the next frame, after the emergency has run. Fail-closed demotions are unaffected. Related to altic-dev#1412 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4097f2712a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ) { [self] result in | ||
| defer { self.endPendingCommit() } | ||
| if case let .failure(error) = result { | ||
| if case let .failure(error) = result, !Self.isQueueOverflow(error) { |
There was a problem hiding this comment.
Preserve rewound boundaries when coalescing safety writes
When a route/rebuild invalidation arrives while the writer remains full, MeetingAECPipeline.invalidate first flushes its raw tail, so that tail can own the one emergency demotion at its later sample PTS; the subsequent boundary command then takes failOverflowedSequencedCommand's coalesced path and returns .queueFull without running its mutation (MeetingAudioChunkWriter.swift:276-296). The new evidence beyond the previously fixed promotion race is that this boundary is deliberately rewound by 0.5 seconds (MeetingCaptureEngine.swift:3155-3163), so the pending later cut does not cover it. Suppressing the error here lets recording continue with that interval still marked softwareEchoCancelled and eligible for post-processing; coalesce the earliest cut or suppress only when the requested mutation was actually covered.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This one isn't introduced by the coalesced path. applyEra never moves an era start backwards: when startSeconds isn't later than the last era's start, it only relabels the last era. In the uncontended path, the raw tail's sequenced demotion saves unprotected@S_tail first. The rewound boundary S_b < S_tail then only relabels that unprotected@S_tail era, so [S_b, S_tail) stays in the earlier protected era there too. If the boundary is later than the tail (S_b > S_tail), the pending S_tail cut is earlier and covers it. Either way the saved eras come out the same whether the boundary's mutation runs or is coalesced.
Before this PR, the coalesced boundary also returned queueFull and stopped the recording, but the saved track kept the same eras, with the same [S_b, S_tail) label. Honouring a rewound boundary after a later cut would mean changing applyEra for both paths. That's outside this fix, so I'd rather track it as a separate issue.
FluidVoice PR build readyDownload FluidVoice-PR-1414-198e2c1d2d2b The artifact contains the ad-hoc-signed app ZIP, Xcode archive, build manifest, and installation instructions. It expires 5 days after the build. Install the app
This build has its own app identity, so its permissions are separate from the release version of FluidVoice. |
A sequenced command that overflowed always added one to the writer's dropped-sample count, even a metadata-only safety cut. A refused promotion followed by its compensating safety era, or a plain overflow followed by its safety era, reported two dropped samples for one lost frame in track health and the writerBackpressure detail. The overflow path now counts a dropped sample only when the command carries audio. Related to altic-dev#1412 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
This pull request has been marked stale because it has had no activity for 5 days. It will be closed in 2 days if there is no further activity. Add the |
|
Closing this pull request because it remained inactive for 2 days after being marked stale. |
Description
When FluidMeet records the microphone through software echo cancellation (AEC3), one refused writer enqueue ends the whole meeting with "AEC microphone pipeline failed closed (writerQueueFull)". The writer queue holds 128 samples. On this path a sample is one 10 ms AEC frame, so a stall of about 1.3 s, or a burst from the stream joiner, is enough to end the meeting. The raw capture path already handles the same overflow by dropping the sample.
Cause:
MeetingAECOutputCommitter.enqueueOrFailcorrectly demotes the track tounprotectedand closes transcript admission, and then also callsreportTerminalFailure(.writerQueueFull). Overflows on the sequenced promotion, raw-demotion and safety-era commands are reported as terminal too.Change (
MeetingAECOutputCommitter, plus three writer changes inMeetingAudioChunkWriteradded after review):enqueueOrFailbecomesenqueueOrDemote. On overflow it still bumps the generation, setsunprotected, invalidates the transcript gate and queues the fail-closed safety era. It no longer reports a terminal failure, so the frame is dropped and recording continues.commitRawandpersistSafetyEra, aqueueFullcompletion is no longer terminal. The writer's existing emergency run (failOverflowedSequencedCommand) has already applied theunprotectedera ahead of every later sample on the serial queue.metadataPersistence,writerNotAccepting) remain terminal, so a demotion that can't be recorded still stops the meeting.queueFull(6d1a0d4, following review). A failed save therefore stays on the terminalmetadataPersistencepath.queueFull(4097f27, following review). The writer folds later demotions into that pending run, so no promotion may queue behind it. The committer treats the refusal like any promotion overflow and tries again on the next frame. The capture engine's own demotions are fail-closed and unaffected.198e2c1, following review). One lost frame followed by its metadata-only safety cut was reported as two dropped samples, including on the plain-overflow path onmain.Safety is unchanged: audio is never labelled as more protected than it was. After an overflow, the next filtered frame goes through the normal durable promotion (
afterPersistingMetadataplusupdateIfNotInvalidated) before transcript admission reopens. This PR doesn't change the queue size.Type of Change
Related Issue or Discussion
Fixes #1412
Testing
Environment: public
mainatc81c83c(FluidVoice 1.6.13 source), macOS 27.2.1, Apple Silicon arm64, Xcode 27.2. The bug was observed in the released FluidVoice 1.6.13 build on Nov 13, 20 and 23, 2026 (session evidence in #1412).Verification:
testCommitterRecoversAfterTransientWriterOverflow(new) stalls the writer withpendingSlotLimit: 1, so a promotion takes the only slot and the next filtered frame overflows. It then releases the writer and commits another frame. It expects no terminal failure, the eras[unprotected@0, softwareEchoCancelled@2, unprotected@3, softwareEchoCancelled@4], transcript admission reopened, and exactly one live-caption frame (the re-promoted one).testCommitterWriterOverflowDemotesInMemoryWithoutStoppingCapture(was...AndReportsQueueBound) is unchanged except that it now expects no terminal failure.testCommitterPromotionQueueFullStaysUnprotectedWithoutStoppingCapture(was...AndReportsQueueBound) now expects the eras[unprotected, unprotected](the conservative cut, with no protected era) and no terminal failure.testCommitterStopsWhenTheEmergencyDemotionCannotBeSaved(new,6d1a0d4) makes the track directory read-only, overflows a raw frame, and expects[.metadataPersistence]. With the emergency save back totry?andqueueFull, it fails with[].testWriterRefusesPromotionWhileEmergencyDemotionIsPending(new,4097f27) holds the emergency demotion mid-run after the raw frame has freed its slot, then offers a promotion. It expects the promotion to be refused and the eras to stay[unprotected, unprotected]. With the guard removed, the promotion is accepted and the track endssoftwareEchoCancelled.droppedSampleCount == 1(198e2c1). With the old counting they fail with2.MeetingAEC3Tests: 47 tests, 47 passed.Tests/run_ci_checks.shwithGITHUB_ACTIONS=true(unsigned, as in CI) on198e2c1: "PASS: complete CI sequence". The Xcode step ran 2842 tests: 2779 passed, 0 failed, 63 skipped. Every skip depends on the environment, such as a signing identity or opt-in fixtures.One earlier full run on the same code had a single failure in
AudioTopologyDiagnosticsTests/testRingPublishesMonotonicEventsInOrder, which this PR doesn't touch. That test reads a process-wide trace ring that the test host's live audio-device observer also writes to. It passed 3 of 3 iterations alone, and the rerun above passed.Checks not run:
Not tested on Intel.
Not run with a signing identity, so the signed-fixture suites were skipped.
The fix has not yet been exercised in a live call. The writer stall is reproduced in the unit tests by blocking the writer queue.
Tested on Intel Mac
Tested on Apple Silicon Mac
Tested on macOS version: 27.2.1
Ran linter locally:
swiftlint --strict --config .swiftlint.yml Sources Tests Package.swift(SwiftLint 0.63.2, as pinned in CI: 0 violations in 622 files)Ran formatter locally:
swiftformat --config .swiftformat --lint Sourceswith SwiftFormat 0.61.1 (the CI version): 0/432 files require formatting.Ran tests locally:
Tests/run_ci_checks.shas above, plus the before-and-after runs of the three tests.Screenshots / Video
Copyable test output. The image is a generated summary of the XCTest result bundles, not an app UI screenshot. The evidence lives on a separate branch of my fork and is not part of this PR's diff.
Notes
AI use: Claude Code (Claude Opus 5.5) diagnosed the stop from my local FluidMeet session metadata and logs, wrote the fix and tests, and ran the builds, tests and lint checks reported above on my Mac. I reviewed the diff and confirmed that it is a bounded solution to fix the issue.
🤖 Generated with Claude Code