(maxOps?: number)
| 1047 | * budget so the run loop's cooperative yield lands at an adversarial |
| 1048 | * position instead of the default one. */ |
| 1049 | const recordToolRowLaunch = (maxOps?: number) => |
| 1050 | Effect.gen(function* () { |
| 1051 | const recorder = makeReadOrderRecorder(); |
| 1052 | const config = makeTestConfig({ plugins: [demoPlugin] as const }); |
| 1053 | const executor = yield* createExecutor({ |
| 1054 | ...config, |
| 1055 | db: withRecordedReads(config.db, recorder.record), |
| 1056 | }); |
| 1057 | yield* seedRunConnection(executor); |
| 1058 | |
| 1059 | recorder.arm(["tool.findFirst", "tool_policy.findMany", "connection.findFirst"]); |
| 1060 | const execute = executor.execute(addr("run"), {}); |
| 1061 | const out = yield* maxOps === undefined |
| 1062 | ? execute |
| 1063 | : execute.pipe(Effect.provideService(Scheduler.MaxOpsBeforeYield, maxOps)); |
| 1064 | expect(out).toEqual({ ran: "run" }); |
| 1065 | return recorder; |
| 1066 | }); |
| 1067 | |
| 1068 | /** Same, for the post-approval half: credential resolution vs the |
| 1069 | * integration-row read. */ |
no test coverage detected