(maxOps?: number)
| 958 | /** Same, for the post-approval half: credential resolution vs the |
| 959 | * integration-row read. */ |
| 960 | const recordCredentialLaunch = (maxOps?: number) => |
| 961 | Effect.gen(function* () { |
| 962 | const recorder = makeReadOrderRecorder(); |
| 963 | const calls = { count: 0 }; |
| 964 | const provider = countingProvider(calls, (run) => recorder.record("credential.get", run)); |
| 965 | const config = makeTestConfig({ |
| 966 | plugins: [invokeConcurrencyPlugin(provider)] as const, |
| 967 | }); |
| 968 | const executor = yield* createExecutor({ |
| 969 | ...config, |
| 970 | db: withRecordedReads(config.db, recorder.record), |
| 971 | }); |
| 972 | yield* seedRunConnection(executor); |
| 973 | |
| 974 | recorder.arm(["credential.get", "integration.findFirst"]); |
| 975 | const execute = executor.execute(addr("run"), {}); |
| 976 | const out = yield* maxOps === undefined |
| 977 | ? execute |
| 978 | : execute.pipe(Effect.provideService(Scheduler.MaxOpsBeforeYield, maxOps)); |
| 979 | expect(out).toEqual({ ran: "run" }); |
| 980 | return recorder; |
| 981 | }); |
| 982 | |
| 983 | /** Assert every armed read genuinely ran to completion — `start:` and |
| 984 | * `end:` present for each key — carrying the budget and full event log into |
no test coverage detected