plans: row 178 brief sets owner Rocko and reviewer Dewey and orders its landing after rows 180/181; briefs for the three row 177 follow-ups (N1 tester thread owner check, N2 chat.mjs strings, tester CLI thread verbs)
This commit is contained in:
@@ -4,6 +4,13 @@ Vikunja #385, Gitea #1676. Owner Rocko or whichever seat is free, set at briefin
|
||||
path (mos-0874). Built after the window rows 169, 175 and 176, as a partial fix with the limit recorded (mos-0878 Q2).
|
||||
Line numbers are at origin/refactor 835941b7c.
|
||||
|
||||
Set at briefing (Sage, 2026-10-20): owner Rocko, reviewer Dewey. Base: the refactor head at briefing,
|
||||
7f519242e or later. Rows 180 and 181 change `scripts/stack-release.sh`, and row 180 changes
|
||||
`scripts/webui-service.sh` too. Both are in this row's file list. Build on the current head. Before
|
||||
in-review, rebase onto every landing of 180 or 181 that came in after your base and rerun every touched
|
||||
test file (the row 68 drift rule). Sage lands 178 only after 180, and after 181 if 181 is already in
|
||||
review by then.
|
||||
|
||||
## The hole
|
||||
|
||||
In preview mode, the Console treats a request as Jason's when the Host is the public name and the auth header (live:
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
# Three follow-ups from row 177 (tester threads)
|
||||
|
||||
Sage, 2026-10-20. Row 177 landed as 1f994257a and 9d9d95485 (#1675, closed in comment 29357). Filbert's
|
||||
reviews (29347, 29351) and Dewey's BUILD.md (`agents/dewey/work/queue-177/BUILD.md`, "Follow-ups") left
|
||||
three items for after landing. Each one is its own row and brief below. Line numbers are at 7f519242e.
|
||||
|
||||
None of them touches the live stack. The stack runs copy 89af38a83afa, and a landing goes live only
|
||||
through a later copy and re-pin.
|
||||
|
||||
# Brief: a tester message reaches only a tester-owned thread (N1)
|
||||
|
||||
Owner and reviewer are set at briefing. Gate owner Sage.
|
||||
|
||||
## The hole
|
||||
|
||||
`#threadFor` (`packages/bus/src/broker.mjs:322-347`) puts a message to a threaded instance in the thread of
|
||||
the nearest message up its `in_reply_to` chain. It checks that the thread's instance is the target
|
||||
(`thread-instance-mismatch`), but not who owns the thread. A tester `message.send` to a threaded instance,
|
||||
in reply to a message in one of the human's threads, lands in the human's thread. Row 177's point 1 says the
|
||||
tester and the human never share a thread.
|
||||
|
||||
With the shipped role lists, `#checkMessaging` refuses the tester first (`message-sender-refused`,
|
||||
tester-threads T3), so only a business whose assistant definition has no lists reaches this. That's why
|
||||
it's a follow-up and not a row 177 blocker (Filbert N1, 29347).
|
||||
|
||||
## The fix
|
||||
|
||||
When the sender is the tester (`s.tester`) and the chain reaches a thread whose `owner` isn't `tester`,
|
||||
refuse with a named code. The builder picks the code and says why in BUILD.md. The reverse direction stays
|
||||
as it is: a role's reply up a chain into a tester-owned thread is how the chief's answer comes back to the
|
||||
tester. A human sender never gets here (`thread-required-use-thread-send` at :326). The row 143 spec-notice
|
||||
branch (:339-343) gets the same check if it can return a thread the tester doesn't own. BUILD.md says
|
||||
whether it can.
|
||||
|
||||
## Tests
|
||||
|
||||
1. A business whose assistant definition has no lists. The tester sends to the assistant in reply to a
|
||||
message in a human-owned thread. The send refuses with the new code, writes no message and no
|
||||
`message_threads` row, and the human's thread reads the same before and after.
|
||||
2. The same tester send in reply to a message in a tester-owned thread still lands in that thread.
|
||||
3. The chief's reply up a chain into a tester-owned thread still lands there (the round trip row 177 tests
|
||||
stays green).
|
||||
|
||||
Mutant: drop the owner check. Some gate test has to catch it (mos-0862).
|
||||
|
||||
## Gate
|
||||
|
||||
The reviewer approves the candidate manifest. Bus, cli and webui suites and every `scripts/test-*.sh`
|
||||
green on Sage's gate. Touched files: `packages/bus/src/broker.mjs`, a bus test file, `packages/bus/README.md`
|
||||
if its tester paragraph needs the rule, and the packet. Anything else gets named in BUILD.md.
|
||||
|
||||
# Brief: chat.mjs names the transport it is given (N2)
|
||||
|
||||
Owner and reviewer are set at briefing. Gate owner Sage.
|
||||
|
||||
## Why
|
||||
|
||||
`packages/webui/src/chat.mjs:1` calls itself the seam to "the current human transport", and :8 throws
|
||||
`TypeError('chat needs a human transport')`. Since row 177 the tester listener hands chat the tester
|
||||
transport too (Dewey's deviation 4). Both strings are now wrong. No behavior changes.
|
||||
|
||||
## The change
|
||||
|
||||
1. Reword the header comment so it covers both transports: the human one on the signed-in listener, the
|
||||
tester one on the row 176 listener. Name where each is passed in.
|
||||
2. Reword the TypeError so it doesn't say "human". No test reads either string today (grep over
|
||||
`packages/*/tests` and `scripts/test-*.sh` at 7f519242e). Recheck that at build time.
|
||||
3. If `packages/webui/README.md` repeats either phrase about chat, fix it the same way.
|
||||
|
||||
## Tests
|
||||
|
||||
A test that passes something other than a function to the chat seam and reads the new TypeError text.
|
||||
Mutant: put the old text back. The new test has to catch it.
|
||||
|
||||
## Gate
|
||||
|
||||
The reviewer approves the candidate manifest. Webui suite green on Sage's gate, and every
|
||||
`scripts/test-*.sh` that reads a webui path. Touched files: `packages/webui/src/chat.mjs`, one webui test
|
||||
file, the webui README if needed, and the packet.
|
||||
|
||||
# Brief: tester thread verbs in the CLI
|
||||
|
||||
Owner and reviewer are set at briefing. Gate owner Sage.
|
||||
|
||||
## Why
|
||||
|
||||
Row 177 gave the tester its own threads on the bus and on the 7333 Console, and left the CLI to a follow-up
|
||||
(DESIGN.md "Not in this row" item 1, Sage's call (b) in sage-1146). `packages/cli/src/cli.mjs:361` refuses
|
||||
`--thread` with `--tester`. Q173's agents test as the tester, and the W9 window steps did that from the CLI
|
||||
(STATE.md W9). A tester thread can only be driven from a browser on 7333 today.
|
||||
|
||||
## The change
|
||||
|
||||
1. `mosaic thread create|open|read --tester` and `mosaic threads --tester` call the row 177 tester verbs
|
||||
through TESTER_CLI. The bus already checks ownership. The CLI adds no rule of its own.
|
||||
2. `mosaic talk --thread T --tester` sends with `thread.send` as the tester, and `follow --thread T
|
||||
--tester` reads only that thread. Drop the :361 refusal.
|
||||
3. A tester reply arrives only through `message.receive` (STATE.md W9 correction, memory
|
||||
tester-replies-need-receive). The `--follow` path has to receive, not poll `inbox --tester --json`,
|
||||
which lists decisions only.
|
||||
4. `docs/TOOLS.md` and `packages/cli/README.md` list the new flags.
|
||||
|
||||
## Tests
|
||||
|
||||
1. Each verb with `--tester` against a fixture bus: create, list, open, send and read a tester-owned
|
||||
thread, and get the reply through follow.
|
||||
2. Each verb with `--tester` on a human-owned thread refuses with the bus's code, and the CLI prints it.
|
||||
3. The same verbs without `--tester` behave byte for byte as today.
|
||||
|
||||
Mutants: the CLI sends a tester `--thread` as the human, and `follow --thread --tester` drops the thread
|
||||
filter. Each one has to be killed by some gate test.
|
||||
|
||||
## Gate
|
||||
|
||||
The reviewer approves the candidate manifest. Cli and bus suites and every `scripts/test-*.sh` green on
|
||||
Sage's gate. Touched files: `packages/cli/src/cli.mjs`, `packages/cli/src/thread.mjs`, cli tests,
|
||||
`docs/TOOLS.md`, `packages/cli/README.md`, and the packet. A bus change, if one turns out to be needed,
|
||||
gets named in BUILD.md and asked about before it's built.
|
||||
Reference in New Issue
Block a user