2.5 KiB
Brief: tester threads (scoping)
Gitea #1675. Proposed owner Dewey, reviewer Filbert, gate owner Sage. Starts after row 176 is done; 176 landed as 89af38a83.
Line numbers are at origin/refactor 89af38a83 (re-pinned from 835941b7c on 2026-10-20, after rows 175 and 176 moved
them). This is a scoping brief. The owner writes the design into the packet, and Sage approves it
before any code.
Why
Q173 says agents test the test system end to end as the tester (mos-0870). The Console's chat page and the window's
W6/W7 checks need a thread conversation. Every thread verb in packages/bus/src/broker.mjs is human-only today:
thread.create (:2295), thread.list (:2321), thread.open (:2335), thread.send (:2342) and
thread.messages (:2369) each start with this.#human(s). They record the human as the thread's owner,
thread_opens.by and the message's from_role 'human' and from_run 'human-cli'.
What the design has to settle
- A tester thread's owner is
tester, and a tester sees and opens only threads it owns. The human's thread list leaves tester threads out, or labels them. Pick one and say why. thread.sendfrom a tester storesfrom_role 'tester', andfrom_runis the tester CLI, neverhuman-cli. Row 120's messaging lists have to allow tester to instance. Say whether that is a business-file entry or a broker rule.- Replies on a tester thread route to
testerand never to the human's inbox. The human's view shows them as tester traffic. - Whether a tester gets
assistant.stopon its own threads only. Never on the human's. - The
human.inputevent onthread.send(:2366) has to say tester, or a tester thread needs its own event kind. Check what the launcher and the runner do with the event first. - The Console's tester listener (row 176) gets
/api/chatfor tester threads only, and 7332's chat stays the human's. TodaystartServerrefuseschaton the tester listener (packages/webui/src/serve.mjs:442) andserveleaves it null there, so every tester/api/chatwrite answers 403. Say what replaces that refusal and which mutant proves 7332 still refusesx-mosaic-testeron chat (:454). - DDL: read
threads,thread_opensandmessagesin the migrations for CHECKs before saying no schema change.
Untouched
The row 164 pins (packages/bus/tests/channel-proof.test.mjs:11-19). Row 175's tester writes and row 176's
listener, except where point 6 adds chat.
Gate
Set in the design. At least the bus, webui and conversation suites and every scripts/test-*.sh.