✔ shared copy: npm ci, pushed reachability, readonly/existing copy, webui delegation (341.432626ms)
✖ wrapper preserves Q81 lease and marker, rejects foreign/symlink; check uses effective roots (326.72328ms)
✔ bus unit copy/pm pins, install refuses all busy states and failed reads, drop-in refusal (359.721817ms)
✔ missing package manifest refuses before npm; npm failure removes the unpublished temp copy (229.595279ms)
✔ real pinned install loads bus and Console; same-copy mosaic talk passes proof, other trees refuse (2833.840626ms)
✔ bus status reads effective copy/pm/drop-ins without writes; check refuses an overridden ExecStart (423.449254ms)
✔ drop-ins in either override field and malformed metadata refuse; uninstall also checks --no-reload (149.227084ms)
ℹ tests 7
ℹ suites 0
ℹ pass 6
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4714.153127

✖ failing tests:

test at packages/cli/tests/stack-copy.test.mjs:40:1
✖ wrapper preserves Q81 lease and marker, rejects foreign/symlink; check uses effective roots (326.72328ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /2bc7f04545275e34d14bbf5889c648532c58789d/. Input:
  
  '#!/usr/bin/env bash\n' +
    '# mosaic-cli wrapper (Q81, agents/sage/work/q81/mosaic-cli.sh)\n' +
    '[ "${1:-}" = __lease-capability ] && exec "/mnt/storage/scratch/tmp/stack-copy-iZ1ELE/bin/mosaic-old" "$@"\n' +
    'exec "/other/scripts/mosaic" "$@"\n'
  
      at TestContext.<anonymous> (file:///mnt/storage/src/mosaic-stack-rocko-85/packages/cli/tests/stack-copy.test.mjs:46:9)
      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 async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: '#!/usr/bin/env bash\n# mosaic-cli wrapper (Q81, agents/sage/work/q81/mosaic-cli.sh)\n[ "${1:-}" = __lease-capability ] && exec "/mnt/storage/scratch/tmp/stack-copy-iZ1ELE/bin/mosaic-old" "$@"\nexec "/other/scripts/mosaic" "$@"\n',
    expected: /2bc7f04545275e34d14bbf5889c648532c58789d/,
    operator: 'match',
    diff: 'simple'
  }
