✔ isRunId accepts the run id shape and nothing else (1.335247ms)
✔ a missing data root or runs directory lists nothing (2.044238ms)
✔ runs as a regular file lists nothing, as before (0.825059ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.992615ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (2.448335ms)
✔ readRunRecord returns documents and artifacts in directory order (1.940595ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (0.88747ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.887944ms)
✔ readRunDocument reads only the three run documents (0.742112ms)
✔ a link inside the data root is followed (1.800967ms)
✔ a data root that is itself a link is trusted as configured (1.347045ms)
✔ a run directory linked out of the data root is never read (1.219752ms)
✔ a document linked out of the data root reads as null (1.142642ms)
✔ a runs directory linked out of the data root refuses (0.77569ms)
✔ a relative link that climbs out of the data root refuses (0.508687ms)
✔ a sibling whose name starts with the data root's name is outside it (0.818208ms)
✔ a link loop refuses instead of reading as missing (0.874875ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.617573ms)
✔ an unreadable run directory refuses instead of reading as missing (0.789617ms)
✔ a link to the data root's parent is outside it (0.744195ms)
✔ listRunIds sorts whatever order the directory returns (1.123154ms)
✔ the readers write nothing (3.640519ms)
✔ no pointer is null (2.825548ms)
✔ the pointer release.sh writes reads back (1.614689ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (3.000458ms)
✔ a pointer that is a directory refuses with exit 4 (0.784002ms)
✔ a state file linked out of the data root refuses (2.224001ms)
✔ a state directory linked out of the data root refuses (1.043958ms)
✔ a missing log is empty (0.707165ms)
✔ the log reads oldest first and counts malformed lines (1.568329ms)
✔ last must be a positive integer (0.801038ms)
✔ the state readers write nothing (1.64136ms)
✔ list prints each run in the established format (114.475779ms)
✔ show prints the run in the established format (92.906292ms)
✔ show of a missing run and an invalid id exit 4 as before (173.27576ms)
✖ list and show refuse a runs directory linked out of the data root (104.319544ms)
✖ show refuses a run linked out of the data root; list reports it unknown (123.359118ms)
ℹ tests 37
ℹ suites 0
ℹ pass 35
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 689.166126

✖ failing tests:

test at packages/runs/tests/task-cli.test.mjs:70:1
✖ list and show refuse a runs directory linked out of the data root (104.319544ms)
  AssertionError [ERR_ASSERTION]: list
  
  1 !== 4
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/task-cli.test.mjs:76: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: 1,
    expected: 4,
    operator: 'strictEqual',
    diff: 'simple'
  }

test at packages/runs/tests/task-cli.test.mjs:82:1
✖ show refuses a run linked out of the data root; list reports it unknown (123.359118ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  1 !== 4
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56a/mutwt/packages/runs/tests/task-cli.test.mjs:88: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: true,
    code: 'ERR_ASSERTION',
    actual: 1,
    expected: 4,
    operator: 'strictEqual',
    diff: 'simple'
  }
