✔ isRunId accepts the run id shape and nothing else (1.956544ms)
✔ a missing data root or runs directory lists nothing (2.725076ms)
✔ runs as a regular file lists nothing, as before (1.059244ms)
✔ listRunIds keeps r- names only, sorted oldest first (1.387509ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (2.768494ms)
✔ readRunRecord returns documents and artifacts in directory order (1.559464ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (1.211241ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (1.141838ms)
✔ readRunDocument reads only the three run documents (0.910973ms)
✔ a link inside the data root is followed (1.969226ms)
✔ a data root that is itself a link is trusted as configured (1.360016ms)
✖ a run directory linked out of the data root is never read (2.59955ms)
✖ a document linked out of the data root reads as null (1.129541ms)
✔ a runs directory linked out of the data root refuses (2.924601ms)
✔ a relative link that climbs out of the data root refuses (0.900903ms)
✔ a sibling whose name starts with the data root's name is outside it (0.987308ms)
✖ a link loop refuses instead of reading as missing (1.102282ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.771326ms)
✔ an unreadable run directory refuses instead of reading as missing (1.015364ms)
✔ a link to the data root's parent is outside it (2.042409ms)
✔ listRunIds sorts whatever order the directory returns (1.683733ms)
✔ the readers write nothing (3.50432ms)
✔ no pointer is null (3.237439ms)
✔ the pointer release.sh writes reads back (2.002114ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (2.94932ms)
✔ a pointer that is a directory refuses with exit 4 (1.676768ms)
✔ a state file linked out of the data root refuses (1.657011ms)
✔ a state directory linked out of the data root refuses (1.062717ms)
✔ a missing log is empty (0.687978ms)
✔ the log reads oldest first and counts malformed lines (1.731535ms)
✔ last must be a positive integer (0.797464ms)
✔ the state readers write nothing (1.515893ms)
✔ list prints each run in the established format (142.248626ms)
✔ show prints the run in the established format (102.945184ms)
✔ show of a missing run and an invalid id exit 4 as before (148.67361ms)
✔ list and show refuse a runs directory linked out of the data root (192.921615ms)
✖ show refuses a run linked out of the data root; list reports it unknown (213.400604ms)
ℹ tests 37
ℹ suites 0
ℹ pass 33
ℹ fail 4
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 871.096655

✖ failing tests:

test at packages/runs/tests/runs.test.mjs:119:1
✖ a run directory linked out of the data root is never read (2.59955ms)
  Error [RunsError]: /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-PvDpe8/data/runs/r-20260101T000000Z-aaaaaa/result.json resolves outside the data root (/home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-PvDpe8/data)
      at resolveInside (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/paths.mjs:33:11)
      at readJsonObject (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/paths.mjs:42:18)
      at file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:46:13
      at Array.map (<anonymous>)
      at listRunRecords (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:44:31)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/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 (1.129541ms)
  Error [RunsError]: /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-WcZej3/data/runs/r-20260101T000000Z-aaaaaa/result.json resolves outside the data root (/home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-WcZej3/data)
      at resolveInside (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/paths.mjs:33:11)
      at readJsonObject (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/paths.mjs:42:18)
      at readRunDocument (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:37:10)
      at readRunRecord (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:67:13)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/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 (1.102282ms)
  Error [RunsError]: cannot resolve /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-x1gAr0/data/runs/r-20260101T000000Z-aaaaaa/result.json: ELOOP
      at resolveInside (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/paths.mjs:30:11)
      at readJsonObject (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/paths.mjs:42:18)
      at file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:46:13
      at Array.map (<anonymous>)
      at listRunRecords (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:44:31)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/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 (213.400604ms)
  AssertionError [ERR_ASSERTION]: mosaic-task: /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-223gdI/data/runs/r-20260101T000000Z-aaaaaa/result.json resolves outside the data root (/home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-223gdI/data)
  
  
  4 !== 0
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/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'
  }
