Repository navigation
fix(orchestrator): delete SystemOrchestrator stub + retarget test runner (#1196) - #1240
Merged
Merged
Conversation
added 2 commits
May 14, 2026 15:15
…ner (#1196) `src/system/core/SystemOrchestrator.ts` was a 272-line scaffold where every method threw 'Not implemented'. The factory `SystemOrchestration` exposed friendly entry points (`forDevelopment`, `forTesting`, `forValidation`, `forCLI`) that all routed through the throwing methods, so any caller hit a runtime error the moment it tried to plan actions. The real orchestrator lives at `src/system/orchestration/SystemOrchestrator.ts` (1486 LOC) and exports the `systemOrchestrator` singleton. Its `orchestrate(entryPoint, options)` method already understands `'npm-test'` as one of the `EntryPointType` values, requiring SERVER_READY + BROWSER_READY milestones — exactly what the test runner needs. Single caller of the stub was `scripts/test-with-server.ts:257` (wired in by continuum#1120). Retargeted to `systemOrchestrator.orchestrate('npm-test')`. Error path now surfaces the orchestrator's `result.error` field instead of a vague generic 'System startup failed' message. `npm run build:ts` clean. Half-finished implementation rule (CLAUDE.md): deleted rather than preserved as a "we'll fill it in later" stub.
The deleted SystemOrchestrator stub had 1 ESLint baseline error. Locking the win in this PR per pre-push ratchet contract.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1196.
Smell
src/system/core/SystemOrchestrator.tswas a 272-line scaffold where every method threw'Not implemented'. TheSystemOrchestrationfactory (forDevelopment,forTesting,forValidation,forCLI) wrapped these throwing methods, so callers got a friendly entry point that exploded at runtime the moment it tried to plan actions.Found while fixing #1120:
scripts/test-with-server.tswas callingSystemOrchestration.forTesting()and would have crashed cold the first time the system needed a fresh start.Fix
The real orchestrator already exists at
src/system/orchestration/SystemOrchestrator.ts(1486 LOC, exportssystemOrchestratorsingleton). Itsorchestrate(entryPoint, options)method understands'npm-test'as one of theEntryPointTypevalues declared inSystemMilestones.ts:125— requiring SERVER_READY + BROWSER_READY milestones, exactly what the test runner needs.This PR:
src/system/core/SystemOrchestrator.ts(the 272-line stub)scripts/test-with-server.ts:257) tosystemOrchestrator.orchestrate('npm-test')result.errorfrom the orchestrator instead of the previous vague `'System startup failed for npm-test mode'` messageVerification
npm run build:ts— clean compilegrep -rn "SystemOrchestration\|system/core/SystemOrchestrator"returns only the in-line comment explaining the migrationWhy this is the right call
The card raised two options:
Option 2 is correct because the real implementation already exists — the stub at
system/core/was dead-on-arrival, and adding a second working orchestrator would have violated the "one logical decision, one place" compression principle from CLAUDE.md.CLAUDE.md alignment
The stub was a textbook half-finished implementation. Deleted.