MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / recordCredentialLaunch

Function recordCredentialLaunch

packages/core/sdk/src/executor.test.ts:1070–1091  ·  view source on GitHub ↗
(maxOps?: number)

Source from the content-addressed store, hash-verified

1068/** Same, for the post-approval half: credential resolution vs the
1069 * integration-row read. */
1070const 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

Callers 1

executor.test.tsFile · 0.85

Calls 9

createExecutorFunction · 0.90
makeReadOrderRecorderFunction · 0.85
countingProviderFunction · 0.85
makeTestConfigFunction · 0.85
invokeConcurrencyPluginFunction · 0.85
withRecordedReadsFunction · 0.85
seedRunConnectionFunction · 0.85
addrFunction · 0.70
executeMethod · 0.65

Tested by

no test coverage detected