✔ isRunId accepts the run id shape and nothing else (1.400398ms)
✔ a missing data root or runs directory lists nothing (1.988221ms)
✔ runs as a regular file lists nothing, as before (0.707746ms)
✔ listRunIds keeps r- names only, sorted oldest first (1.622032ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (1.758806ms)
✔ readRunRecord returns documents and artifacts in directory order (1.221436ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (1.088578ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (1.038079ms)
✔ readRunDocument reads only the three run documents (0.884663ms)
✔ a link inside the data root is followed (2.038475ms)
✔ a data root that is itself a link is trusted as configured (1.134007ms)
✖ a run directory linked out of the data root is never read (0.752745ms)
✖ a document linked out of the data root reads as null (0.763986ms)
✔ a runs directory linked out of the data root refuses (0.653651ms)
✔ a relative link that climbs out of the data root refuses (0.478299ms)
✔ a sibling whose name starts with the data root's name is outside it (0.531338ms)
✖ a link loop refuses instead of reading as missing (0.601651ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.458441ms)
✔ an unreadable run directory refuses instead of reading as missing (0.547674ms)
✔ a link to the data root's parent is outside it (0.51465ms)
✔ listRunIds sorts whatever order the directory returns (0.836887ms)
✔ listRunRecords lists an r- name that isn't a valid run id, as before (0.736515ms)
✔ the readers write nothing (2.225785ms)
✔ no pointer is null (2.030231ms)
✔ the pointer release.sh writes reads back (1.320527ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (135.180496ms)
✔ a pointer that is a directory refuses with exit 4 (0.722154ms)
✔ a state file linked out of the data root refuses (1.394205ms)
✔ a state directory linked out of the data root refuses (0.524668ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.412215ms)
✔ a missing log is empty (0.308456ms)
✔ the log reads oldest first and counts malformed lines (0.862537ms)
✔ last must be a positive integer (0.41004ms)
✔ the state readers write nothing (0.697997ms)
✔ list prints each run in the established format (102.363954ms)
✔ show prints the run in the established format (99.691103ms)
✔ show of a missing run and an invalid id exit 4 as before (133.511964ms)
✔ list and show refuse a runs directory linked out of the data root (188.487781ms)
✖ show refuses a run linked out of the data root; list reports it unknown (167.45552ms)
✔ list shows an r- name that isn't a valid run id, as before (88.153586ms)
✔ show refuses an invalid id before reading the config (62.195932ms)
ℹ tests 41
ℹ suites 0
ℹ pass 37
ℹ fail 4
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 905.338616

✖ failing tests:

test at packages/runs/tests/runs.test.mjs:119:1
✖ a run directory linked out of the data root is never read (0.752745ms)
  Error [RunsError]: /home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-LFk8Oo/data/runs/r-20260101T000000Z-aaaaaa/result.json resolves outside the data root (/home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-LFk8Oo/data)
      at resolveInside (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/paths.mjs:33:11)
      at readJsonObject (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/paths.mjs:42:18)
      at file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:46:13
      at Array.map (<anonymous>)
      at listRunRecords (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:44:31)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/runs.test.mjs:125: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) {
    exitCode: 4
  }

test at packages/runs/tests/runs.test.mjs:129:1
✖ a document linked out of the data root reads as null (0.763986ms)
  Error [RunsError]: /home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-ge63ie/data/runs/r-20260101T000000Z-aaaaaa/result.json resolves outside the data root (/home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-ge63ie/data)
      at resolveInside (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/paths.mjs:33:11)
      at readJsonObject (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/paths.mjs:42:18)
      at readRunDocument (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:37:10)
      at readRunRecord (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:67:13)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/runs.test.mjs:136:18)
      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) {
    exitCode: 4
  }

test at packages/runs/tests/runs.test.mjs:168:1
✖ a link loop refuses instead of reading as missing (0.601651ms)
  Error [RunsError]: cannot resolve /home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-HLtM1w/data/runs/r-20260101T000000Z-aaaaaa/result.json: ELOOP
      at resolveInside (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/paths.mjs:30:11)
      at readJsonObject (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/paths.mjs:42:18)
      at file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:46:13
      at Array.map (<anonymous>)
      at listRunRecords (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:44:31)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/runs.test.mjs:174: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) {
    exitCode: 4
  }

test at packages/runs/tests/task-cli.test.mjs:82:1
✖ show refuses a run linked out of the data root; list reports it unknown (167.45552ms)
  AssertionError [ERR_ASSERTION]: mosaic-task: /home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-QZ52Qw/data/runs/r-20260101T000000Z-aaaaaa/result.json resolves outside the data root (/home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-QZ52Qw/data)
  
  
  4 !== 0
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/task-cli.test.mjs:92:10)
      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 Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: 4,
    expected: 0,
    operator: 'strictEqual',
    diff: 'simple'
  }
