✔ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (826.92182ms)
✔ a notifier that dies takes the host down with exit 1, so the unit restarts the pair (143.499354ms)
✔ a second host for the same data root refuses with exit 3 while the first runs (85.23627ms)
✔ a broker reply that misses the wait breaks the channel: the late reply answers nothing, later requests refuse, the host exits 1 (1099.876559ms)
✔ a broker reply with another request's id, or none, breaks the channel and the host exits 1 (166.131357ms)
✔ a broker reply with no request waiting breaks the channel and the host exits 1 (86.703573ms)
✔ a notifier that refuses stops the broker and the host refuses with exit 3 (139.550318ms)
✔ a notifier that refuses after the broker died still refuses with exit 3, without a send to the dead broker (130.14956ms)
✔ a notifier that dies before it replies, after the broker died, still refuses, without a send to the dead broker (81.732491ms)
✔ a close send that fails with EPIPE after the notifier refuses still gives the notifier's refusal, exit 3 (129.730535ms)
✔ a close send that fails with EPIPE after the notifier dies unanswered still gives the notifier's error (82.978838ms)
✔ close() whose stop and close sends fail with EPIPE still finishes, with exit 1 (145.988828ms)
✔ watchChildren reports a child that died before it was called, and one that dies later (22.721282ms)
✔ bus stop refuses to signal a live pid that is not a bus host (202.580008ms)
✔ bus start refuses with exit 3 and the code when the broker refuses to boot; bus status names the lock (230.06186ms)
✔ bus start refuses with exit 3 without a notifier config (105.044006ms)
✔ bus start runs until bus stop; status reports it while it runs (684.729151ms)
✔ bus-service.sh renders the unit and installs it into a given directory (60.277019ms)
✖ bus-service.sh pins the claude binary, refuses one the unit can't carry, and renders without one (42.300408ms)
✔ bus-service.sh refuses a directory pin and keeps a symlink default unresolved (12.710767ms)
✔ bus-service.sh refuses a default claude without the execute bit, or in a PATH dir with a space (7.769906ms)
✔ shared copy: npm ci, pushed reachability, readonly/existing copy, webui delegation (368.281843ms)
✔ wrapper preserves Q81 lease and marker, rejects foreign/symlink; check uses effective roots (399.662537ms)
✔ bus unit copy/pm pins, install refuses all busy states and failed reads, drop-in refusal (404.104769ms)
✔ missing package manifest refuses before npm; npm failure removes the unpublished temp copy (221.54757ms)
✔ real pinned install loads bus and Console; same-copy mosaic talk passes proof, other trees refuse (3092.820279ms)
✔ bus status reads effective copy/pm/drop-ins without writes; check refuses an overridden ExecStart (428.258264ms)
✔ copy writes the Console paths at the full id, read-only, and leaves an existing copy alone (626.780892ms)
✔ copy refuses a commit off refactor, an unknown one, a worktree and a bad copies directory (525.115569ms)
✔ copy writes nothing when an archived path is missing at the commit (174.150692ms)
✔ a copy that loses the rename race leaves no read-only temp directory behind (347.357129ms)
✔ a copy whose rename fails with no target refuses, writes no copy and leaves no temp directory (351.515145ms)
✔ a copy that meets a target holding files says exists: and moves nothing into it (350.350637ms)
✔ a copy that meets an empty target directory replaces it by rename, not by moving into it (346.640879ms)
✔ serve runs from a copy: /healthz 200, the config check, roles and RELEASE from the copy, the queue from --checkout (658.403395ms)
✔ serve refuses a --checkout that is not an absolute directory path (215.470343ms)
✔ consoleReads runs the queue read under queueRoot and reads RELEASE under root (49.091614ms)
✔ render prints the unit without the preview flags (10.567975ms)
✔ render carries every serve flag, the preview set included (7.569192ms)
✔ a partial preview set is refused (15.303693ms)
✔ a value the unit cannot carry is refused, for every flag (239.606955ms)
✔ the rendered unit names none of the human proof agent markers and sets no agent variable (17.25795ms)
✖ install into --dir with --no-reload writes the file whole, then reports unchanged (41.031017ms)
✔ install without --no-reload runs daemon-reload and nothing that starts the unit (19.100114ms)
✔ uninstall refuses while the unit is running, with or without --no-reload, and removes it once it is not (111.573822ms)
✔ status prints the unit state and GET /healthz on the installed port (187.106942ms)
✔ usage: an unknown verb or flag, and start or enable, exit 4 (54.61155ms)
✔ without --send, render is the template with its placeholders filled, byte for byte (24.612059ms)
✔ render --send with the preview set ends ExecStart with --send and changes nothing else (41.833914ms)
✖ --send without the whole preview set is refused and writes nothing (97.522785ms)
✖ install --send into --dir with --no-reload writes the sending unit, and status says whether it sends (190.701381ms)
✔ uninstall and status take no --send (32.823393ms)
✖ install refuses while the unit is running, in any state but inactive or failed, and changes nothing (54.56234ms)
✖ when the state read fails, install and uninstall refuse with one line and change nothing (55.208878ms)
✔ install needs --copy naming a copy that exists, and refuses outside the canonical checkout without --allow-worktree (46.39302ms)
✖ install refuses unless the bus unit runs from the same copy, naming both paths, and changes nothing (53.754023ms)
✔ render --copy runs the copy and reads the queue in the checkout; without --copy the unit is unchanged (14.173605ms)
✔ the uid header takes only an Authentik uid; the username header still takes a username (253.641986ms)
✔ a preview value cannot start with - or . (28.710258ms)
✔ status names the copy and whether refactor has moved past it, and says when the unit runs from no copy (373.443876ms)
ℹ tests 60
ℹ suites 0
ℹ pass 53
ℹ fail 7
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4970.925155

✖ failing tests:

test at packages/cli/tests/host.test.mjs:509:1
✖ bus-service.sh pins the claude binary, refuses one the unit can't carry, and renders without one (42.300408ms)
  Error: ENOENT: no such file or directory, scandir '/mnt/storage/scratch/tmp/mosaic-cli-OGfAjn/units'
      at readdirSync (node:fs:1954:26)
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/cli/tests/host.test.mjs:547:20)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25)
      at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
      at Test.postRun (node:internal/test_runner/test:1542:19)
      at Test.run (node:internal/test_runner/test:1467:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    errno: -2,
    code: 'ENOENT',
    syscall: 'scandir',
    path: '/mnt/storage/scratch/tmp/mosaic-cli-OGfAjn/units'
  }

test at packages/webui/tests/service.test.mjs:196:1
✖ install into --dir with --no-reload writes the file whole, then reports unchanged (41.031017ms)
  AssertionError [ERR_ASSERTION]: with --no-reload, only the state read
  + actual - expected
  
  + [
  +   '--user show mosaic-bus@mosaic.service -p LoadState -p WorkingDirectory -p ExecStart',
  +   '--user show mosaic-bus@mosaic.service -p LoadState -p WorkingDirectory -p ExecStart'
  + ]
  - []
  
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:213:10)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: [ '--user show mosaic-bus@mosaic.service -p LoadState -p WorkingDirectory -p ExecStart', '--user show mosaic-bus@mosaic.service -p LoadState -p WorkingDirectory -p ExecStart' ],
    expected: [],
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at packages/webui/tests/service.test.mjs:335:1
✖ --send without the whole preview set is refused and writes nothing (97.522785ms)
  AssertionError [ERR_ASSERTION]: no systemctl call but the one state read
  + actual - expected
  
  + [
  +   '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart'
  + ]
  - []
  
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:361:10)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: [ '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart' ],
    expected: [],
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at packages/webui/tests/service.test.mjs:364:1
✖ install --send into --dir with --no-reload writes the sending unit, and status says whether it sends (190.701381ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected
  
  + [
  +   '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart',
  +   '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart'
  + ]
  - []
  
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:394:10)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: [ '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart', '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart' ],
    expected: [],
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at packages/webui/tests/service.test.mjs:426:1
✖ install refuses while the unit is running, in any state but inactive or failed, and changes nothing (54.56234ms)
  AssertionError [ERR_ASSERTION]: no daemon-reload
  + actual - expected
  
  + [
  +   '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart',
  +   '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart'
  + ]
  - []
  
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:441:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: [ '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart', '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart' ],
    expected: [],
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at packages/webui/tests/service.test.mjs:453:1
✖ when the state read fails, install and uninstall refuse with one line and change nothing (55.208878ms)
  AssertionError [ERR_ASSERTION]: no daemon-reload
  + actual - expected
  
  + [
  +   '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart',
  +   '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart'
  + ]
  - []
  
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:468:10)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: [ '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart', '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart' ],
    expected: [],
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at packages/webui/tests/service.test.mjs:513:1
✖ install refuses unless the bus unit runs from the same copy, naming both paths, and changes nothing (53.754023ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /show mosaic-bus@other\.service -p LoadState -p ExecStart/. Input:
  
  '--user list-units --all --no-legend --plain mosaic-bus@*.service\n' +
    '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart\n' +
    '--user show mosaic-bus@other.service -p LoadState -p WorkingDirectory -p ExecStart\n' +
    '--user list-units --no-legend --plain mosaic-webui.service\n'
  
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:542:10)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: '--user list-units --all --no-legend --plain mosaic-bus@*.service\n--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart\n--user show mosaic-bus@other.service -p LoadState -p WorkingDirectory -p ExecStart\n--user list-units --no-legend --plain mosaic-webui.service\n',
    expected: /show mosaic-bus@other\.service -p LoadState -p ExecStart/,
    operator: 'match',
    diff: 'simple'
  }
