✔ isRunId accepts the run id shape and nothing else (1.695864ms)
✔ a missing data root or runs directory lists nothing (2.111524ms)
✔ runs as a regular file lists nothing, as before (0.687688ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.876875ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (3.457534ms)
✔ readRunRecord returns documents and artifacts in directory order (1.739748ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (1.186074ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (1.159887ms)
✔ readRunDocument reads only the three run documents (1.675916ms)
✔ a link inside the data root is followed (1.744427ms)
✔ a data root that is itself a link is trusted as configured (1.031912ms)
✔ a run directory linked out of the data root is never read (1.011737ms)
✔ a document linked out of the data root reads as null (1.210562ms)
✔ a runs directory linked out of the data root refuses (0.875407ms)
✔ a relative link that climbs out of the data root refuses (0.538894ms)
✔ a sibling whose name starts with the data root's name is outside it (0.616345ms)
✔ a link loop refuses instead of reading as missing (1.019959ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.963002ms)
✔ an unreadable run directory refuses instead of reading as missing (0.667147ms)
✔ a link to the data root's parent is outside it (0.500073ms)
✔ listRunIds sorts whatever order the directory returns (0.863784ms)
✔ listRunRecords lists an r- name that isn't a valid run id, as before (0.689777ms)
✔ the readers write nothing (2.395707ms)
✔ no pointer is null (1.987192ms)
✔ the pointer release.sh writes reads back (1.500792ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (4.484566ms)
✖ a pointer that is a directory refuses with exit 4 (1.455589ms)
✔ a state file linked out of the data root refuses (1.342733ms)
✔ a state directory linked out of the data root refuses (0.904937ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.979319ms)
✔ a missing log is empty (0.601833ms)
✔ the log reads oldest first and counts malformed lines (1.626737ms)
✔ last must be a positive integer (0.825438ms)
✔ the state readers write nothing (0.984388ms)
✔ list prints each run in the established format (103.938354ms)
✔ show prints the run in the established format (99.605055ms)
✔ show of a missing run and an invalid id exit 4 as before (141.552513ms)
✔ list and show refuse a runs directory linked out of the data root (263.632285ms)
✔ show refuses a run linked out of the data root; list reports it unknown (241.004316ms)
✔ list shows an r- name that isn't a valid run id, as before (92.044439ms)
✔ show refuses an invalid id before reading the config (48.767538ms)
ℹ tests 41
ℹ suites 0
ℹ pass 40
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1064.094476

✖ failing tests:

test at packages/runs/tests/state.test.mjs:51:1
✖ a pointer that is a directory refuses with exit 4 (1.455589ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception.
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/state.test.mjs:54: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: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    operator: 'throws',
    diff: 'simple'
  }
