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

✖ 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 (45.896754ms)
  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.282933ms)
  TypeError: modelUsageKey is not a function
      at TestContext.<anonymous> (file:///home/jwoltje/.t3/worktrees/mosaic-stack/t3-79263d4f/packages/bus/tests/limit-checks.test.mjs:351:15)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
