✔ REQ-LIMIT-3 limitLeaves finds every limit object and skips the agent numbers (1.471904ms)
✔ REQ-LIMIT-3 limitLeaves takes token limits at schema depth only, whatever their names (0.238869ms)
✔ REQ-LIMIT-3 with no check switched on a launch is allowed, a turn never stops, and every limit is not enforced (48.889383ms)
✔ REQ-LIMIT-3 a fixture check that refuses refuses the launch and stops the turn, logged with the limit and the count (48.804518ms)
✔ REQ-LIMIT-3 a report that omits a limit shows it not enforced; a counted entry and a reason come through (47.424391ms)
✔ REQ-LIMIT-4 each check gets the business, a copy of the limits, the subject, the records and the time (58.732905ms)
✔ REQ-LIMIT-4 fail closed: a throw refuses, stops and fails the report, naming the check and the code (46.311117ms)
✔ REQ-LIMIT-4 fail closed: a malformed answer, a promise, a rejected promise, a non-boolean or a bad hit is malformed-answer (52.110899ms)
✔ REQ-LIMIT-4 fail closed: a check switched on but not loaded refuses, stops and fails every limit as not-loaded (50.032452ms)
✔ REQ-LIMIT-4 state(), never-loaded case: before any load the report shows not enforced, or not-loaded for a switched-on check (45.35538ms)
✔ REQ-LIMIT-4 state(), first-load-refused case: a check refused on its first load is not-loaded in mayLaunch, mustStop and report (45.361587ms)
✔ REQ-LIMIT-4 fail closed: an unreadable organization file refuses and stops with check null; the report throws (47.343794ms)
✔ REQ-LIMIT-4 fail closed: unreadable records refuse and stop with check null and fail the report (0.52398ms)
✔ REQ-LIMIT-3 the shipped token-limit, through the real loader, counts known records only since the limit was set (91.231334ms)
✔ REQ-LIMIT-3 a token limit for a provider named limit is counted and refuses, beside an agent limit of the same name (56.207075ms)
✔ REQ-LIMIT-3 core reaches limit checks only through the plug-in loader (1.2189ms)
✖ P5 missing, ambiguous or invalid model key lookup fails closed without leaking a lookup error (44.848352ms)
✔ P5 trusted lookup uses the retiring run key rather than the agent current key (43.672096ms)
✖ P5 actual model metadata lookup rejects missing/ambiguous owners and never cross-attributes a retiring run (0.426717ms)
ℹ tests 19
ℹ suites 0
ℹ pass 17
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 816.537108

✖ failing tests:

test at packages/bus/tests/limit-checks.test.mjs:328:1
✖ P5 missing, ambiguous or invalid model key lookup fails closed without leaking a lookup error (44.848352ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected
  
    {
  +   allow: true
  -   allow: false,
  -   check: null,
  -   code: 'proxy-key-refused'
    }
  
      at TestContext.<anonymous> (file:///home/jwoltje/.t3/worktrees/mosaic-stack/t3-79263d4f/packages/bus/tests/limit-checks.test.mjs:333:10)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: { allow: true },
    expected: { allow: false, check: null, code: 'proxy-key-refused' },
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at packages/bus/tests/limit-checks.test.mjs:346:1
✖ P5 actual model metadata lookup rejects missing/ambiguous owners and never cross-attributes a retiring run (0.426717ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception.
      at TestContext.<anonymous> (file:///home/jwoltje/.t3/worktrees/mosaic-stack/t3-79263d4f/packages/bus/tests/limit-checks.test.mjs:354:10)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: { code: 'proxy-key-refused' },
    operator: 'throws',
    diff: 'simple'
  }
