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

Function recordToolRowLaunch

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

Source from the content-addressed store, hash-verified

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

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