✔ isRunId accepts the run id shape and nothing else (1.187366ms)
✔ a missing data root or runs directory lists nothing (2.073148ms)
✔ runs as a regular file lists nothing, as before (0.667967ms)
✔ listRunIds keeps r- names only, sorted oldest first (1.065405ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (2.710197ms)
✔ readRunRecord returns documents and artifacts in directory order (1.212073ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (0.794819ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.87404ms)
✔ readRunDocument reads only the three run documents (0.73155ms)
✔ a link inside the data root is followed (1.101065ms)
✔ a data root that is itself a link is trusted as configured (0.92173ms)
✔ a run directory linked out of the data root is never read (1.182722ms)
✔ a document linked out of the data root reads as null (1.519156ms)
✔ a runs directory linked out of the data root refuses (0.971294ms)
✔ a relative link that climbs out of the data root refuses (0.602539ms)
✔ a sibling whose name starts with the data root's name is outside it (0.602411ms)
✔ a link loop refuses instead of reading as missing (0.836417ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.588817ms)
✔ an unreadable run directory refuses instead of reading as missing (0.764263ms)
✔ a link to the data root's parent is outside it (0.478523ms)
✔ listRunIds sorts whatever order the directory returns (1.303967ms)
✔ listRunRecords lists an r- name that isn't a valid run id, as before (1.087459ms)
✔ the readers write nothing (3.286472ms)
✔ no pointer is null (2.356044ms)
✔ the pointer release.sh writes reads back (1.496897ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (2.651413ms)
✔ a pointer that is a directory refuses with exit 4 (1.669957ms)
✔ a state file linked out of the data root refuses (2.02127ms)
✔ a state directory linked out of the data root refuses (1.056491ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.702711ms)
✔ a missing log is empty (1.296972ms)
✔ the log reads oldest first and counts malformed lines (1.656559ms)
✔ last must be a positive integer (0.721034ms)
✔ the state readers write nothing (1.365288ms)
✔ list prints each run in the established format (100.715833ms)
✔ show prints the run in the established format (108.835407ms)
✔ show of a missing run and an invalid id exit 4 as before (180.126942ms)
✔ list and show refuse a runs directory linked out of the data root (192.410504ms)
✔ show refuses a run linked out of the data root; list reports it unknown (163.544111ms)
✔ list shows an r- name that isn't a valid run id, as before (74.327067ms)
✖ show refuses an invalid id before reading the config (172.108882ms)
ℹ tests 41
ℹ suites 0
ℹ pass 40
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1064.413393

✖ failing tests:

test at packages/runs/tests/task-cli.test.mjs:104:1
✖ show refuses an invalid id before reading the config (172.108882ms)
  AssertionError [ERR_ASSERTION]: mosaic-task: configuration problem (exit 3); run scripts/bootstrap.sh or fix config.json
  
  
  3 !== 4
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/task-cli.test.mjs:109: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: 3,
    expected: 4,
    operator: 'strictEqual',
    diff: 'simple'
  }
