✔ shared copy: npm ci, pushed reachability, readonly/existing copy, webui delegation (402.117526ms)
✔ wrapper preserves Q81 lease and marker, rejects foreign/symlink; check uses effective roots (359.002036ms)
✔ bus unit copy/pm pins, install refuses all busy states and failed reads, drop-in refusal (360.872254ms)
✔ missing package manifest refuses before npm; npm failure removes the unpublished temp copy (218.545578ms)
✔ real pinned install loads bus and Console; same-copy mosaic talk passes proof, other trees refuse (2920.221966ms)
✔ render prints the unit without the preview flags (9.83919ms)
✔ render carries every serve flag, the preview set included (6.657701ms)
✔ a partial preview set is refused (16.921966ms)
✔ a value the unit cannot carry is refused, for every flag (266.100996ms)
✔ the rendered unit names none of the human proof agent markers and sets no agent variable (19.235846ms)
✖ install into --dir with --no-reload writes the file whole, then reports unchanged (40.857132ms)
✖ install without --no-reload runs daemon-reload and nothing that starts the unit (19.98377ms)
✔ uninstall refuses while the unit is running, with or without --no-reload, and removes it once it is not (108.260518ms)
✔ status prints the unit state and GET /healthz on the installed port (159.665337ms)
✔ usage: an unknown verb or flag, and start or enable, exit 4 (52.641652ms)
✔ without --send, render is the template with its placeholders filled, byte for byte (23.207758ms)
✔ render --send with the preview set ends ExecStart with --send and changes nothing else (39.404377ms)
✖ --send without the whole preview set is refused and writes nothing (96.726723ms)
✖ install --send into --dir with --no-reload writes the sending unit, and status says whether it sends (177.416767ms)
✔ uninstall and status take no --send (26.826815ms)
✖ install refuses while the unit is running, in any state but inactive or failed, and changes nothing (47.386951ms)
✖ when the state read fails, install and uninstall refuse with one line and change nothing (52.340947ms)
✔ install needs --copy naming a copy that exists, and refuses outside the canonical checkout without --allow-worktree (52.429086ms)
✖ install refuses unless the bus unit runs from the same copy, naming both paths, and changes nothing (11.803391ms)
✔ render --copy runs the copy and reads the queue in the checkout; without --copy the unit is unchanged (13.418434ms)
✔ the uid header takes only an Authentik uid; the username header still takes a username (245.878881ms)
✔ a preview value cannot start with - or . (24.225594ms)
✔ status names the copy and whether refactor has moved past it, and says when the unit runs from no copy (347.197067ms)
ℹ tests 28
ℹ suites 0
ℹ pass 21
ℹ fail 7
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4316.574868

✖ failing tests:

test at packages/webui/tests/service.test.mjs:196:1
✖ install into --dir with --no-reload writes the file whole, then reports unchanged (40.857132ms)
  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.98377ms)
  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 (96.726723ms)
  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 (177.416767ms)
  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 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 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 (47.386951ms)
  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 (52.340947ms)
  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 (11.803391ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  + actual - expected
  
  + 'webui-service: refusing: mosaic-bus@acme.service WorkingDirectory is /mnt/storage/src/mosaic-stack-rocko-85, not the copy /mnt/storage/scratch/tmp/webui-service-bZG54H/.local/share/mosaic-stack/copies/0123456789abcdef0123456789abcdef01234567; nothing was changed\n'
  - 'webui-service: refusing: mosaic-bus@acme.service runs from /mnt/storage/src/mosaic-stack-rocko-85/scripts/mosaic, not the copy /mnt/storage/scratch/tmp/webui-service-bZG54H/.local/share/mosaic-stack/copies/0123456789abcdef0123456789abcdef01234567; the bus accepts only its own human-cli.mjs, so every Console bus call would fail human-required until the bus runs from the same copy\n'
  
      at refused (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:522:12)
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/webui/tests/service.test.mjs:529:3)
      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: 'webui-service: refusing: mosaic-bus@acme.service WorkingDirectory is /mnt/storage/src/mosaic-stack-rocko-85, not the copy /mnt/storage/scratch/tmp/webui-service-bZG54H/.local/share/mosaic-stack/copies/0123456789abcdef0123456789abcdef01234567; nothing was changed\n',
    expected: 'webui-service: refusing: mosaic-bus@acme.service runs from /mnt/storage/src/mosaic-stack-rocko-85/scripts/mosaic, not the copy /mnt/storage/scratch/tmp/webui-service-bZG54H/.local/share/mosaic-stack/copies/0123456789abcdef0123456789abcdef01234567; the bus accepts only its own human-cli.mjs, so every Console bus call would fail human-required until the bus runs from the same copy\n',
    operator: 'strictEqual',
    diff: 'simple'
  }
