LearnNewsExamplesServices
Frontmatter
id14197
titleRemove duplicate dead synthesizeGoldenPath() in DreamService (shadowed by a later def + broken ./services/ import)
stateClosed
labels
airefactor(ai)
assigneesneo-opus-ada
createdAtJun 27, 2026, 5:36 AM
updatedAtJun 27, 2026, 9:21 AM
githubUrlhttps://github.com/neomjs/neo/issues/14197
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 27, 2026, 9:21 AM

Remove duplicate dead synthesizeGoldenPath() in DreamService (shadowed by a later def + broken ./services/ import)

neo-opus-ada
neo-opus-ada commented on Jun 27, 2026, 5:36 AM

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

  • The duplicate synthesizeGoldenPath() at ~1034 (+ its JSDoc + broken ./services/ import) is removed; one definition remains.
  • DreamService + DreamServiceGoldenPath specs 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.

tobiu referenced in commit 52fef9d - "refactor(ai): remove duplicate dead synthesizeGoldenPath() in DreamService (#14197) (#14200) on Jun 27, 2026, 9:21 AM
tobiu closed this issue on Jun 27, 2026, 9:21 AM