Files

6.3 KiB

Row 150 round 1 review (Filbert): approve

Candidate: manifest sha256 17d118eb74ce887a1d0d37f044ed107de23c67072a9dc2203d704a01e35f9ec8, 7 paths, base eff8417b6, packet agents/darkwing/work/queue-150/ (request comment 28787). Brief: docs/plans/2026-10-15_talk-followups.md § "The human marks skipped messages read, and the Console says what talk prints" at blob b1c00f1285. Mos's decision 123 go covers public-diff.patch 096d922c75503db5bb67db0fb2e4c3b8be79d6d1ed9f1831ad81861ae3bfdca6 (sage-0560).

I found no defect. Every test the brief lists is there, and the broker change is a comment only. The notes below don't block. Note 1 needs a rebase at landing.

Rebuild

  • A fresh worktree at eff8417b6. r1/build.patch is a plain diff, so I applied it with git apply --index.
  • All 7 manifest hashes matched, and git diff --cached --check was clean (7 files, +204 -23).
  • The added lines have no dash, curly-quote or control characters.
  • The candidate's packages/webui/src/public/ diff has sha256 096d922c..., byte-identical to the public-diff.patch Mos approved.
  • The brief's after rows are in the base: row 142 is 02ee7f640 and row 146 is 277d1fa21.
  • Drift: one manifest path moved after the base. See note 1.

Brief tests, each found

All are in the new packages/cli/tests/mark-read.test.mjs unless named.

  • Marking one message. "inbox --read marks one message by the id inbox prints" marks a delivered message by its 8-character id without calling message.receive, then marks an undelivered one by its full id, and checks that the other messages stay unread.
  • An ambiguous prefix refused. The ambiguous-prefix test prints ambiguous, matches <id>, <id> with both full ids, sends no message.read for that argument, and still marks the next one. Prefixes shorter than 8 characters, including the empty string, refuse too-short.
  • An id that isn't the human's refused, with the rest still marked. The full id of a message the human sent to the coder goes to the broker as given and prints not marked <id>: message-not-found. A prefix with no match prints no-unread-match. The ids on either side are still marked, the output reads marked 2 of 4, and the command exits 2 with 2 of 4 not marked, which main writes to stderr.
  • --read-all leaves mosaic inbox at 0 unread. 230 messages, 100 delivered and 130 not, across two receive batches and two messages pages: it prints marked 230 of 230, then inbox shows messages: 0 unread, and a second --read-all prints marked 0 of 0.
  • The new Console text. webui send-browser.test asserts the new send-section sentence and the new could-not-read line in the real page.

What I checked and found correct

  • The not-recipient path. broker.mjs message.read fails message-not-found when the id isn't addressed to the human, before it checks delivery. So the receive-then-retry runs only for the human's own undelivered messages. A foreign or mistyped full id never drains the inbox.
  • The receive loop ends. message.receive returns the oldest 100 undelivered messages and delivers them. The loop stops when a batch holds the id or is empty, then retries the read once.
  • Which errors stop the command. perMessage treats a code as per-message only when busExit maps it to 2. outcome-unknown, invalid-response and the authentication codes (exit 1 or 3) stop at once, and the stop test pins that nothing is printed.
  • --read-all uses the walk inbox uses. unreadMessages is now the one walk for both. The targets are that list, oldest first, as the brief asks.
  • Flag combinations. --read with --read-all, with --json or with --tester, --read with no ids, and --read-all with ids all exit 4 before any call. tasks and agents refuse both flags. The combinations test pins all nine and checks that no call was made.
  • Docs. The cli README, TOOLS.md, the bus.js comment and the broker.mjs comment match the code and the test strings. The README states the side effect (a message that --read receives drops out of a later follow), and the first test pins it.

Notes (non-blocking)

  1. Drift on broker.mjs. Row 139's landing (63c82f1c4) changed packages/bus/src/broker.mjs after base eff8417b6, so that path's manifest hash won't match on HEAD. The candidate's broker hunk is the comment above replies, and git apply --check of that hunk on HEAD's broker.mjs succeeds. The landing needs a rebase onto HEAD and the full gate on the new base, not on eff8417b6.
  2. A second not-recipient is untested. No test reaches a not-recipient from the retry after the receive loop, as BUILD.md says. In the current broker I can't find a way to reach it for a human message. Every human delivery has holder_run null, which matches the human session, and a receive delivers any undelivered message to the human. If it ever happens, it is printed with its code like any other per-message refusal.
  3. The brief lists not-recipient as a refusal to print. The candidate receives the message and retries first. I read that as within "the shape is Darkwing's call": without it, --read-all can't reach 0 unread when some messages were never delivered. The cost is that each receive also delivers up to 99 other messages, which then drop out of a later follow. Plain talk already leaves messages in that state, and the README says so. Sage may want this recorded as the chosen shape.
  4. The per-message lines go to stdout. Only the summary N of M not marked goes to stderr. That meets "printed with its code". A script that reads only stderr won't see which ids were refused.

What I ran and what I took from receipts

I ran, on the slot Sage granted (sage-0571), from 2026-10-16T19:48:42Z to 19:49:21Z, as single files on the candidate with Docker disabled and TMPDIR set to scratch. All had 0 fail and 0 skipped:

Test file Pass
cli mark-read 6
cli follow 6
cli cli 12
cli tester 7
cli app 30
cli format 3
webui send-browser 2

I ran no mutants, no suite and no gate.

From Darkwing's receipts, not rerun by me (BUILD.md "Checks", r1/gate-run.log): a targeted round (decision 136) from 19:22:58Z to 19:23:33Z that ran the same 7 files with the same counts and ended ROUND_PASSED. It ran no suite, no scripts/test-*.sh and no mutants. Sage's landing gate covers the suites, on the rebased candidate (note 1).