✔ inbox lists only decisions routed to the human, with what approving authorizes and how to decide (136.584442ms)
✔ decide resolves by id prefix with --yes, and the trail shows it in broker order with the task to follow (141.940734ms)
✔ decide refuses without a terminal or --yes, on an unknown option and on a short reference (132.039183ms)
✔ decide prints a declining choice as declining (143.587352ms)
✔ an unknown outcome is reported once and never resent (124.761265ms)
✔ a decision closed before the answer arrives exits 2 and points at its trail (121.794483ms)
✔ a prefix that matches two open decisions exits 2 and resolves neither (135.996842ms)
✔ without --business a command uses the live host's business, and a stale host.json is not a host (101.111215ms)
✔ every human command refuses inside an agent run before it touches the bus (109.364301ms)
✔ usage errors exit 4; no business and no host is a usage error (96.177626ms)
✔ agents and tasks print through the broker (112.915537ms)
✔ notify.json: missing, loose, malformed and extra keys refuse; a binding or null passes (1.21964ms)
✔ bootConfig builds the broker's boot message for one business, with no trackers key when no project names one (49.164257ms)
✔ trackers come from the tracker.* variables of the one project that names a tracker project (38.064735ms)
✔ with two projects, the one that sets tracker.project supplies the tracker and the other is no conflict (32.805116ms)
✔ two projects that each name a tracker project refuse, since the boot shape holds one (33.123203ms)
✔ a business without tracker.baseUrl gets no trackers entry (32.302573ms)
✔ an unknown business and a broken system config refuse with exit 3 (60.310168ms)
✔ empty views say so (1.146721ms)
✔ the trail keeps the broker's order and names a decision's task without its rows (1.493659ms)
✔ tasks print the tracker fields the snapshot carries (0.226234ms)
mosaic-notify: notify: poll failed: ENOENT: no such file or directory, open '/home/jwoltje/darkwing-scratch/tmp/mosaic-cli-5w2KeE/data/notify/acme/sent.jsonl'
✖ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (273.165302ms)
✔ a notifier that dies takes the host down with exit 1, so the unit restarts the pair (284.22541ms)
✔ a second host for the same data root refuses with exit 3 while the first runs (183.834661ms)
✖ a broker reply that misses the wait breaks the channel: the late reply answers nothing, later requests refuse, the host exits 1 (171.069067ms)
✖ a broker reply with another request's id, or none, breaks the channel and the host exits 1 (164.966958ms)
✔ a notifier that refuses stops the broker and the host refuses with exit 3 (217.716459ms)
✔ a notifier that refuses after the broker died still refuses with exit 3, without a send to the dead broker (198.431849ms)
✔ a notifier that dies before it replies, after the broker died, still refuses, without a send to the dead broker (144.888946ms)
✔ a close send that fails with EPIPE after the notifier refuses still gives the notifier's refusal, exit 3 (199.525503ms)
✔ a close send that fails with EPIPE after the notifier dies unanswered still gives the notifier's error (146.507475ms)
✔ close() whose stop and close sends fail with EPIPE still finishes, with exit 1 (213.318879ms)
✔ watchChildren reports a child that died before it was called, and one that dies later (26.316119ms)
✔ bus stop refuses to signal a live pid that is not a bus host (202.981804ms)
✔ bus start refuses with exit 3 and the code when the broker refuses to boot; bus status names the lock (226.439466ms)
✔ bus start refuses with exit 3 without a notifier config (91.492051ms)
✔ bus start runs until bus stop; status reports it while it runs (746.921036ms)
✔ bus-service.sh renders the unit and installs it into a given directory (29.344451ms)

Interrupted while running:

⚠ packages/cli/tests/launcher.test.mjs (packages/cli/tests/launcher.test.mjs:1:1)
⚠ packages/cli/tests/notifier.test.mjs (packages/cli/tests/notifier.test.mjs:1:1)
⚠ packages/cli/tests/trackers-boot.test.mjs (packages/cli/tests/trackers-boot.test.mjs:1:1)
⚠ packages/cli/tests/transport.test.mjs (packages/cli/tests/transport.test.mjs:1:1)
⚠ packages/cli/tests/verbs.test.mjs (packages/cli/tests/verbs.test.mjs:1:1)
✖ bus start --pm: the PM runs under its own PID namespace, registered, with a manifest (217.752184ms)
✖ the PM launches a coder through its launch tool; the coder answers; refusals name their code (187.022254ms)
✖ a runner that stops at once ends its launch with the runner's reason (196.677194ms)
file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:166
  const fail = (code, text) => Object.assign(new CliError(text, 1), { code });
                                             ^

CliError: broker channel broken: reply for another request
    at fail (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:166:46)
    at breakChannel (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:172:22)
    at ChildProcess.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:185:12)
    at ChildProcess.emit (node:events:514:20)
    at emit (node:internal/child_process:973:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
  exitCode: 1,
  code: 'broker-channel-broken'
}

Node.js v26.8.1
✖ packages/cli/tests/launcher.test.mjs (899959.906082ms)
✔ zoned uses the IANA zone across DST (23.264734ms)
✔ each open blocking decision is DM'd once, across polls and a restart; non-blocking ones are not (138.651891ms)
✔ two blocking decisions get two DMs with different nonces (135.324908ms)
✔ the digest nonce differs per business and per day and fits Discord's 25 characters (0.186002ms)
✔ a failed DM is journaled, backs off, and is retried until it lands (130.279935ms)
✔ five definite refusals stop a DM: one gave-up line, one log line, and a restart keeps the count (118.259498ms)
✔ 429s, 5xx-style unknowns and refusals without a status never count toward the limit (131.903789ms)
✔ a crash between the fifth refusal and its gave-up line: the next poll appends it and sends nothing (130.558414ms)
✔ polled every POLL_MS against a permanent 403, a DM is sent at 0, 30, 60, 90 and 120 min and gives up only then (194.25207ms)
✔ a restart after the second refusal does not send before that refusal's 30 min are up (143.608044ms)
✔ the digest goes at 08:00 Chicago once a day, with blocking ones marked as DM'd (117.165811ms)
✔ a late start with no digest for the day sends one at once; an empty inbox gets one line (110.833235ms)
✔ an inbox read failure is logged and the next poll retries (0.698135ms)
✔ no Discord id reaches the journal or the log (102.537652ms)
✔ the journal: a torn tail is copied out and truncated, so an append after it reopens cleanly (25.475607ms)
✔ the journal: a crash between the copy and the truncate leaves a tail the next open repairs (41.724142ms)
✔ the journal: a whole file that is one torn line truncates to empty (20.888812ms)
✔ the journal: a malformed complete line refuses and leaves the file and any torn tail alone (5.607382ms)
✔ the journal: a loose file mode, a loose directory or a symlinked journal refuses (0.76875ms)
✔ the journal: a line with a wrong type refuses with exit 3 and names the field (4.591218ms)
✔ the journal: a symlinked directory refuses and says it is a link (0.385496ms)
✔ the journal: a dangling directory link, a parent that is a file and a journal that is a directory each refuse with exit 3 (0.611992ms)
✔ the journal: an append after the file was swapped for a symlink refuses and writes nothing through it (0.588504ms)
✔ the journal: a directory it cannot write or create refuses with exit 3 and names the path (0.554506ms)
✔ digest content stays within Discord's 2000 characters (0.297253ms)
✔ runLoop never overlaps ticks and stops after the one in flight (110.70324ms)
tasks acme startup tracker-unavailable
✖ bootConfig trackers reach the S3 adapter in the real broker child, which goes ready against a fake Vikunja (250.626352ms)
✔ the transport writes {business, verb, args} to the child and reads its JSON (37.535565ms)
✔ a bus code on stderr becomes the exit code; garbage and timeouts are outcome problems (2165.50339ms)
✔ busExit and refuseInsideAgent (0.453975ms)
✔ talk sends a REQUEST, prints and reads everything that arrives, and stops at the reply (235.634935ms)
✔ talk --wait 0 only sends; no reply within --wait exits 1 and says where it will show (1137.945416ms)
✔ talk, stop and launches off/on refuse inside an agent run; bad arguments are usage errors (97.50083ms)
✔ launches off and on go to the broker and change the business's launch state (102.966001ms)
✔ launches list reads sessions.json and marks a stale entry; stop reports it and refuses a non-runner (98.360172ms)
ℹ tests 77
ℹ suites 0
ℹ pass 69
ℹ fail 7
ℹ cancelled 1
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 899978.394176

✖ failing tests:

test at packages/cli/tests/host.test.mjs:124:1
✖ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (273.165302ms)
  Error [CliError]: broker channel broken: reply for another request
      at fail (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:166:46)
      at breakChannel (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:172:22)
      at ChildProcess.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:185:12)
      at ChildProcess.emit (node:events:514:20)
      at emit (node:internal/child_process:973:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
    exitCode: 1,
    code: 'broker-channel-broken'
  }

test at packages/cli/tests/host.test.mjs:206:1
✖ a broker reply that misses the wait breaks the channel: the late reply answers nothing, later requests refuse, the host exits 1 (171.069067ms)
  Error [CliError]: broker channel broken: reply for another request
      at fail (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:166:46)
      at breakChannel (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:172:22)
      at ChildProcess.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:185:12)
      at ChildProcess.emit (node:events:514:20)
      at emit (node:internal/child_process:973:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
    exitCode: 1,
    code: 'broker-channel-broken'
  }

test at packages/cli/tests/host.test.mjs:240:1
✖ a broker reply with another request's id, or none, breaks the channel and the host exits 1 (164.966958ms)
  Error [CliError]: broker channel broken: reply for another request
      at fail (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:166:46)
      at breakChannel (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:172:22)
      at ChildProcess.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:185:12)
      at ChildProcess.emit (node:events:514:20)
      at emit (node:internal/child_process:973:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
    exitCode: 1,
    code: 'broker-channel-broken'
  }

test at packages/cli/tests/launcher.test.mjs:106:1
✖ bus start --pm: the PM runs under its own PID namespace, registered, with a manifest (217.752184ms)
  Error [CliError]: broker channel broken: reply for another request
      at fail (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:166:46)
      at breakChannel (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:172:22)
      at ChildProcess.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:185:12)
      at ChildProcess.emit (node:events:514:20)
      at emit (node:internal/child_process:973:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
    exitCode: 1,
    code: 'broker-channel-broken'
  }

test at packages/cli/tests/launcher.test.mjs:176:1
✖ the PM launches a coder through its launch tool; the coder answers; refusals name their code (187.022254ms)
  Error [CliError]: broker channel broken: reply for another request
      at fail (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:166:46)
      at breakChannel (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:172:22)
      at ChildProcess.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:185:12)
      at ChildProcess.emit (node:events:514:20)
      at emit (node:internal/child_process:973:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
    exitCode: 1,
    code: 'broker-channel-broken'
  }

test at packages/cli/tests/launcher.test.mjs:237:1
✖ a runner that stops at once ends its launch with the runner's reason (196.677194ms)
  Error [CliError]: broker channel broken: reply for another request
      at fail (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:166:46)
      at breakChannel (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:172:22)
      at ChildProcess.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:185:12)
      at ChildProcess.emit (node:events:514:20)
      at emit (node:internal/child_process:973:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
    exitCode: 1,
    code: 'broker-channel-broken'
  }

test at packages/cli/tests/launcher.test.mjs:1:1
✖ packages/cli/tests/launcher.test.mjs (899959.906082ms)
  'Promise resolution is still pending but the event loop has already resolved'

test at packages/cli/tests/trackers-boot.test.mjs:15:1
✖ bootConfig trackers reach the S3 adapter in the real broker child, which goes ready against a fake Vikunja (250.626352ms)
  Error [CliError]: broker channel broken: reply for another request
      at fail (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:166:46)
      at breakChannel (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:172:22)
      at ChildProcess.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/src/host.mjs:185:12)
      at ChildProcess.emit (node:events:514:20)
      at emit (node:internal/child_process:973:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
    exitCode: 1,
    code: 'broker-channel-broken'
  }
