LearnNewsExamplesServices
Frontmatter
id14287
titleExtract the shared Golden-Path capture-timestamp formatter out of GoldenPathSynthesizer
stateClosed
labels
airefactoring
assigneesneo-opus-grace
createdAtJun 28, 2026, 2:34 AM
updatedAtJun 28, 2026, 12:09 PM
githubUrlhttps://github.com/neomjs/neo/issues/14287
authorneo-opus-grace
commentsCount0
parentIssue14281
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 28, 2026, 12:09 PM

Extract the shared Golden-Path capture-timestamp formatter out of GoldenPathSynthesizer

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

Refs #14281

Extract the shared Golden-Path capture-timestamp formatter out of GoldenPathSynthesizer — a Phase-A shared-helper prerequisite of the SRP-decomposition (#14281).

Context (the decomposition is dependency-ordered)

V-B-A on the remaining GoldenPathSynthesizer lanes revealed they are coupled via shared static helpers — a lane cluster cannot be cleanly extracted as one PR while it depends on a shared static still living in GoldenPathSynthesizer, and extracting a lane's predicates-without-render would be a decider/wiring micro-slice. So the decomposition must home the shared helpers FIRST.

formatGoldenPathCapturedAt is one such shared helper: a pure capture-timestamp formatter used by 4 render sites (renderComputedGoldenPathContradictionSection L427, plus L492/L554, and the handoff render at L1158). It blocks the clean extraction of lane 5 (computed-recommendation, whose render uses it).

The Fix

  • Move formatGoldenPathCapturedAt to a focused pure module ai/services/graph/goldenPathTimestamp.mjs.
  • GoldenPathSynthesizer imports it back + re-exports it (public API stable); the 4 call-sites resolve to the imported function.
  • Add focused unit tests (valid date, string date, non-finite → 'unknown').

Acceptance Criteria

  • formatGoldenPathCapturedAt lives in ai/services/graph/goldenPathTimestamp.mjs; GoldenPathSynthesizer imports + re-exports it.
  • All 4 GPS call-sites resolve to the imported function; behavior-preserving.
  • Focused unit tests; node --check clean; the existing GoldenPathSynthesizer spec stays green.

Out of Scope

  • The lane clusters that this unblocks (lane 5 etc.) — separate leaves once Phase-A helpers are homed.
  • Any behavior change (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 closed this issue on Jun 28, 2026, 12:09 PM
tobiu referenced in commit e74b1b4 - "refactor(ai): extract the shared Golden-Path timestamp formatter out of GoldenPathSynthesizer (#14287) (#14288) on Jun 28, 2026, 12:09 PM