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

Function expectAllReadsRan

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

Source from the content-addressed store, hash-verified

1101 * timeouts across provider code). What must hold at EVERY budget is that
1102 * the call completes correctly and no read is lost or stranded. */
1103const expectAllReadsRan = (
1104 recorder: ReturnType<typeof makeReadOrderRecorder>,
1105 budget: number | undefined,
1106 keys: readonly string[],
1107) => {
1108 const ran = keys.every(
1109 (key) => recorder.at(`start:${key}`) >= 0 && recorder.at(`end:${key}`) >= 0,
1110 );
1111 expect({ budget, ran, log: recorder.log() }).toMatchObject({ budget, ran: true });
1112};
1113
1114// Sweeping low budgets lands the run loop's cooperative yield at every
1115// 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