✔ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (832.435526ms)
✔ a notifier that dies takes the host down with exit 1, so the unit restarts the pair (147.674706ms)
✔ a second host for the same data root refuses with exit 3 while the first runs (89.072495ms)
✔ a broker reply that misses the wait breaks the channel: the late reply answers nothing, later requests refuse, the host exits 1 (1119.273283ms)
✔ a broker reply with another request's id, or none, breaks the channel and the host exits 1 (160.4663ms)
✔ a broker reply with no request waiting breaks the channel and the host exits 1 (86.741881ms)
✔ a notifier that refuses stops the broker and the host refuses with exit 3 (145.033682ms)
✔ a notifier that refuses after the broker died still refuses with exit 3, without a send to the dead broker (136.82251ms)
✔ a notifier that dies before it replies, after the broker died, still refuses, without a send to the dead broker (81.48555ms)
✔ a close send that fails with EPIPE after the notifier refuses still gives the notifier's refusal, exit 3 (132.260709ms)
✔ a close send that fails with EPIPE after the notifier dies unanswered still gives the notifier's error (82.026069ms)
✔ close() whose stop and close sends fail with EPIPE still finishes, with exit 1 (152.664024ms)
✔ watchChildren reports a child that died before it was called, and one that dies later (28.827209ms)
✔ bus stop refuses to signal a live pid that is not a bus host (202.827669ms)
✔ bus start refuses with exit 3 and the code when the broker refuses to boot; bus status names the lock (236.487914ms)
✔ bus start refuses with exit 3 without a notifier config (105.323349ms)
✔ bus start runs until bus stop; status reports it while it runs (637.386174ms)
✔ bus-service.sh renders the unit and installs it into a given directory (59.670028ms)
✖ bus-service.sh pins the claude binary, refuses one the unit can't carry, and renders without one (47.707414ms)
✔ bus-service.sh refuses a directory pin and keeps a symlink default unresolved (14.394525ms)
✔ bus-service.sh refuses a default claude without the execute bit, or in a PATH dir with a space (8.538586ms)
✔ shared copy: npm ci, pushed reachability, readonly/existing copy, webui delegation (361.47686ms)
✔ wrapper preserves Q81 lease and marker, rejects foreign/symlink; check uses effective roots (384.556121ms)
✔ bus unit copy/pm pins, install refuses all busy states and failed reads, drop-in refusal (425.510325ms)
✔ missing package manifest refuses before npm; npm failure removes the unpublished temp copy (242.918584ms)
✔ real pinned install loads bus and Console; same-copy mosaic talk passes proof, other trees refuse (3171.461804ms)
✔ bus status reads effective copy/pm/drop-ins without writes; check refuses an overridden ExecStart (453.199889ms)
✔ copy writes the Console paths at the full id, read-only, and leaves an existing copy alone (600.079076ms)
✔ copy refuses a commit off refactor, an unknown one, a worktree and a bad copies directory (555.581109ms)
✔ copy writes nothing when an archived path is missing at the commit (183.324916ms)
✔ a copy that loses the rename race leaves no read-only temp directory behind (357.53775ms)
✔ a copy whose rename fails with no target refuses, writes no copy and leaves no temp directory (369.814468ms)
✔ a copy that meets a target holding files says exists: and moves nothing into it (344.808403ms)
✔ a copy that meets an empty target directory replaces it by rename, not by moving into it (366.80453ms)
✔ serve runs from a copy: /healthz 200, the config check, roles and RELEASE from the copy, the queue from --checkout (654.703518ms)
✔ serve refuses a --checkout that is not an absolute directory path (221.797247ms)
✔ consoleReads runs the queue read under queueRoot and reads RELEASE under root (48.933446ms)
✔ render prints the unit without the preview flags (8.900043ms)
✔ render carries every serve flag, the preview set included (6.258079ms)
✔ a partial preview set is refused (13.481459ms)
✔ a value the unit cannot carry is refused, for every flag (245.569434ms)
✔ the rendered unit names none of the human proof agent markers and sets no agent variable (16.505954ms)
✖ install into --dir with --no-reload writes the file whole, then reports unchanged (38.688582ms)
✖ install without --no-reload runs daemon-reload and nothing that starts the unit (19.104574ms)
✔ uninstall refuses while the unit is running, with or without --no-reload, and removes it once it is not (112.507892ms)
✔ status prints the unit state and GET /healthz on the installed port (172.004464ms)
✔ usage: an unknown verb or flag, and start or enable, exit 4 (58.916499ms)
✔ without --send, render is the template with its placeholders filled, byte for byte (23.256388ms)
✔ render --send with the preview set ends ExecStart with --send and changes nothing else (37.872557ms)
✖ --send without the whole preview set is refused and writes nothing (98.855784ms)
✖ install --send into --dir with --no-reload writes the sending unit, and status says whether it sends (191.335877ms)
✔ uninstall and status take no --send (34.210526ms)
✖ install refuses while the unit is running, in any state but inactive or failed, and changes nothing (63.102088ms)
✖ when the state read fails, install and uninstall refuse with one line and change nothing (75.207962ms)
✔ install needs --copy naming a copy that exists, and refuses outside the canonical checkout without --allow-worktree (55.435987ms)
✖ install refuses unless the bus unit runs from the same copy, naming both paths, and changes nothing (23.488273ms)
✔ render --copy runs the copy and reads the queue in the checkout; without --copy the unit is unchanged (13.766506ms)
✔ the uid header takes only an Authentik uid; the username header still takes a username (249.386613ms)
✔ a preview value cannot start with - or . (28.916263ms)
✔ status names the copy and whether refactor has moved past it, and says when the unit runs from no copy (405.714472ms)
ℹ tests 60
ℹ suites 0
ℹ pass 52
ℹ fail 8
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 5092.718428

✖ 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 (47.707414ms)
  Error: ENOENT: no such file or directory, scandir '/mnt/storage/scratch/tmp/mosaic-cli-mIWNMz/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-mIWNMz/units'
  }

test at packages/webui/tests/service.test.mjs:196:1
✖ install into --dir with --no-reload writes the file whole, then reports unchanged (38.688582ms)
  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 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:224:1
✖ install without --no-reload runs daemon-reload and nothing that starts the unit (19.104574ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  + actual - expected
  
    '--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@acme.service -p LoadState -p ExecStart\n' +
      '--user list-units --no-legend --plain mosaic-webui.service\n' +
      '--user daemon-reload\n'
  
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:230: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: 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 list-units --no-legend --plain mosaic-webui.service\n--user daemon-reload\n',
    expected: '--user list-units --all --no-legend --plain mosaic-bus@*.service\n--user show mosaic-bus@acme.service -p LoadState -p ExecStart\n--user list-units --no-legend --plain mosaic-webui.service\n--user daemon-reload\n',
    operator: 'strictEqual',
    diff: 'simple'
  }

test at packages/webui/tests/service.test.mjs:335:1
✖ --send without the whole preview set is refused and writes nothing (98.855784ms)
  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 (191.335877ms)
  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 (63.102088ms)
  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 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 (75.207962ms)
  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 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:513:1
✖ install refuses unless the bus unit runs from the same copy, naming both paths, and changes nothing (23.488273ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  + actual - expected
  
  + '--user show mosaic-bus@acme.service -p LoadState -p WorkingDirectory -p ExecStart\n'
  - '--user show mosaic-bus@acme.service -p LoadState -p ExecStart\n'
  
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:535: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\n',
    expected: '--user show mosaic-bus@acme.service -p LoadState -p ExecStart\n',
    operator: 'strictEqual',
    diff: 'simple'
  }
