Recording showed as active for 9 minutes after capture silently stopped (wireless CarPlay) #43
Labels
No labels
area/agent
area/capture
area/editor
area/geo
area/security
area/sync
area/transcription
area/ui
area/vault
area/voice-memos
blocked
milestone/M1
milestone/M2
milestone/M3
milestone/M4
needs-decision
needs-hardware
p0
p1
p2
type/bug
type/enhancement
type/feature
type/idea
type/infrastructure
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Stash/stash-ios#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A recording continued to display as recording for nine minutes after it stopped capturing
anything. Observed 2026-08-09 over wireless CarPlay.
This is M1-06's failure mode 2 — "the recording toast appeared, nothing was captured" — under
a route condition M1-06 never exercised.
The evidence
Capture
2026-08-09-143325-p6f6om, pulled off the device and measured:14:33:25 + 8:30 = 14:41:55, which is when the audio file stopped growing. Audio and transcript
agree with each other to within four seconds and both stop dead at 8:30. The last nine minutes of
the session produced no audio and no cues, while the UI continued to show a recording in
progress.
The transcript's own final words are Wes noticing the state: "Oh, I guess I'm still recording.
That's strange... I guess it was still connected to CarPlay."
What was happening
Wireless CarPlay in a Volvo EX30. Drove with the recording running, arrived, parked, and walked
away from the car — so the audio route changed repeatedly as the phone handed off from the car back
to the phone or to headphones. Wes reports the recording visibly pausing and resuming several
times through this while still presenting as active.
He deliberately left it running after noticing, which is what produced the clean nine-minute window
of nothing.
Why this matters more than its priority suggests
The project already names this as its worst outcome, in #19:
By severity this is a
p0: silent, total data loss with a UI that actively asserts the opposite.It is filed
p1only because Wes explicitly deferred chasing it on 2026-08-09, not because theseverity is in doubt. Anyone picking it up should treat it as the former.
What is not yet known
Nothing here has been debugged — this is the observation and the measurement, no more.
running and the writer stopped accepting samples.
re-attaching, or both fighting.
handoff, or walking out of Bluetooth range while parked.
The gap this exposes in the M1 test matrix
M1-06's four device tests covered lock-and-walk, a declined call, an AirPods-to-wired swap, and a
backgrounded reconnect. None of them involved CarPlay, and none involved a route disappearing
because the user physically walked away from the audio device. Wes: "I'm not surprised given the
odd ways wireless CarPlay hands off. It'll need to be tested further."
Whatever the fix turns out to be, the device tests for it should include: connect wireless CarPlay,
start recording, drive, park, walk away from the vehicle, and confirm capture either follows the
phone's microphone or stops honestly and says so.
Done when
the recording bar, the Live Activity and the lock screen control all agree on that.
Found while processing the 8/9 voice memos. Files retained in the vault at
Side Quests/Stash/_captured-audio/— not attached here, because this repository is public andthey are personal audio.
Wes's recollection points at the mechanism, and it holds up in the code
2026-08-11, Wes: "I think what happened was related to whatever logic is running when it shows that the recording is paused waiting on a mic. That's the only time I've seen that and that was shown around the time when the memo died."
That state is
AudioRecorder.attemptRestart(into:allowSessionRestart:), in thecatchatAudioRecorder.swift:703-714:Nothing is waiting. That is the defect.
Why nothing is waiting
scheduleRestart(into:)(AudioRecorder.swift:609) drives a fixed ladder:Six attempts, 7.55 seconds end to end. When the last one fails the
Taskreturns,deferends the repair assertion, and the function is done. There is noTimer, no periodic re-attempt and no watchdog anywhere inAudioRecorder.swift— recovery past that point is purely event-driven, and the only events that can restart capture are:.routeChanged/.engineConfigurationChanged/.interruptionEnded— another route event has to arrive.becameActive— the phone has to be unlockedMeanwhile
isRecordingstaystrue, the file stays open, andsyncLiveActivity()has pushedisInterrupted: trueto a Live Activity that is still presenting an active recording.Which is exactly the observed sequence
Park the car, walk away with the phone in a pocket:
RecordingSession.activate(), and iOS refuses that from the background with.cannotStartRecording(561145187) — documented in the comment atattemptRestartlines 666-675..becameActivenever fires.Audio stopping dead at 8:30 and never resuming, while the session ran to ~18 minutes wall clock, is precisely what that produces on disk. It also explains the "visibly pausing and resuming several times" earlier in the drive — those were ladders that succeeded, during handoffs where a usable route arrived within the 7.55 s window. The last one had no route to find.
This is not a CarPlay bug
Downgrading the hardware dependency. CarPlay is a convenient way to generate a route change you then physically walk away from — it is not the cause. Any input that disappears without a replacement arriving inside 7.55 s reaches the same state: Bluetooth headphones going out of range, a wired mic unplugged with the phone locked.
That means this reproduces at a desk without the Volvo:
attemptRestartto fail on all six delays and assert on what the recorder reports afterwards.Removing
needs-hardwareaccordingly. The CarPlay walk-away test in the acceptance criteria stays, as confirmation rather than as the way in.What the fix has to do
statusand discarded, and this is a capture failure with the same disease. One persisted failure-reason sidecar serves both.The
Done whenlist in the description is unchanged; this comment is the mechanism behind it.Still unknown
Whether the app surviving nine idle minutes with the screen locked is expected — the repair assertion is ended in the
deferwhen the ladder exits, so the process should have been suspendable from that point, and it was still alive at 14:51 to write the transcript. Not load-bearing for the fix, but it is unexplained.Raised to
p0, 2026-08-11. The description already argued the severity — silent, total data loss with the UI asserting the opposite — and said it sat atp1only because chasing it was deferred on 2026-08-09. That deferral is over.