Files
SoulStream/handoff/rounds/ins-r45-smoke-card.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

43 lines
2.7 KiB
Plaintext

/* ── the card is still in the shade ───────────────────────
What a small icon the shade cannot inflate, or a large icon
that throws while the notification is built, actually does:
the card is never posted at all. So read it back out of the
same dump the downloads notice uses — our package, on the
`playback` channel, with the playing track's own title on it.
The title is taken from the player on BOTH sides of the dump
because a track may cross while it runs, and either answer is
a correct one; both sides come from the live app at the same
moment, so a real core answering faster than the mock cannot
make this disagree with itself.
It runs after `resumed` has asserted status === "playing", so
the ongoing card is settled state rather than a race, and it
sits above `media-keys`, which proves the transport still
answers through the session.
What this canNOT prove: the GLYPH. `dumpsys notification`
prints the icon's resource id and never a pixel, so a correct
falcon and a white rectangle read identically here. That one
is a screenshot. */
let cardBefore = await cdp.evaluate(PLAYER);
let cardNote = shadeNotice();
let cardAfter = await cdp.evaluate(PLAYER);
const cardAgrees = () => /playback/.test(cardNote.shadeChans) && !!cardNote.shadeCard
&& (cardNote.shadeCard === cardBefore?.title || cardNote.shadeCard === cardAfter?.title);
if (!cardAgrees()) {
/* the one race the two reads do not cover: `push()` in
media.svelte.js is debounced, so the card trails the
player by a moment, and a track crossing exactly here
shows the player two NEW titles and the shade the old
one. Let it settle and look once more. A card that is
not posted at all fails this the second time too. */
await sleep(2000);
cardBefore = await cdp.evaluate(PLAYER);
cardNote = shadeNotice();
cardAfter = await cdp.evaluate(PLAYER);
}
const cardOk = cardAgrees();
const cardSeen = { chans: cardNote.shadeChans, card: cardNote.shadeCard, title: cardAfter?.title ?? null };
if (!cardOk) problems.push("EXPECT media-card " + JSON.stringify(cardSeen));
console.log((cardOk ? " ok " : " FAIL ") + "media-card".padEnd(16) + " " + JSON.stringify(cardSeen));