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

Function recordToolRowLaunch

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

Source from the content-addressed store, hash-verified

1047 * budget so the run loop's cooperative yield lands at an adversarial
1048 * position instead of the default one. */
1049const 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. */

Callers 1

executor.test.tsFile · 0.85

Calls 7

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

Tested by

no test coverage detected