✔ isRunId accepts the run id shape and nothing else (1.019792ms)
✔ a missing data root or runs directory lists nothing (1.537162ms)
✔ runs as a regular file lists nothing, as before (0.626401ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.70396ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (1.605381ms)
✔ readRunRecord returns documents and artifacts in directory order (0.978894ms)
✖ readRunRecord is null for a missing run, a dangling link or a file (0.782736ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.618964ms)
✔ readRunDocument reads only the three run documents (0.639582ms)
✔ a link inside the data root is followed (0.953467ms)
✔ a data root that is itself a link is trusted as configured (0.675656ms)
✔ a run directory linked out of the data root is never read (0.689555ms)
✔ a document linked out of the data root reads as null (0.894036ms)
✔ a runs directory linked out of the data root refuses (0.600981ms)
✔ a relative link that climbs out of the data root refuses (0.422303ms)
✔ a sibling whose name starts with the data root's name is outside it (0.542892ms)
✔ a link loop refuses instead of reading as missing (0.66723ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.512036ms)
✔ an unreadable run directory refuses instead of reading as missing (0.626632ms)
✔ a link to the data root's parent is outside it (0.403352ms)
✔ listRunIds sorts whatever order the directory returns (0.81109ms)
✔ listRunRecords lists an r- name that isn't a valid run id, as before (0.63346ms)
✔ the readers write nothing (2.24943ms)
✔ no pointer is null (1.762831ms)
✔ the pointer release.sh writes reads back (1.161502ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (1.684703ms)
✔ a pointer that is a directory refuses with exit 4 (1.066646ms)
✔ a state file linked out of the data root refuses (0.95879ms)
✔ a state directory linked out of the data root refuses (0.598971ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.443066ms)
✔ a missing log is empty (0.346331ms)
✔ the log reads oldest first and counts malformed lines (0.900263ms)
✔ last must be a positive integer (0.433079ms)
✔ the state readers write nothing (0.791434ms)
✔ list prints each run in the established format (78.266364ms)
✔ show prints the run in the established format (69.618235ms)
✔ show of a missing run and an invalid id exit 4 as before (112.18599ms)
✔ list and show refuse a runs directory linked out of the data root (147.542974ms)
✔ show refuses a run linked out of the data root; list reports it unknown (133.430679ms)
✔ list shows an r- name that isn't a valid run id, as before (76.660284ms)
✔ show refuses an invalid id before reading the config (45.844203ms)
ℹ tests 41
ℹ suites 0
ℹ pass 40
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 718.130278

✖ 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 (0.782736ms)
  Error [RunsError]: cannot read /home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-b3hgCt/data/runs/r-20260101T000100Z-bbbbbb: ENOTDIR
      at readRunRecord (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:62:11)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/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
  }
