From 4be19bb845a8c94bf082049fea2d31a60991b514 Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Tue, 20 Oct 2026 05:38:17 +0000 Subject: [PATCH] havre smoke: a sent photo is in their turn Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01VAvUH72XsdCitHdh3t7mjr --- ventures/havre/tests/smoke.mjs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ventures/havre/tests/smoke.mjs b/ventures/havre/tests/smoke.mjs index fedd561..cb22c70 100644 --- a/ventures/havre/tests/smoke.mjs +++ b/ventures/havre/tests/smoke.mjs @@ -171,7 +171,7 @@ async function fakeVenice(route) { reply = /^Them:.*\bSend me a pic/i.test(said) ? json({ move: "photo", shot: "The character from the reference picture holds up a mug\nin a half-unpacked kitchen." }) : /^Them:.*\bFilm the harbor/i.test(said) ? json({ move: "clip", shot: "The character from the reference pictures pans across the harbor at dusk." }) : /^Them:.*\bWhisper it/i.test(said) ? json({ move: "voice", shot: "" }) : json({ move: "nothing", shot: "" }); - } else if (/^(?:\(You sent me [^\n]*\)\n\n)?\[Time passes/.test(lastSaid)) { // after a word about the photo she sent last, if she did + } else if (/^\[Time passes/.test(lastSaid)) { reply = "You're back!\n\nI kept the kettle warm."; } else if (system.startsWith("You write the shot for a photo")) { reply = "Shot: The character from the reference picture sits on a stack of moving boxes, grinning, warm lamplight."; @@ -525,7 +525,8 @@ async function main() { await has(page, "#log .line.media .cap", /photo · Grok Imagine · \$0\.03 · save/); // the photo is in the conversation the model reads next, as something it sent await answered(page, async () => { await page.fill("#say", "Cute."); await page.keyboard.press("Enter"); }); - assert.match(talks().at(-1).messages.at(-1).content, /^\(You sent me a photo: The character from the reference picture sits on a stack of moving boxes, grinning, warm lamplight\.\)\n\nCute\.$/); + assert.equal(talks().at(-1).messages.at(-1).content, "Cute."); + assert.match(talks().at(-1).messages.at(-2).content, /\*sends a photo: The character from the reference picture sits on a stack of moving boxes, grinning, warm lamplight\*$/); // voice notes: one on request ("hear it"), then every reply, in the voice on her card const hears = page.getByRole("button", { name: "Hear this as a voice note from Sable Penrose" }); @@ -615,8 +616,8 @@ async function main() { assert.match(seen.heard.at(-1), /name="model"\r\n\r\nnvidia\/parakeet-tdt-0\.6b-v3/); assert.match(seen.heard.at(-1), /filename="voice-note\.(webm|ogg|m4a)"/); await until(page, () => { const a = [...document.querySelectorAll("#log .line.me audio")].at(-1); return !!a && a.src.startsWith("blob:"); }, null, "your voice note in the chat"); - assert.equal(talks().at(-1).messages.at(-1).content, "(You sent me a short video: The character from the reference pictures waves from the doorway as the camera drifts closer.)\n\nhello from the mic", - "what you said, after a word about the clip she sent"); + assert.equal(talks().at(-1).messages.at(-1).content, "hello from the mic", "what you said"); + assert.match(talks().at(-1).messages.at(-2).content, /\*sends a short video: The character from the reference pictures waves from the doorway as the camera drifts closer\*$/, "after the clip she sent, in her turn"); // your photo, to a model that can see (she talks through Tiny now) const red = await page.evaluate(() => { const c = document.createElement("canvas"); c.width = c.height = 64; const g = c.getContext("2d"); g.fillStyle = "#c00"; g.fillRect(8, 8, 48, 48); return c.toDataURL("image/png"); }); const redPng = Buffer.from(red.split(",")[1], "base64"); @@ -698,9 +699,9 @@ async function main() { }); await page.reload(); await has(page, "#log .line.them .said", /I kept the kettle warm\./); - const nudges = () => talks().filter((b) => /^(?:\(You sent me [^\n]*\)\n\n)?\[Time passes/.test(String(b.messages.at(-1).content))); - assert.match(nudges()[0].messages.at(-1).content, /^\(You sent me a photo: The character from the reference picture holds up a mug in a half-unpacked kitchen\.\)\n\n\[Time passes: about 8 hours since you last talked\. They just came back to the chat\./, - "the photo she sent last, then the time that's passed"); + const nudges = () => talks().filter((b) => /^\[Time passes/.test(String(b.messages.at(-1).content))); + assert.match(nudges()[0].messages.at(-1).content, /^\[Time passes: about 8 hours since you last talked\. They just came back to the chat\./, "the time that's passed"); + assert.match(nudges()[0].messages.at(-2).content, /\*sends a photo: The character from the reference picture holds up a mug in a half-unpacked kitchen\*$/, "the photo she sent last, in her turn"); await poll(() => nudges().length === 2, "Captain Ro texting first", 9000); assert.match(nudges()[1].messages.at(-1).content, /^\[Time passes: about 8 hours since you last talked\. Reach out to them first/); await has(page, "#chats-new", /^1$/);