✔ isRunId accepts the run id shape and nothing else (1.065207ms)
✔ a missing data root or runs directory lists nothing (1.698841ms)
✔ runs as a regular file lists nothing, as before (0.630984ms)
✔ listRunIds keeps r- names only, sorted oldest first (1.49914ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (2.076647ms)
✔ readRunRecord returns documents and artifacts in directory order (1.038104ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (0.613748ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.680147ms)
✔ readRunDocument reads only the three run documents (0.554692ms)
✔ a link inside the data root is followed (0.956197ms)
✔ a data root that is itself a link is trusted as configured (0.633126ms)
✔ a run directory linked out of the data root is never read (0.687083ms)
✔ a document linked out of the data root reads as null (0.817475ms)
✖ a runs directory linked out of the data root refuses (1.147289ms)
✔ a relative link that climbs out of the data root refuses (0.420625ms)
✔ a sibling whose name starts with the data root's name is outside it (0.432331ms)
✔ a link loop refuses instead of reading as missing (0.580696ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.420343ms)
✔ an unreadable run directory refuses instead of reading as missing (0.505363ms)
✔ a link to the data root's parent is outside it (0.365301ms)
✔ listRunIds sorts whatever order the directory returns (0.728115ms)
✔ listRunRecords lists an r- name that isn't a valid run id, as before (0.572555ms)
✔ the readers write nothing (2.015551ms)
✔ no pointer is null (2.257117ms)
✔ the pointer release.sh writes reads back (1.314201ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (132.331487ms)
✔ a pointer that is a directory refuses with exit 4 (1.218663ms)
✔ a state file linked out of the data root refuses (0.870713ms)
✔ a state directory linked out of the data root refuses (0.504281ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.501277ms)
✔ a missing log is empty (0.321384ms)
✔ the log reads oldest first and counts malformed lines (0.866945ms)
✔ last must be a positive integer (0.46119ms)
✔ the state readers write nothing (0.714278ms)
✔ list prints each run in the established format (77.057222ms)
✔ show prints the run in the established format (65.031466ms)
✔ show of a missing run and an invalid id exit 4 as before (124.475617ms)
✖ list and show refuse a runs directory linked out of the data root (170.366112ms)
✔ show refuses a run linked out of the data root; list reports it unknown (163.564218ms)
✔ list shows an r- name that isn't a valid run id, as before (76.840622ms)
✔ show refuses an invalid id before reading the config (49.249577ms)
ℹ tests 41
ℹ suites 0
ℹ pass 39
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 801.494548

✖ failing tests:

test at packages/runs/tests/runs.test.mjs:143:1
✖ a runs directory linked out of the data root refuses (1.147289ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /runs resolves outside the data root/. Input:
  
  'RunsError: /home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-ZzTrSZ/data/runs/r-20260101T000000Z-aaaaaa resolves outside the data root (/home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-ZzTrSZ/data)'
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/runs.test.mjs:149: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: RunsError: /home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-ZzTrSZ/data/runs/r-20260101T000000Z-aaaaaa resolves outside the data root (/home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-ZzTrSZ/data)
        at resolveInside (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/paths.mjs:33:11)
        at readRunRecord (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/src/runs.mjs:55:15)
        at file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/runs.test.mjs:149:23
        at getActual (node:assert:580:5)
        at strict.throws (node:assert:728:24)
        at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/runs.test.mjs:149: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),
    expected: /runs resolves outside the data root/,
    operator: 'throws',
    diff: 'simple'
  }

test at packages/runs/tests/task-cli.test.mjs:70:1
✖ list and show refuse a runs directory linked out of the data root (170.366112ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /^mosaic-task: .*runs resolves outside the data root/. Input:
  
  'mosaic-task: /home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-p4YqkE/data/runs/r-20260101T000000Z-aaaaaa resolves outside the data root (/home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-p4YqkE/data)\n'
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r56b/mutwt/packages/runs/tests/task-cli.test.mjs:78: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: true,
    code: 'ERR_ASSERTION',
    actual: 'mosaic-task: /home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-p4YqkE/data/runs/r-20260101T000000Z-aaaaaa resolves outside the data root (/home/jwoltje/darkwing-scratch/r56b/tmp/mosaic-runs-test-p4YqkE/data)\n',
    expected: /^mosaic-task: .*runs resolves outside the data root/,
    operator: 'match',
    diff: 'simple'
  }
