LearnNewsExamplesServices
Frontmatter
id14283
titleExtract the embedding-dimension helpers out of GoldenPathSynthesizer
stateClosed
labels
airefactoring
assigneesneo-opus-grace
createdAtJun 28, 2026, 2:07 AM
updatedAtJun 28, 2026, 12:35 PM
githubUrlhttps://github.com/neomjs/neo/issues/14283
authorneo-opus-grace
commentsCount0
parentIssue14281
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 28, 2026, 12:35 PM

Extract the embedding-dimension helpers out of GoldenPathSynthesizer

neo-opus-grace
neo-opus-grace commented on Jun 28, 2026, 2:07 AM

Refs #14281

The first (lowest-blast) extraction of the GoldenPathSynthesizer SRP-decomposition — the 3 clearly-misplaced embedding-dimension helpers.

Context

ai/services/graph/GoldenPathSynthesizer.mjs (the 1553-line static grab-bag, #14281) declares 3 top-level export functions that are embedding-dimension utilities, not Golden-Path synthesis: getEmbeddingVectorLength, getEmbeddingModelName, buildEmbeddingDimensionMismatchMessage. V-B-A'd: they have NO external by-name consumers (consumers import the default class); they are used only internally at GPS L1018-1028 (the frontier-embedding dimension-guard); and they have no direct test coverage.

The Fix

  • Move the 3 functions to a focused module ai/services/graph/embeddingDimension.mjs (pure, no I/O).
  • GPS imports them back (for the L1018-1028 internal dimension-guard) + re-exports them (API stability — they were public exports; behavior-preserving).
  • Add focused unit tests (currently untested).

Acceptance Criteria

  • The 3 helpers live in ai/services/graph/embeddingDimension.mjs; GPS imports + re-exports them (public API stable).
  • GPS's internal dimension-guard (the L1018-1028 frontier check) still works — behavior-preserving.
  • Focused unit tests for the 3 helpers: getEmbeddingVectorLength (valid/invalid payloads), getEmbeddingModelName (each provider + default), buildEmbeddingDimensionMismatchMessage (message shape) — green.
  • node --check clean + the related specs green.

Out of Scope

  • The other 8 GoldenPathSynthesizer responsibilities (the rest of #14281's leaves).
  • Any behavior change (this is a pure move + re-export).

Origin Session ID: 090a68e6-1a28-4b20-a5fd-842ebac3e729. Authored by Grace (@neo-opus-grace, Claude Opus 4.8, Claude Code).

tobiu referenced in commit c2eed12 - "refactor(ai): extract the embedding-dimension helpers out of GoldenPathSynthesizer (#14283) (#14285) on Jun 28, 2026, 12:35 PM
tobiu closed this issue on Jun 28, 2026, 12:35 PM
tobiu referenced in commit f66fb7e - "refactor(ai): SRP-decompose GoldenPathSynthesizer — extract the remaining 4 clusters into focused modules (#14281) (#14289) on Jun 28, 2026, 2:31 PM