✔ isRunId accepts the run id shape and nothing else (1.070238ms)
✔ a missing data root or runs directory lists nothing (15.238793ms)
✔ runs as a regular file lists nothing, as before (0.630315ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.749971ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (1.868706ms)
✔ readRunRecord returns documents and artifacts in directory order (0.975396ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (0.713914ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.676303ms)
✔ readRunDocument reads only the three run documents (0.521547ms)
✔ a link inside the data root is followed (0.939391ms)
✔ a data root that is itself a link is trusted as configured (0.658101ms)
✔ a run directory linked out of the data root is never read (0.61921ms)
✔ a document linked out of the data root reads as null (0.876784ms)
✔ a runs directory linked out of the data root refuses (0.544007ms)
✔ a relative link that climbs out of the data root refuses (0.387288ms)
✔ a sibling whose name starts with the data root's name is outside it (0.479327ms)
✔ a link loop refuses instead of reading as missing (0.619689ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.410005ms)
✔ an unreadable run directory refuses instead of reading as missing (0.46599ms)
✔ a link to the data root's parent is outside it (0.377274ms)
✔ listRunIds sorts whatever order the directory returns (0.719835ms)
✔ listRunRecords lists an r- name that isn't a valid run id, as before (0.463838ms)
✔ the readers write nothing (12.891696ms)
✔ no pointer is null (13.84385ms)
✔ the pointer release.sh writes reads back (1.126812ms)
✖ a pointer that isn't the version 1 shape refuses with exit 2 (78.389391ms)
✔ a pointer that is a directory refuses with exit 4 (1.045036ms)
✔ a state file linked out of the data root refuses (2.729789ms)
✔ a state directory linked out of the data root refuses (0.95196ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.776137ms)
✔ a missing log is empty (0.563476ms)
✔ the log reads oldest first and counts malformed lines (6.585745ms)
✔ last must be a positive integer (0.943606ms)
✔ the state readers write nothing (0.995233ms)
✔ list prints each run in the established format (95.360894ms)
✔ show prints the run in the established format (99.253996ms)
✔ show of a missing run and an invalid id exit 4 as before (122.191371ms)
✔ list and show refuse a runs directory linked out of the data root (188.490155ms)
✔ show refuses a run linked out of the data root; list reports it unknown (171.206385ms)
✔ list shows an r- name that isn't a valid run id, as before (96.606326ms)
✔ show refuses an invalid id before reading the config (48.391711ms)
ℹ tests 41
ℹ suites 0
ℹ pass 40
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 886.752441

✖ failing tests:

test at packages/runs/tests/state.test.mjs:32:1
✖ a pointer that isn't the version 1 shape refuses with exit 2 (78.389391ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception: /unsupported pointerVersion 2/
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/state.test.mjs:47: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'
  }
