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

Function recordSettledOutcome

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

Source from the content-addressed store, hash-verified

487 // typed channel — hosts render engine failures opaquely, and a replay must
488 // not bypass that by flattening the cause into result text.
489 const recordSettledOutcome = (executionId: string, exit: Exit.Exit<ExecutionResult, E>): void => {
490 settledExecutionIds.add(executionId);
491 while (settledExecutionIds.size > SETTLED_EXECUTION_ID_LIMIT) {
492 const oldest = settledExecutionIds.keys().next().value;
493 if (oldest === undefined) break;
494 settledExecutionIds.delete(oldest);
495 }
496 settledOutcomes.set(executionId, exit);
497 while (settledOutcomes.size > SETTLED_OUTCOME_LIMIT) {
498 const oldest = settledOutcomes.keys().next().value;
499 if (oldest === undefined) break;
500 settledOutcomes.delete(oldest);
501 }
502 };
503
504 /**
505 * 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