Surfaced by a tech-debt-radar Vector-C sweep (2026-06-27).
The debt
ai/daemons/orchestrator/services/DreamService.mjs defines async synthesizeGoldenPath() twice:
- Line 1034 —
@deprecated passthrough that dynamically imports './services/GoldenPathSynthesizer.mjs'. But DreamService is already in ai/daemons/orchestrator/services/, so that path resolves to .../services/services/GoldenPathSynthesizer.mjs — a double-services/ that doesn't exist (confirmed: no such dir). So this method is BROKEN (would throw ERR_MODULE_NOT_FOUND if reached).
- Line 1140 — a second
@deprecated passthrough using the module-level GoldenPathSynthesizer import; "kept for backward compatibility and test stability."
In JS, the second method shadows the first — so line 1034 is unreachable dead code (and broken). The active method is 1140; the DreamService tests (DreamService.spec.mjs:2335/2357, DreamServiceGoldenPath.spec.mjs:82) call DreamService.synthesizeGoldenPath() → JS resolves to 1140. The real production callers use GoldenPathSynthesizer.synthesizeGoldenPath() directly (pipeline.mjs:560, MemoryService.mjs:2082).
The fix
Delete the dead duplicate at lines 1030–1038 (the JSDoc + the shadowed, broken-import synthesizeGoldenPath()). Keep 1140 (the active, test-covered one). Zero behavior change — 1034 is unreachable; tests + production callers are unaffected.
Acceptance Criteria
Bounded dead-code removal — no data, no governance, no gate.
🤖 Authored by Ada (@neo-opus-ada · Claude Opus 4.8, Claude Code) via tech-debt-radar Vector-C.
Surfaced by a tech-debt-radar Vector-C sweep (2026-06-27).
The debt
ai/daemons/orchestrator/services/DreamService.mjsdefinesasync synthesizeGoldenPath()twice:@deprecatedpassthrough that dynamically imports'./services/GoldenPathSynthesizer.mjs'. But DreamService is already inai/daemons/orchestrator/services/, so that path resolves to.../services/services/GoldenPathSynthesizer.mjs— a double-services/that doesn't exist (confirmed: no such dir). So this method is BROKEN (would throwERR_MODULE_NOT_FOUNDif reached).@deprecatedpassthrough using the module-levelGoldenPathSynthesizerimport; "kept for backward compatibility and test stability."In JS, the second method shadows the first — so line 1034 is unreachable dead code (and broken). The active method is 1140; the DreamService tests (
DreamService.spec.mjs:2335/2357,DreamServiceGoldenPath.spec.mjs:82) callDreamService.synthesizeGoldenPath()→ JS resolves to 1140. The real production callers useGoldenPathSynthesizer.synthesizeGoldenPath()directly (pipeline.mjs:560, MemoryService.mjs:2082).The fix
Delete the dead duplicate at lines 1030–1038 (the JSDoc + the shadowed, broken-import
synthesizeGoldenPath()). Keep 1140 (the active, test-covered one). Zero behavior change — 1034 is unreachable; tests + production callers are unaffected.Acceptance Criteria
synthesizeGoldenPath()at ~1034 (+ its JSDoc + broken./services/import) is removed; one definition remains.DreamService+DreamServiceGoldenPathspecs stay green (they exercise the surviving 1140).Bounded dead-code removal — no data, no governance, no gate.
🤖 Authored by Ada (@neo-opus-ada · Claude Opus 4.8, Claude Code) via tech-debt-radar Vector-C.