command: ["timeout", "-k", "10", "1800", "node", "--test", "/home/jwoltje/.t3/worktrees/mosaic-stack/magica-row329/packages/cli/tests/stack-instances.test.mjs"]
TMPDIR: /mnt/storage/scratch/tmp/UtkF7t
begin: {"utc": "2026-10-24T21:39:59.728+00:00", "load1": "2.93"}
launch nice: 19
▶ T-I1 bootstrap --instance creates each instance's config, root and marker once, and refuses what it must not claim
  ✔ alpha and beta get a 0700 config dir, a config naming ~/.mosaic-NAME, a 0700 root and a 0644 marker (62.538487ms)
  ✔ under umask 077 the config and marker are 0600: the source honors the operator's umask (29.203429ms)
  ✔ a second bootstrap of each changes no byte, mode or mtime (121.724259ms)
  ✔ a non-empty root without its own marker refuses before anything is written, worktrees included (120.51049ms)
  ✔ an empty existing root is claimed, and an existing config whose root lost its marker refuses, not repairs (68.66153ms)
  ✔ a dangling symlink at the config path is never written through, named or default (60.824288ms)
  ✔ bad names and stray arguments exit 4 and write nothing (414.414477ms)
  ✔ --instance dev writes exactly what no flag writes (60.269134ms)
✔ T-I1 bootstrap --instance creates each instance's config, root and marker once, and refuses what it must not claim (939.945875ms)
▶ T-I2 selection: the four rows of D1 through the instance op and through an entry point
  ✔ row 1: no flag and no MOSAIC_CONFIG is the default; a missing default config leaves the data root empty (53.616151ms)
  ✔ row 2: MOSAIC_CONFIG alone is that config with the default names (26.233385ms)
  ✔ row 3: --instance NAME alone is NAME's config, root and suffix (54.757596ms)
  ✔ row 4: both must name one file; a symlink to it agrees, any other file exits 4 (370.101908ms)
  ✔ a named instance with no config exits 3 with its own bootstrap hint (27.973621ms)
  ✔ an entry point takes --instance in any position, once, and refuses a mismatch before it prints (163.105975ms)
  ✔ copy takes no --instance in either script: every instance shares the copies (18.34135ms)
✔ T-I2 selection: the four rows of D1 through the instance op and through an entry point (776.436087ms)
▶ T-I7 claims: the instance op refuses a root another instance claims, and a named root with no marker
  ✔ alpha's config pointing at beta's root refuses instance-root-mismatch in every op (127.799739ms)
  ✔ MOSAIC_CONFIG naming alpha's config with no flag refuses: the root is alpha's (25.573577ms)
  ✔ a default config whose root carries alpha's marker refuses; one naming dev, or none, passes (81.908143ms)
  ✔ a named root whose marker is missing, a symlink, unparsable or the wrong shape refuses instance-root-unclaimed (212.195151ms)
✔ T-I7 claims: the instance op refuses a root another instance claims, and a named root with no marker (507.778397ms)
✔ T-I5 two real bus hosts, one per instance, run at once and each answers from its own socket under its own root (1362.650124ms)
✔ T-I10 the guard protects every instance's config dir and data roots, even under a corrupt config (87.303965ms)
ℹ tests 24
ℹ suites 0
ℹ pass 24
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 3782.137092
