MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / expectAllReadsRan

Function expectAllReadsRan

packages/core/sdk/src/executor.test.ts:993–1002  ·  view source on GitHub ↗
(
  recorder: ReturnType<typeof makeReadOrderRecorder>,
  budget: number | undefined,
  keys: readonly string[],
)

Source from the content-addressed store, hash-verified

991 * timeouts across provider code). What must hold at EVERY budget is that
992 * the call completes correctly and no read is lost or stranded. */
993const expectAllReadsRan = (
994 recorder: ReturnType<typeof makeReadOrderRecorder>,
995 budget: number | undefined,
996 keys: readonly string[],
997) => {
998 const ran = keys.every(
999 (key) => recorder.at(`start:${key}`) >= 0 && recorder.at(`end:${key}`) >= 0,
1000 );
1001 expect({ budget, ran, log: recorder.log() }).toMatchObject({ budget, ran: true });
1002};
1003
1004// Sweeping low budgets lands the run loop's cooperative yield at every
1005// position in the launch window (6 and 8 are where runtime probes reproduced

Callers 1

executor.test.tsFile · 0.85

Calls 1

logMethod · 0.80

Tested by

no test coverage detected