✔ isRunId accepts the run id shape and nothing else (1.177262ms)
✔ a missing data root or runs directory lists nothing (2.120403ms)
✔ runs as a regular file lists nothing, as before (0.678388ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.861957ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (2.547546ms)
✔ readRunRecord returns documents and artifacts in directory order (1.538135ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (1.13107ms)
✖ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (1.271159ms)
✔ readRunDocument reads only the three run documents (0.654773ms)
✔ a link inside the data root is followed (1.097525ms)
✔ a data root that is itself a link is trusted as configured (0.753622ms)
✔ a run directory linked out of the data root is never read (0.834684ms)
✔ a document linked out of the data root reads as null (1.039271ms)
✔ a runs directory linked out of the data root refuses (0.69181ms)
✔ a relative link that climbs out of the data root refuses (1.855925ms)
✔ a sibling whose name starts with the data root's name is outside it (1.188475ms)
✔ a link loop refuses instead of reading as missing (1.134003ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.730721ms)
✔ an unreadable run directory refuses instead of reading as missing (0.863693ms)
✔ a link to the data root's parent is outside it (0.64587ms)
✔ listRunIds sorts whatever order the directory returns (1.228953ms)
✔ the readers write nothing (4.005022ms)
✔ no pointer is null (3.229517ms)
✔ the pointer release.sh writes reads back (2.000427ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (22.490669ms)
✔ a pointer that is a directory refuses with exit 4 (1.097015ms)
✔ a state file linked out of the data root refuses (3.625438ms)
✔ a state directory linked out of the data root refuses (1.557756ms)
✔ a missing log is empty (0.857274ms)
✔ the log reads oldest first and counts malformed lines (1.909144ms)
✔ last must be a positive integer (0.916328ms)
✔ the state readers write nothing (2.334238ms)
✔ list prints each run in the established format (112.749358ms)
✔ show prints the run in the established format (93.106249ms)
✔ show of a missing run and an invalid id exit 4 as before (149.979418ms)
✔ list and show refuse a runs directory linked out of the data root (171.947155ms)
✔ show refuses a run linked out of the data root; list reports it unknown (302.989078ms)
ℹ tests 37
ℹ suites 0
ℹ pass 36
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 900.360942

✖ failing tests:

test at packages/runs/tests/runs.test.mjs:86:1
✖ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (1.271159ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception (RunsError).
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/runs.test.mjs:90: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'
  }
