bus, webui, cli: the Console shows the reply to a web send (#1575)

Row 81. The broker gains a `replies` read verb for human and reader
sessions: `{id}`, a message UUID, returns that business's messages whose
in_reply_to is the id, oldest first, at most 50, and writes no
deliveries row, so the reply still reaches the next `mosaic talk`. An
unknown id refuses message-not-found. The Console serves it through
BUS_VERBS with an id check, and the Sent receipt shows the replies to a
web send. The cli's talk timeout message and README now say the reply
may still come and the next `mosaic talk` prints it.

Dewey's round 2, candidate manifest 3ce7527f, base 1e5f5958, a rebase
after row 61. Approved by Darkwing (27783 round 1, 27821 round 2).
Sage's gate green 19:25:18Z to 19:30:39Z. Live at the next bus restart
(the broker verb) and Console restart (the view), bus first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-12 14:33:11 -05:00
co-authored by Claude Opus 5.5
parent 9438880e67
commit c9a5650ed0
13 changed files with 455 additions and 30 deletions
+16 -1
View File
@@ -63,7 +63,22 @@ test("talk --wait 0 only sends; no reply within --wait exits 1 and says where it
assert.deepEqual(s.calls.map((c) => c.verb), ["message.send"]);
const slow = await s.run(["talk", "coder", "hello", "--wait", "1", "--business", "demo"]);
assert.equal(slow.code, 1);
assert.match(slow.error, /no reply from coder within 1 s; .*mosaic inbox/);
// Row 81 (#1575): only mosaic talk shows a late reply; mosaic inbox lists decisions, never messages.
assert.equal(slow.error, "no reply from coder within 1 s; it may still come, and the next mosaic talk shows it");
});
test("a late reply the Console has listed still reaches the next talk", async (t) => {
const s = setup(t);
assert.equal((await s.run(["talk", "coder", "hello", "--wait", "1", "--business", "demo"])).code, 1);
const { id } = s.store.get("SELECT id FROM messages WHERE from_role='human' ORDER BY seq DESC LIMIT 1");
assert.equal(call(s.b, s.coder, "message.receive")[0].id, id);
const answer = call(s.b, s.coder, "message.send", { to: "human", body: "late answer", class: "RESULT", in_reply_to: id });
// What the Console's send receipt reads, through its reader session.
assert.deepEqual(s.read("replies", { id }).map((m) => m.id), [answer.id]);
const next = await s.run(["talk", "coder", "again", "--wait", "1", "--business", "demo"]);
assert.equal(next.code, 1, "no answer to the second one");
assert.match(next.io.out.text, new RegExp(`coder \\(RESULT, re ${id.slice(0, 8)}\\) ${answer.id.slice(0, 8)}:\nlate answer\n`));
assert.deepEqual(s.calls.filter((c) => c.verb === "message.read").map((c) => c.args.id), [answer.id]);
});
test("talk, stop and launches off/on refuse inside an agent run; bad arguments are usage errors", async (t) => {