✔ isRunId accepts the run id shape and nothing else (2.349624ms)
✔ a missing data root or runs directory lists nothing (3.06341ms)
✔ runs as a regular file lists nothing, as before (1.261241ms)
✔ listRunIds keeps r- names only, sorted oldest first (1.52865ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (4.80885ms)
✔ readRunRecord returns documents and artifacts in directory order (1.949916ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (3.289521ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (1.223411ms)
✔ readRunDocument reads only the three run documents (0.817925ms)
✔ a link inside the data root is followed (1.649226ms)
✔ a data root that is itself a link is trusted as configured (1.268864ms)
✔ a run directory linked out of the data root is never read (1.271219ms)
✔ a document linked out of the data root reads as null (4.558659ms)
✔ a runs directory linked out of the data root refuses (1.24361ms)
✔ a relative link that climbs out of the data root refuses (0.769591ms)
✔ a sibling whose name starts with the data root's name is outside it (0.855321ms)
✔ a link loop refuses instead of reading as missing (1.125869ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.92955ms)
✔ an unreadable run directory refuses instead of reading as missing (1.103476ms)
✔ a link to the data root's parent is outside it (0.933244ms)
✔ listRunIds sorts whatever order the directory returns (1.548586ms)
✖ listRunRecords lists an r- name that isn't a valid run id, as before (3.063895ms)
✔ the readers write nothing (5.728488ms)
✔ no pointer is null (2.85157ms)
✔ the pointer release.sh writes reads back (2.167674ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (28.992167ms)
✔ a pointer that is a directory refuses with exit 4 (1.210931ms)
✔ a state file linked out of the data root refuses (2.779979ms)
✔ a state directory linked out of the data root refuses (1.069934ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.943535ms)
✔ a missing log is empty (0.677356ms)
✔ the log reads oldest first and counts malformed lines (2.389984ms)
✔ last must be a positive integer (4.101041ms)
✔ the state readers write nothing (1.756571ms)
✔ list prints each run in the established format (213.459424ms)
✔ show prints the run in the established format (146.704832ms)
✔ show of a missing run and an invalid id exit 4 as before (380.104067ms)
✔ list and show refuse a runs directory linked out of the data root (310.571356ms)
✔ show refuses a run linked out of the data root; list reports it unknown (175.66159ms)
✖ list shows an r- name that isn't a valid run id, as before (72.884478ms)
✔ show refuses an invalid id before reading the config (55.520564ms)
ℹ tests 41
ℹ suites 0
ℹ pass 39
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1453.463752

✖ 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 (3.063895ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected
  
  + []
  - [
  -   'r-.bad'
  - ]
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/runs.test.mjs:224: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: [],
    expected: [ 'r-.bad' ],
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

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 (72.884478ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  + actual - expected
  
  + ''
  - 'r-.bad  succeeded  task=t-one              ws=-          session=-\n'
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/task-cli.test.mjs:101: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: '',
    expected: 'r-.bad  succeeded  task=t-one              ws=-          session=-\n',
    operator: 'strictEqual',
    diff: 'simple'
  }
