| 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. */ |
| 993 | const 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 |