✔ isRunId accepts the run id shape and nothing else (1.68092ms)
✔ a missing data root or runs directory lists nothing (3.048389ms)
✔ runs as a regular file lists nothing, as before (0.963654ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.872482ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (3.199887ms)
✔ readRunRecord returns documents and artifacts in directory order (1.277031ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (0.810683ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (1.290617ms)
✔ readRunDocument reads only the three run documents (0.831152ms)
✔ a link inside the data root is followed (1.288609ms)
✔ a data root that is itself a link is trusted as configured (0.929194ms)
✔ a run directory linked out of the data root is never read (1.220122ms)
✔ a document linked out of the data root reads as null (1.495058ms)
✖ a runs directory linked out of the data root refuses (1.812269ms)
✔ a relative link that climbs out of the data root refuses (0.695909ms)
✔ a sibling whose name starts with the data root's name is outside it (0.712215ms)
✔ a link loop refuses instead of reading as missing (0.934066ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.655307ms)
✔ an unreadable run directory refuses instead of reading as missing (0.742938ms)
✔ a link to the data root's parent is outside it (0.576201ms)
✔ listRunIds sorts whatever order the directory returns (1.174841ms)
✔ the readers write nothing (2.73421ms)
✔ no pointer is null (2.202006ms)
✔ the pointer release.sh writes reads back (1.472039ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (2.816169ms)
✔ a pointer that is a directory refuses with exit 4 (1.423693ms)
✔ a state file linked out of the data root refuses (1.147291ms)
✔ a state directory linked out of the data root refuses (0.647667ms)
✔ a missing log is empty (1.318528ms)
✔ the log reads oldest first and counts malformed lines (1.349691ms)
✔ last must be a positive integer (0.767877ms)
✔ the state readers write nothing (1.128232ms)
✔ list prints each run in the established format (118.264972ms)
✔ show prints the run in the established format (82.606742ms)
✔ show of a missing run and an invalid id exit 4 as before (129.149189ms)
✖ list and show refuse a runs directory linked out of the data root (187.309472ms)
✔ show refuses a run linked out of the data root; list reports it unknown (222.898306ms)
ℹ tests 37
ℹ suites 0
ℹ pass 35
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 812.977588

✖ failing tests:

test at packages/runs/tests/runs.test.mjs:143:1
✖ a runs directory linked out of the data root refuses (1.812269ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /runs resolves outside the data root/. Input:
  
  'RunsError: /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-zX0oF7/data/runs/r-20260101T000000Z-aaaaaa resolves outside the data root (/home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-zX0oF7/data)'
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/runs.test.mjs:149: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: true,
    code: 'ERR_ASSERTION',
    actual: RunsError: /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-zX0oF7/data/runs/r-20260101T000000Z-aaaaaa resolves outside the data root (/home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-zX0oF7/data)
        at resolveInside (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/paths.mjs:33:11)
        at readRunRecord (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:55:15)
        at file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/runs.test.mjs:149:23
        at getActual (node:assert:580:5)
        at strict.throws (node:assert:728:24)
        at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/runs.test.mjs:149: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),
    expected: /runs resolves outside the data root/,
    operator: 'throws',
    diff: 'simple'
  }

test at packages/runs/tests/task-cli.test.mjs:70:1
✖ list and show refuse a runs directory linked out of the data root (187.309472ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /^mosaic-task: .*runs resolves outside the data root/. Input:
  
  'mosaic-task: /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-v5t5hA/data/runs/r-20260101T000000Z-aaaaaa resolves outside the data root (/home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-v5t5hA/data)\n'
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/task-cli.test.mjs:78:12)
      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: true,
    code: 'ERR_ASSERTION',
    actual: 'mosaic-task: /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-v5t5hA/data/runs/r-20260101T000000Z-aaaaaa resolves outside the data root (/home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-v5t5hA/data)\n',
    expected: /^mosaic-task: .*runs resolves outside the data root/,
    operator: 'match',
    diff: 'simple'
  }
