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