From cd7e89233a60ad857d703f02671e726e8dce942f Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 14 May 2026 12:00:52 -0500 Subject: [PATCH] fix(test): replace missing system-startup import with SystemOrchestration (#1120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Symptom from #1120 (claude-tab-2 reported, validating PR #1085): npm test -- --runTestsByPath src/tests/unit/seed-install-tier.test.ts fails before any test runs because src/scripts/test-with-server.ts imports a non-existent './system-startup' module. The canonical entry for npm-test mode lives at src/system/core/SystemOrchestrator.ts as SystemOrchestration.forTesting() — same factory used by the rest of the testing path. Update the import + replace startSystem('npm-test') with the canonical call. Loud-throw on failure so test runs surface startup errors rather than silently mis-behaving. Validation: npm run build:ts passes clean. Hooks ran without --no-verify. Card: continuum#1120. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/scripts/test-with-server.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/scripts/test-with-server.ts b/src/scripts/test-with-server.ts index 910e7cd98..59c01d209 100644 --- a/src/scripts/test-with-server.ts +++ b/src/scripts/test-with-server.ts @@ -1,5 +1,5 @@ import { spawn } from 'child_process'; -import { startSystem } from './system-startup'; +import { SystemOrchestration } from '../system/core/SystemOrchestrator'; interface OutputFilter { shouldShowLine(line: string): boolean; @@ -249,8 +249,15 @@ async function main(): Promise { console.log('✅ System already running and healthy - reusing existing system'); } else { console.log('🚀 No healthy system detected - starting fresh system'); - // Start the system using shared startup logic for testing - await startSystem('npm-test'); + // Start the system via SystemOrchestration's testing preset. + // (Earlier code imported a non-existent './system-startup' module — + // see continuum#1120 for context. The canonical entry for npm-test + // is SystemOrchestration.forTesting() in + // src/system/core/SystemOrchestrator.ts.) + const result = await SystemOrchestration.forTesting(); + if (!result.success) { + throw new Error('System startup failed for npm-test mode'); + } } // Run tests with verbose flag