✔ isRunId accepts the run id shape and nothing else (1.279176ms)
✔ a missing data root or runs directory lists nothing (2.009751ms)
✔ runs as a regular file lists nothing, as before (0.780142ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.907817ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (2.573369ms)
✔ readRunRecord returns documents and artifacts in directory order (1.415964ms)
✖ readRunRecord is null for a missing run, a dangling link or a file (1.425009ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (1.074088ms)
✔ readRunDocument reads only the three run documents (0.943201ms)
✔ a link inside the data root is followed (1.78009ms)
✔ a data root that is itself a link is trusted as configured (1.185862ms)
✔ a run directory linked out of the data root is never read (1.204155ms)
✔ a document linked out of the data root reads as null (1.549239ms)
✔ a runs directory linked out of the data root refuses (1.03995ms)
✔ a relative link that climbs out of the data root refuses (0.689295ms)
✔ a sibling whose name starts with the data root's name is outside it (0.923991ms)
✔ a link loop refuses instead of reading as missing (1.150588ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.729845ms)
✔ an unreadable run directory refuses instead of reading as missing (0.891325ms)
✔ a link to the data root's parent is outside it (1.221017ms)
✔ listRunIds sorts whatever order the directory returns (1.108483ms)
✔ the readers write nothing (3.377499ms)
✔ no pointer is null (2.369876ms)
✔ the pointer release.sh writes reads back (1.445943ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (4.334902ms)
✔ a pointer that is a directory refuses with exit 4 (0.757318ms)
✔ a state file linked out of the data root refuses (1.27317ms)
✔ a state directory linked out of the data root refuses (0.743687ms)
✔ a missing log is empty (0.463828ms)
✔ the log reads oldest first and counts malformed lines (1.107084ms)
✔ last must be a positive integer (0.692277ms)
✔ the state readers write nothing (1.18172ms)
✔ list prints each run in the established format (105.980567ms)
✔ show prints the run in the established format (115.012534ms)
✔ show of a missing run and an invalid id exit 4 as before (135.038631ms)
✔ list and show refuse a runs directory linked out of the data root (172.97353ms)
✔ show refuses a run linked out of the data root; list reports it unknown (197.370536ms)
ℹ tests 37
ℹ suites 0
ℹ pass 36
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 805.379529

✖ failing tests:

test at packages/runs/tests/runs.test.mjs:75:1
✖ readRunRecord is null for a missing run, a dangling link or a file (1.425009ms)
  Error [RunsError]: cannot read /home/jwoltje/darkwing-scratch/r56a/tmp/mosaic-runs-test-FPVVtO/data/runs/r-20260101T000100Z-bbbbbb: ENOTDIR
      at readRunRecord (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/src/runs.mjs:62:11)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/runs.test.mjs:83:16)
      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
  }
