Files
SoulStream/handoff/rounds/ins-r32-loadlibrary.txt
T
KeelrLeek 9f0601027c android: the handoff — the pending rounds, the pipeline, and what is unverified
Everything written this session that has not been through the device: rounds 43
to 48 (each patch adversarially verified, 43's transient-notice expectation
fixed), a partial round 49, the pipeline scripts, the Android Auto design and
the icon comparison mock. Also the two harness changes that were never A/B'd —
adaptive waits, which may only shorten a declared wait and never lengthen it,
and a ship that runs the mock walk and the deploy at the same time. The A/B and
its 255-step baseline are in handoff/tools; main stays at what the phone has
actually walked.
2026-09-14 07:57:41 -05:00

31 lines
1.6 KiB
Plaintext

/* Five reads that never depended on one another. Each is a
spawn_blocking SQLite read behind the library's single
`conn: Mutex<Connection>`, so the queries still take their turn —
what is saved is five bridge round trips collapsing into one.
Every call keeps the handling it had. The one thing that could have
moved is `lib.error`, which has two writers and used to be settled
by the order they were awaited in; the two messages are carried out
of the round and applied in that same order instead, so a failing
library still shows the library's message and not app_status's, no
matter which of them answers last. Nothing is dropped, nothing new
is asked for, and `lib.loaded` still goes up only once all five
have settled. */
const [statusErr, albumsErr, , follows, playlists] = await Promise.all([
api.appStatus().then((st) => {
lib.version = st?.version ?? "";
lib.username = st?.connected_as ?? null;
return null;
}, (e) => String(e)),
api.libraryAlbums().then((rows) => { lib.albums = rows; return null; }, (e) => String(e)),
refreshRecents(), // writes lib.recents itself, and swallows its own failure
api.followedArtists().then((rows) => rows || [], () => []),
api.listPlaylists().then((rows) => rows || [], () => []),
]);
if (statusErr) lib.error = statusErr;
if (albumsErr) lib.error = albumsErr;
lib.follows = follows;
lib.playlists = playlists;
lib.loaded = true;
void refreshStats();