✔ isRunId accepts the run id shape and nothing else (1.74403ms)
✔ a missing data root or runs directory lists nothing (2.198048ms)
✔ runs as a regular file lists nothing, as before (0.749386ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.943488ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (4.593534ms)
✔ readRunRecord returns documents and artifacts in directory order (2.041033ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (1.316339ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (1.130767ms)
✔ readRunDocument reads only the three run documents (0.938903ms)
✔ a link inside the data root is followed (1.911798ms)
✔ a data root that is itself a link is trusted as configured (1.338795ms)
✔ a run directory linked out of the data root is never read (1.316168ms)
✔ a document linked out of the data root reads as null (1.553329ms)
✔ a runs directory linked out of the data root refuses (0.940651ms)
✔ a relative link that climbs out of the data root refuses (0.763816ms)
✔ a sibling whose name starts with the data root's name is outside it (0.831365ms)
✔ a link loop refuses instead of reading as missing (1.081862ms)
✖ an unreadable runs directory refuses instead of listing nothing (1.920097ms)
✔ an unreadable run directory refuses instead of reading as missing (0.910463ms)
✔ a link to the data root's parent is outside it (0.731845ms)
✔ listRunIds sorts whatever order the directory returns (1.261893ms)
✔ the readers write nothing (4.021246ms)
✔ no pointer is null (3.059529ms)
✔ the pointer release.sh writes reads back (1.661181ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (2.521897ms)
✔ a pointer that is a directory refuses with exit 4 (1.465131ms)
✔ a state file linked out of the data root refuses (1.638679ms)
✔ a state directory linked out of the data root refuses (0.691235ms)
✔ a missing log is empty (0.580753ms)
✔ the log reads oldest first and counts malformed lines (1.082188ms)
✔ last must be a positive integer (0.648072ms)
✔ the state readers write nothing (1.944511ms)
✔ list prints each run in the established format (135.505629ms)
✔ show prints the run in the established format (124.440305ms)
✔ show of a missing run and an invalid id exit 4 as before (139.637014ms)
✔ list and show refuse a runs directory linked out of the data root (207.914443ms)
✔ show refuses a run linked out of the data root; list reports it unknown (222.421367ms)
ℹ tests 37
ℹ suites 0
ℹ pass 36
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 912.133056

✖ failing tests:

test at packages/runs/tests/runs.test.mjs:177:1
✖ an unreadable runs directory refuses instead of listing nothing (1.920097ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception.
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/runs.test.mjs:183: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: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    operator: 'throws',
    diff: 'simple'
  }
