(maxOps?: number)
| 1068 | /** Same, for the post-approval half: credential resolution vs the |
| 1069 | * integration-row read. */ |
| 1070 | const recordCredentialLaunch = (maxOps?: number) => |
| 1071 | Effect.gen(function* () { |
| 1072 | const recorder = makeReadOrderRecorder(); |
| 1073 | const calls = { count: 0 }; |
| 1074 | const provider = countingProvider(calls, (run) => recorder.record("credential.get", run)); |
| 1075 | const config = makeTestConfig({ |
| 1076 | plugins: [invokeConcurrencyPlugin(provider)] as const, |
| 1077 | }); |
| 1078 | const executor = yield* createExecutor({ |
| 1079 | ...config, |
| 1080 | db: withRecordedReads(config.db, recorder.record), |
| 1081 | }); |
| 1082 | yield* seedRunConnection(executor); |
| 1083 | |
| 1084 | recorder.arm(["credential.get", "integration.findFirst"]); |
| 1085 | const execute = executor.execute(addr("run"), {}); |
| 1086 | const out = yield* maxOps === undefined |
| 1087 | ? execute |
| 1088 | : execute.pipe(Effect.provideService(Scheduler.MaxOpsBeforeYield, maxOps)); |
| 1089 | expect(out).toEqual({ ran: "run" }); |
| 1090 | return recorder; |
| 1091 | }); |
| 1092 | |
| 1093 | /** Assert every armed read genuinely ran to completion — `start:` and |
| 1094 | * `end:` present for each key — carrying the budget and full event log into |
no test coverage detected