✔ isRunId accepts the run id shape and nothing else (1.590741ms)
✔ a missing data root or runs directory lists nothing (2.330311ms)
✔ runs as a regular file lists nothing, as before (0.907679ms)
✔ listRunIds keeps r- names only, sorted oldest first (1.181581ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (2.54764ms)
✔ readRunRecord returns documents and artifacts in directory order (1.169101ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (0.818664ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.787166ms)
✔ readRunDocument reads only the three run documents (0.619749ms)
✔ a link inside the data root is followed (1.130548ms)
✔ a data root that is itself a link is trusted as configured (0.756907ms)
✔ a run directory linked out of the data root is never read (1.079323ms)
✔ a document linked out of the data root reads as null (1.034215ms)
✔ a runs directory linked out of the data root refuses (0.684294ms)
✔ a relative link that climbs out of the data root refuses (0.532266ms)
✔ a sibling whose name starts with the data root's name is outside it (0.611387ms)
✔ a link loop refuses instead of reading as missing (0.723085ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.536617ms)
✔ an unreadable run directory refuses instead of reading as missing (0.640848ms)
✔ a link to the data root's parent is outside it (0.451118ms)
✔ listRunIds sorts whatever order the directory returns (0.968119ms)
✖ listRunRecords lists an r- name that isn't a valid run id, as before (0.6552ms)
✔ the readers write nothing (2.352082ms)
✔ no pointer is null (3.071243ms)
✔ the pointer release.sh writes reads back (2.029825ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (37.796406ms)
✔ a pointer that is a directory refuses with exit 4 (0.729401ms)
✔ a state file linked out of the data root refuses (1.672903ms)
✔ a state directory linked out of the data root refuses (0.622978ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.586589ms)
✔ a missing log is empty (0.450358ms)
✔ the log reads oldest first and counts malformed lines (1.135566ms)
✔ last must be a positive integer (0.515257ms)
✔ the state readers write nothing (0.965261ms)
✔ list prints each run in the established format (100.007368ms)
✔ show prints the run in the established format (76.759238ms)
✔ show of a missing run and an invalid id exit 4 as before (165.294787ms)
✔ list and show refuse a runs directory linked out of the data root (137.384111ms)
✔ show refuses a run linked out of the data root; list reports it unknown (152.698033ms)
✖ list shows an r- name that isn't a valid run id, as before (73.773092ms)
✔ show refuses an invalid id before reading the config (39.617828ms)
ℹ tests 41
ℹ suites 0
ℹ pass 39
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 809.245413

✖ failing tests:

test at packages/runs/tests/runs.test.mjs:220:1
✖ listRunRecords lists an r- name that isn't a valid run id, as before (0.6552ms)
  Error [RunsError]: invalid run id: "r-.bad" (expected r-<id>)
      at requireRunId (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:13:30)
      at readRunDocument (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:35:3)
      at file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:46:13
      at Array.map (<anonymous>)
      at listRunRecords (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:44:31)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/runs.test.mjs:225:20)
      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) {
    exitCode: 4
  }

test at packages/runs/tests/task-cli.test.mjs:96:1
✖ list shows an r- name that isn't a valid run id, as before (73.773092ms)
  AssertionError [ERR_ASSERTION]: mosaic-task: invalid run id: "r-.bad" (expected r-<id>)
  
  
  4 !== 0
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/task-cli.test.mjs:100: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: 4,
    expected: 0,
    operator: 'strictEqual',
    diff: 'simple'
  }
