✔ isRunId accepts the run id shape and nothing else (1.225949ms)
✔ a missing data root or runs directory lists nothing (1.892082ms)
✔ runs as a regular file lists nothing, as before (0.747282ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.931027ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (2.487142ms)
✔ readRunRecord returns documents and artifacts in directory order (1.153245ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (0.788032ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.781425ms)
✔ readRunDocument reads only the three run documents (0.64425ms)
✔ a link inside the data root is followed (1.443248ms)
✖ a data root that is itself a link is trusted as configured (0.723306ms)
✔ a run directory linked out of the data root is never read (0.774806ms)
✔ a document linked out of the data root reads as null (1.18996ms)
✔ a runs directory linked out of the data root refuses (0.624807ms)
✔ a relative link that climbs out of the data root refuses (0.520406ms)
✔ a sibling whose name starts with the data root's name is outside it (0.623168ms)
✔ a link loop refuses instead of reading as missing (0.641501ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.470743ms)
✔ an unreadable run directory refuses instead of reading as missing (0.559037ms)
✔ a link to the data root's parent is outside it (0.503187ms)
✔ listRunIds sorts whatever order the directory returns (16.993379ms)
✔ the readers write nothing (3.04089ms)
✔ no pointer is null (2.102694ms)
✔ the pointer release.sh writes reads back (1.420335ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (99.446402ms)
✔ a pointer that is a directory refuses with exit 4 (1.965912ms)
✔ a state file linked out of the data root refuses (1.584736ms)
✔ a state directory linked out of the data root refuses (0.926403ms)
✔ a missing log is empty (0.585862ms)
✔ the log reads oldest first and counts malformed lines (1.76685ms)
✔ last must be a positive integer (0.522534ms)
✔ the state readers write nothing (1.138156ms)
✔ list prints each run in the established format (99.14821ms)
✔ show prints the run in the established format (112.530433ms)
✔ show of a missing run and an invalid id exit 4 as before (168.188718ms)
✔ list and show refuse a runs directory linked out of the data root (200.199186ms)
✔ show refuses a run linked out of the data root; list reports it unknown (210.660658ms)
ℹ tests 37
ℹ suites 0
ℹ pass 36
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 877.697783

✖ failing tests:

test at packages/runs/tests/runs.test.mjs:111:1
✖ a data root that is itself a link is trusted as configured (0.723306ms)
  Error [RunsError]: /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-5lxeUT/alias/runs resolves outside the data root (/home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-5lxeUT/alias)
      at resolveInside (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/paths.mjs:33:11)
      at listRunIds (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:20:16)
      at listRunRecords (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:44:10)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/runs.test.mjs:116: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)
      at Test.run (node:internal/test_runner/test:1467:12)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    exitCode: 4
  }
