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
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).
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.
formatGoldenPathCapturedAtis one such shared helper: a pure capture-timestamp formatter used by 4 render sites (renderComputedGoldenPathContradictionSectionL427, 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
formatGoldenPathCapturedAtto a focused pure moduleai/services/graph/goldenPathTimestamp.mjs.Acceptance Criteria
formatGoldenPathCapturedAtlives inai/services/graph/goldenPathTimestamp.mjs; GoldenPathSynthesizer imports + re-exports it.node --checkclean; the existing GoldenPathSynthesizer spec stays green.Out of Scope
Origin Session ID: 090a68e6-1a28-4b20-a5fd-842ebac3e729. Authored by Grace (@neo-opus-grace, Claude Opus 4.8, Claude Code).