Files
SoulStream/handoff
KeelrLeek 062e1845e0 android auto: one engine per process, actually — init was still spawning its own
`headless.rs` was written around a guarantee its own doc comment made and the
code did not keep: `playback::init` still called `Player::spawn_with_device`
directly. So a car could start a cold process, play a record into it, and the
moment the app's Activity came up the process built a SECOND player — two
AAudio streams out of one app, playing over each other. That is precisely the
failure the module exists to prevent, and nothing would have reported it but
Kyle's ears.

On Android `init` now takes the process's engine instead. The event receiver is
single-consumer and the headless pump already owns it, so the UI SUBSCRIBES to
the pump rather than reading the engine directly; and the fallback queue is
cleared on the way in, because from that point the JS decides what plays next
and two things advancing one engine would skip a track each time. The desktop
path is untouched — it still spawns its own, because there is nothing else in
that process to share with.

Also here: a log line on the transport's routing decision
(`auto playWhenReady=… headless=…` and `auto transport …`), added while
chasing a pause that turned out to be working. It is kept because the question
"did this button go to Rust or to a WebView that is not there" has now come up
three times and is invisible without it.

The pause was real, and the measurement was not. "One active AAudio track after
a pause" proves nothing — a paused sink still shows as active. The honest test
is that the session reports PAUSED(2) and the position stops moving, which it
does: 24873 ms, unchanged five seconds later.
2026-09-15 14:47:40 -05:00
..

handoff/ — the Android port's pending work

Saved 2026-09-14 when the session ended. Nothing here is on main; main holds only rounds that were built, walked on the device and committed.

  • rounds/ — every round's patch script and commit message, and the insertion files they read. Rounds 43 to 48 are written and verified but not yet shipped; 49 is incomplete (authoring was stopped mid-flight). The earlier ones are kept because a patch is the record of how a round was made.
  • tools/ — the pipeline. preflight.sh applies a wave in order to a throwaway copy; chain.sh patches and ships a list of rounds; reset-tree.sh puts the tree back after a failure (a plain git checkout -- leaves new files behind and trips the round's own re-run guard); compare-walks.sh and baseline-mock-steps.txt are the A/B for the unverified adaptive-wait change; audit-commands.cjs lists backend commands the phone never calls.
  • notes/ — the Android Auto design in full, and the icon background comparison mock (open icon-mock.html directly; it needs no server).

Start with ../HANDOFF-2026-09-14-android-auto-and-icon.md.