✔ inbox lists only decisions routed to the human, with what approving authorizes and how to decide (118.041998ms)
✔ decide resolves by id prefix with --yes, and the trail shows it in broker order with the task to follow (131.48971ms)
✔ decide refuses without a terminal or --yes, on an unknown option and on a short reference (105.398857ms)
✔ decide prints a declining choice as declining (113.679832ms)
✔ an unknown outcome is reported once and never resent (103.463596ms)
✔ a decision closed before the answer arrives exits 2 and points at its trail (101.546322ms)
✔ a prefix that matches two open decisions exits 2 and resolves neither (117.043323ms)
✔ without --business a command uses the live host's business, and a stale host.json is not a host (94.753147ms)
✔ every human command refuses inside an agent run before it touches the bus (168.32314ms)
✔ usage errors exit 4; no business and no host is a usage error (116.968773ms)
✔ agents and tasks print through the broker (114.772476ms)
✔ notify.json: missing, loose, malformed and extra keys refuse; a binding or null passes (3.031321ms)
✔ bootConfig builds the broker's boot message for one business, with no trackers key when no project names one (58.653922ms)
✔ trackers come from the tracker.* variables of the one project that names a tracker project (37.003735ms)
✔ with two projects, the one that sets tracker.project supplies the tracker and the other is no conflict (36.75054ms)
✔ two projects that each name a tracker project refuse, since the boot shape holds one (38.472211ms)
✔ a business without tracker.baseUrl gets no trackers entry (31.429728ms)
✔ an unknown business and a broken system config refuse with exit 3 (61.848541ms)
✔ empty views say so (0.773262ms)
✔ the trail keeps the broker's order and names a decision's task without its rows (1.001536ms)
✔ tasks print the tracker fields the snapshot carries (0.168093ms)
✔ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (916.629745ms)
✔ a notifier that dies takes the host down with exit 1, so the unit restarts the pair (282.431038ms)
✔ a second host for the same data root refuses with exit 3 while the first runs (151.459267ms)
✔ a broker reply that misses the wait breaks the channel: the late reply answers nothing, later requests refuse, the host exits 1 (1298.740463ms)
✔ a broker reply with another request's id, or none, breaks the channel and the host exits 1 (267.882667ms)
✔ a broker reply with no request waiting breaks the channel and the host exits 1 (118.937925ms)
✔ a notifier that refuses stops the broker and the host refuses with exit 3 (163.746589ms)
✔ a notifier that refuses after the broker died still refuses with exit 3, without a send to the dead broker (162.737307ms)
✔ a notifier that dies before it replies, after the broker died, still refuses, without a send to the dead broker (100.238564ms)
✔ a close send that fails with EPIPE after the notifier refuses still gives the notifier's refusal, exit 3 (147.397721ms)
✔ a close send that fails with EPIPE after the notifier dies unanswered still gives the notifier's error (99.55411ms)
✔ close() whose stop and close sends fail with EPIPE still finishes, with exit 1 (158.126607ms)
✔ watchChildren reports a child that died before it was called, and one that dies later (22.58234ms)
✔ bus stop refuses to signal a live pid that is not a bus host (202.873188ms)
✔ bus start refuses with exit 3 and the code when the broker refuses to boot; bus status names the lock (216.76327ms)
✔ bus start refuses with exit 3 without a notifier config (89.840034ms)
✔ bus start runs until bus stop; status reports it while it runs (663.801122ms)
✔ bus-service.sh renders the unit and installs it into a given directory (26.911461ms)
✔ bus start --pm: the PM runs under its own PID namespace, registered, with a manifest (1274.104991ms)
✔ the PM launches a coder through its launch tool; the coder answers; refusals name their code (641.495076ms)
✔ a runner that stops at once ends its launch with the runner's reason (193.157972ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (808.645751ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3805.213621ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (103.523055ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (116.463798ms)
✔ a launch client that never closes its side doesn't hold the host's close (116.200463ms)
✖ a runner that ignores SIGTERM is killed when the host closes (15219.09123ms)
✔ zoned uses the IANA zone across DST (25.789076ms)
✔ each open blocking decision is DM'd once, across polls and a restart; non-blocking ones are not (117.526082ms)
✔ two blocking decisions get two DMs with different nonces (119.271966ms)
✔ the digest nonce differs per business and per day and fits Discord's 25 characters (0.21734ms)
✔ a failed DM is journaled, backs off, and is retried until it lands (86.435325ms)
✔ five definite refusals stop a DM: one gave-up line, one log line, and a restart keeps the count (99.237842ms)
✔ 429s, 5xx-style unknowns and refusals without a status never count toward the limit (102.191522ms)
✔ a crash between the fifth refusal and its gave-up line: the next poll appends it and sends nothing (97.68472ms)
✔ 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 (166.19917ms)
✔ a restart after the second refusal does not send before that refusal's 30 min are up (152.651257ms)
✔ the digest goes at 08:00 Chicago once a day, with blocking ones marked as DM'd (187.218066ms)
✔ a late start with no digest for the day sends one at once; an empty inbox gets one line (112.051392ms)
✔ an inbox read failure is logged and the next poll retries (0.655555ms)
✔ no Discord id reaches the journal or the log (106.117268ms)
✔ the journal: a torn tail is copied out and truncated, so an append after it reopens cleanly (22.013075ms)
✔ the journal: a crash between the copy and the truncate leaves a tail the next open repairs (50.417528ms)
✔ the journal: a whole file that is one torn line truncates to empty (29.165771ms)
✔ the journal: a malformed complete line refuses and leaves the file and any torn tail alone (2.409732ms)
✔ the journal: a loose file mode, a loose directory or a symlinked journal refuses (0.584473ms)
✔ the journal: a line with a wrong type refuses with exit 3 and names the field (1.741691ms)
✔ the journal: a symlinked directory refuses and says it is a link (0.303514ms)
✔ 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.453615ms)
✔ the journal: an append after the file was swapped for a symlink refuses and writes nothing through it (0.350523ms)
✔ the journal: a directory it cannot write or create refuses with exit 3 and names the path (0.414634ms)
✔ digest content stays within Discord's 2000 characters (0.249579ms)
✔ runLoop never overlaps ticks and stops after the one in flight (110.994649ms)
task.close {} answered: invalid-request; fake saw 18 requests, first GET /info 200, GET /projects/1 200, GET /projects/1/views 200
task.close on a missing task answered: task-not-found; it made GET /tasks/999 404
✔ bootConfig trackers reach the S3 adapter in the real broker child, which goes ready against a fake Vikunja (385.255221ms)
✔ the transport writes {business, verb, args} to the child and reads its JSON (44.005372ms)
✔ a bus code on stderr becomes the exit code; garbage and timeouts are outcome problems (2163.602099ms)
✔ busExit and refuseInsideAgent (0.399287ms)
✔ talk sends a REQUEST, prints and reads everything that arrives, and stops at the reply (205.64473ms)
✔ talk --wait 0 only sends; no reply within --wait exits 1 and says where it will show (1125.955523ms)
✔ talk, stop and launches off/on refuse inside an agent run; bad arguments are usage errors (115.161917ms)
✔ launches off and on go to the broker and change the business's launch state (95.270653ms)
✔ launches list reads sessions.json and marks a stale entry; stop reports it and refuses a non-runner (69.6019ms)
ℹ tests 83
ℹ suites 0
ℹ pass 82
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 22364.750197

✖ failing tests:

test at packages/cli/tests/launcher.test.mjs:369:1
✖ a runner that ignores SIGTERM is killed when the host closes (15219.09123ms)
  Error: close took over 15000 ms
      at Timeout._onTimeout (file:///home/jwoltje/darkwing-scratch/r41c/wt/packages/cli/tests/launcher.test.mjs:324:101)
      at listOnTimeout (node:internal/timers:685:17)
      at process.processTimers (node:internal/timers:618:7)
