Fix runaway memory in idle and audio paths - #1667
Merged
Merged
Conversation
added 6 commits
August 8, 2026 13:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AVAudioEnginegraphsWhat was happening
The report shows Transcripted at roughly 135.56 GB while not recording. The screenshot proves the runaway belongs to the Transcripted process, but it cannot identify the exact allocator after the fact.
The audit found multiple paths that could grow without a hard ceiling:
"Not recording" is compatible with either a true clean-idle trigger or work left behind after an earlier capture. This change closes both classes instead of betting on one screenshot interpretation.
Deterministic proof
Verification
bash build-deps.sh --forcebash build.sh --no-openbash run-tests.sh— 12,106 passed, 0 failedswift test— 1,013 executed, 13 skipped, 0 failuresbash run-integration-smoke.shbash scripts/ops/transcripted-qa-bench.sh --mode full— exact-head runqa-20260808-155948: PASS, 15 checks, 0 blocking failures, 1 non-blocking local-state warningIndependent review
Successive independent reviews against the real PR base found and drove nine accepted corrections:
The ownership repair also rejects a late session writer that arrives after its generation was stopped. The final independent follow-up review is clean, exact-head full QA passed, and hosted CI is green.
Proof boundary
The affected machine's original process was not captured with a memgraph, so the exact historical allocator remains unknown. The automated gate proves bounded behavior and a flat clean-idle process on this build. Real Zoom/WebRTC and Bluetooth hardware checks remain separate manual proof.