(maxOps?: number)
| 937 | * budget so the run loop's cooperative yield lands at an adversarial |
| 938 | * position instead of the default one. */ |
| 939 | const recordToolRowLaunch = (maxOps?: number) => |
| 940 | Effect.gen(function* () { |
| 941 | const recorder = makeReadOrderRecorder(); |
| 942 | const config = makeTestConfig({ plugins: [demoPlugin] as const }); |
| 943 | const executor = yield* createExecutor({ |
| 944 | ...config, |
| 945 | db: withRecordedReads(config.db, recorder.record), |
| 946 | }); |
| 947 | yield* seedRunConnection(executor); |
| 948 | |
| 949 | recorder.arm(["tool.findFirst", "tool_policy.findMany", "connection.findFirst"]); |
| 950 | const execute = executor.execute(addr("run"), {}); |
| 951 | const out = yield* maxOps === undefined |
| 952 | ? execute |
| 953 | : execute.pipe(Effect.provideService(Scheduler.MaxOpsBeforeYield, maxOps)); |
| 954 | expect(out).toEqual({ ran: "run" }); |
| 955 | return recorder; |
| 956 | }); |
| 957 | |
| 958 | /** Same, for the post-approval half: credential resolution vs the |
| 959 | * integration-row read. */ |
no test coverage detected