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

Function recordSettledOutcome

packages/core/execution/src/engine.ts:470–483  ·  view source on GitHub ↗
(executionId: string, exit: Exit.Exit<ExecutionResult, E>)

Source from the content-addressed store, hash-verified

468 // typed channel — hosts render engine failures opaquely, and a replay must
469 // not bypass that by flattening the cause into result text.
470 const recordSettledOutcome = (executionId: string, exit: Exit.Exit<ExecutionResult, E>): void => {
471 settledExecutionIds.add(executionId);
472 while (settledExecutionIds.size > SETTLED_EXECUTION_ID_LIMIT) {
473 const oldest = settledExecutionIds.keys().next().value;
474 if (oldest === undefined) break;
475 settledExecutionIds.delete(oldest);
476 }
477 settledOutcomes.set(executionId, exit);
478 while (settledOutcomes.size > SETTLED_OUTCOME_LIMIT) {
479 const oldest = settledOutcomes.keys().next().value;
480 if (oldest === undefined) break;
481 settledOutcomes.delete(oldest);
482 }
483 };
484
485 /**
486 * Race a running fiber against the pause queue. Returns when either

Callers 1

createExecutionEngineFunction · 0.85

Calls 2

setMethod · 0.80
deleteMethod · 0.65

Tested by

no test coverage detected