Fix car-arrival headset playback continuity (#36) #60
Loading…
Reference in a new issue
No description provided.
Delete branch "mcp/issue-36-car-arrival-continuity"
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?
Summary
Fixes #36.
A physical drive on 2026-09-19 supplied the evidence that had been missing from R-106 / ADR-0029:
playWhenReady=false reason=audioFocusLosswhile the audiobook had been continuously advancing through the headset.com.google.android.projection.gearhead).A car connected and the book was held in the headset kind=bluetooth.Measured pause → first car bind interval: 2 seconds.
The same drive also recorded
audioFocusLossat 15:43:37 when stopping the car. There is no new car-arrival binding for that event, so this PR deliberately does not turn #36 into a generic resume-after-focus-loss feature.Implementation
This PR adds a narrow
CarArrivalResumeGaterather than reviving the withdrawn historicalCarArrivalContinuity.Continuity is eligible only when:
play()is called.The candidate is cancelled by a newer Play, any other pause reason, a book/queue transition, or ownership being superseded by a newer explicit output choice.
This deliberately does not:
becomingNoisyor arbitrary system pauses;Regression coverage
CarArrivalResumeGateTestcovers:Verification
Production branch head:
7f185ab895aa911b983d95d642d8c1dc4dcc1004verifyDebug: BUILD SUCCESSFUL in 7m 58splayback:detektDebugandplayback:ktlintMainSourceSetCheckboth passplayback:testDebugUnitTestpasses on the production implementationMutation proof
Temporary mutation branch removed only the actual resume callback while leaving the car-arrival policy decision intact.
Mutation head:
621b82d73102f4ad01425b4fb8bd02fa8b5b0102Mutation run: #126
As required,
CarArrivalResumeGateTestfailed when the resume action was removed:measured focus loss followed by car arrival resumes the owned headset— failed at line 41;one focus loss can resume only once— failed at line 192;car appearing never becomes the resume destination— failed at line 98.The temporary mutation branch was deleted after capturing this evidence.
Documentation
R-106 and ADR-0029 now record the 2026-09-19 physical evidence, the measured audio-focus-loss mechanism, the 2-second correlation, the #11 ownership prerequisite, and the intentionally separate car-stop observation.