From fa7e8c885f82684cb6c10b677bcb6ec1a6b5221f Mon Sep 17 00:00:00 2001 From: philipp Date: Fri, 10 Apr 2026 15:37:40 +0200 Subject: [PATCH] Fix ops sentinel runtime guard import Proof: ops-sentinel runtime evaluation no longer throws ReferenceError while checking disabled executor containment; covered by a regression test and full npm test. Assumptions: Runtime containment remains intentionally disabled by shouldContainExecutorForAlerts returning false; this change only restores the symbol needed for evaluation to complete. Still fake: Alert surfaces remain suppressed per the current safety/alert simplification; venue-native terminal fill events and realized per-trade PnL are still unavailable. --- src/apps/ops-sentinel.mjs | 1 + test/ops-sentinel-static.test.mjs | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/ops-sentinel-static.test.mjs diff --git a/src/apps/ops-sentinel.mjs b/src/apps/ops-sentinel.mjs index 629d537..06be102 100644 --- a/src/apps/ops-sentinel.mjs +++ b/src/apps/ops-sentinel.mjs @@ -13,6 +13,7 @@ import { buildRuntimeAlert, createRuntimeHealthThresholds, evaluateRuntimeHealth, + shouldContainExecutorForAlerts, shouldRaiseIngestPublishStale, } from '../core/runtime-health.mjs'; import { diff --git a/test/ops-sentinel-static.test.mjs b/test/ops-sentinel-static.test.mjs new file mode 100644 index 0000000..4e40a0c --- /dev/null +++ b/test/ops-sentinel-static.test.mjs @@ -0,0 +1,13 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; + +const source = readFileSync(new URL('../src/apps/ops-sentinel.mjs', import.meta.url), 'utf8'); + +test('ops sentinel imports executor containment guard used by runtime evaluation', () => { + assert.match(source, /shouldContainExecutorForAlerts\(alerts\)/); + assert.match( + source, + /import\s*\{[\s\S]*shouldContainExecutorForAlerts[\s\S]*\}\s*from\s*'\.\.\/core\/runtime-health\.mjs';/, + ); +});