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';/, ); }); test('ops sentinel polls official NEAR status and publishes environment status without alerting', () => { assert.match(source, /pollNearIntentsEnvironmentStatus/); assert.match(source, /kafkaTopicOpsEnvironmentStatus/); assert.match(source, /buildNearIntentsStatusEventPayload/); assert.match(source, /normalized\.status_fingerprint === state\.last_environment_status_fingerprint/); assert.match(source, /assertEnvironmentStatusEvent/); });