INNER CODE UNIT · JavaScript

__setRunnerFactoryForTest

entropy-cloud/nop-entropy · tools/mission-driver/src/main.js:30

export function __setRunnerFactoryForTest(fn) {
  const prev = __runnerFactory;
  __runnerFactory = fn || createRunner;
  return prev;
}

// O7 (plan 2026-07-22-1223-2) — engine terminal status → process exit code.
// MUST stay row-by-row in sync with `EXECUTION-PRINCIPLE.md §11` (the
// controlling exit-code contract table); the audit O7 itself was a
// doc-vs-code drift where flow-definition errors were documented as exit 1
// but silently exited 0 here because they were missing from the map.
// Exported so test/exit-map.test.js can pin the contract without spawning
// a full cmdRunMission process. `skipped` and dynamic `done` values emitted
// by `_result(...)` in engine.js are intentionally NOT mapped (they fall
// through to Node's default exit 0); see EXECUTION-PRINCIPLE.md §11 + the
// plan's `Deferred But Adjudicated` section.
export const EXIT_MAP = {
  completed: 0, single_step_done: 0,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…