✔ inbox lists only decisions routed to the human, with what approving authorizes and how to decide (162.500315ms)
✔ decide resolves by id prefix with --yes, and the trail shows it in broker order with the task to follow (177.934119ms)
✔ decide refuses without a terminal or --yes, on an unknown option and on a short reference (127.764402ms)
✔ decide prints a declining choice as declining (160.868866ms)
✔ an unknown outcome is reported once and never resent (150.658446ms)
✔ a decision closed before the answer arrives exits 2 and points at its trail (128.152304ms)
✔ a prefix that matches two open decisions exits 2 and resolves neither (141.319517ms)
✔ without --business a command uses the live host's business, and a stale host.json is not a host (94.198963ms)
✔ every human command refuses inside an agent run before it touches the bus (99.586936ms)
✔ usage errors exit 4; no business and no host is a usage error (94.825105ms)
✔ agents and tasks print through the broker (102.257686ms)
✔ notify.json: missing, loose, malformed and extra keys refuse; a binding or null passes (1.073338ms)
✔ bootConfig builds the broker's boot message for one business, with no trackers key when no project names one (46.435449ms)
✔ trackers come from the tracker.* variables of the one project that names a tracker project (42.161475ms)
✔ with two projects, the one that sets tracker.project supplies the tracker and the other is no conflict (32.692764ms)
✔ two projects that each name a tracker project refuse, since the boot shape holds one (30.95545ms)
✔ a business without tracker.baseUrl gets no trackers entry (32.995143ms)
✔ an unknown business and a broken system config refuse with exit 3 (53.96509ms)
✔ empty views say so (0.726597ms)
✔ the trail keeps the broker's order and names a decision's task without its rows (0.882059ms)
✔ tasks print the tracker fields the snapshot carries (0.14236ms)
✔ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (952.372413ms)
✔ a notifier that dies takes the host down with exit 1, so the unit restarts the pair (223.228615ms)
✔ a second host for the same data root refuses with exit 3 while the first runs (154.759164ms)
✔ a broker reply that misses the wait breaks the channel: the late reply answers nothing, later requests refuse, the host exits 1 (1166.978507ms)
✔ a broker reply with another request's id, or none, breaks the channel and the host exits 1 (329.162296ms)
✔ a notifier that refuses stops the broker and the host refuses with exit 3 (205.653188ms)
✔ a notifier that refuses after the broker died still refuses with exit 3, without a send to the dead broker (202.208886ms)
✔ a notifier that dies before it replies, after the broker died, still refuses, without a send to the dead broker (154.339398ms)
✔ a close send that fails with EPIPE after the notifier refuses still gives the notifier's refusal, exit 3 (191.76797ms)
✔ a close send that fails with EPIPE after the notifier dies unanswered still gives the notifier's error (153.078047ms)
✔ close() whose stop and close sends fail with EPIPE still finishes, with exit 1 (215.285555ms)
✔ watchChildren reports a child that died before it was called, and one that dies later (24.175919ms)
✔ bus stop refuses to signal a live pid that is not a bus host (202.931688ms)
✔ bus start refuses with exit 3 and the code when the broker refuses to boot; bus status names the lock (208.721094ms)
✔ bus start refuses with exit 3 without a notifier config (96.433156ms)
✔ bus start runs until bus stop; status reports it while it runs (660.990525ms)
✔ bus-service.sh renders the unit and installs it into a given directory (27.951547ms)
✔ bus start --pm: the PM runs under its own PID namespace, registered, with a manifest (1307.802994ms)
✔ the PM launches a coder through its launch tool; the coder answers; refusals name their code (664.453124ms)
✔ a runner that stops at once ends its launch with the runner's reason (255.681961ms)
✔ 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 (774.826194ms)
✔ 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 (3654.939053ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (144.004039ms)
✖ an over-long launch request is refused at once, not at the 10 s idle timeout (3412.359464ms)
✔ a launch client that never closes its side doesn't hold the host's close (179.960494ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1248.097834ms)
✔ zoned uses the IANA zone across DST (19.34815ms)
✔ each open blocking decision is DM'd once, across polls and a restart; non-blocking ones are not (162.974921ms)
✔ two blocking decisions get two DMs with different nonces (177.914722ms)
✔ the digest nonce differs per business and per day and fits Discord's 25 characters (0.170738ms)
✔ a failed DM is journaled, backs off, and is retried until it lands (128.140766ms)
✔ five definite refusals stop a DM: one gave-up line, one log line, and a restart keeps the count (152.973701ms)
✔ 429s, 5xx-style unknowns and refusals without a status never count toward the limit (148.988982ms)
✔ a crash between the fifth refusal and its gave-up line: the next poll appends it and sends nothing (128.584675ms)
✔ 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 (197.312731ms)
✔ a restart after the second refusal does not send before that refusal's 30 min are up (147.562084ms)
✔ the digest goes at 08:00 Chicago once a day, with blocking ones marked as DM'd (114.916739ms)
✔ a late start with no digest for the day sends one at once; an empty inbox gets one line (102.016613ms)
✔ an inbox read failure is logged and the next poll retries (0.618221ms)
✔ no Discord id reaches the journal or the log (119.100513ms)
✔ the journal: a torn tail is copied out and truncated, so an append after it reopens cleanly (25.171504ms)
✔ the journal: a crash between the copy and the truncate leaves a tail the next open repairs (44.075897ms)
✔ the journal: a whole file that is one torn line truncates to empty (27.713509ms)
✔ the journal: a malformed complete line refuses and leaves the file and any torn tail alone (2.376026ms)
✔ the journal: a loose file mode, a loose directory or a symlinked journal refuses (0.639962ms)
✔ the journal: a line with a wrong type refuses with exit 3 and names the field (1.802ms)
✔ the journal: a symlinked directory refuses and says it is a link (0.340471ms)
✔ 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.45465ms)
✔ the journal: an append after the file was swapped for a symlink refuses and writes nothing through it (0.362259ms)
✔ the journal: a directory it cannot write or create refuses with exit 3 and names the path (0.42642ms)
✔ digest content stays within Discord's 2000 characters (0.255232ms)
✔ runLoop never overlaps ticks and stops after the one in flight (110.560954ms)
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 (403.836981ms)
✔ the transport writes {business, verb, args} to the child and reads its JSON (44.720137ms)
✔ a bus code on stderr becomes the exit code; garbage and timeouts are outcome problems (2133.889595ms)
✔ busExit and refuseInsideAgent (0.513786ms)
✔ talk sends a REQUEST, prints and reads everything that arrives, and stops at the reply (295.836242ms)
✔ talk --wait 0 only sends; no reply within --wait exits 1 and says where it will show (1145.102558ms)
✔ talk, stop and launches off/on refuse inside an agent run; bad arguments are usage errors (118.588127ms)
✔ launches off and on go to the broker and change the business's launch state (114.265524ms)
✔ launches list reads sessions.json and marks a stale entry; stop reports it and refuses a non-runner (100.172121ms)
ℹ tests 82
ℹ suites 0
ℹ pass 81
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 11734.232731

✖ failing tests:

test at packages/cli/tests/launcher.test.mjs:326:1
✖ an over-long launch request is refused at once, not at the 10 s idle timeout (3412.359464ms)
  Error: the refusal took over 3000 ms
      at Timeout._onTimeout (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/cli/tests/launcher.test.mjs:324:101)
      at listOnTimeout (node:internal/timers:685:17)
      at process.processTimers (node:internal/timers:618:7)
