LearnNewsExamplesServices
Frontmatter
id13962
titleRewrite stale Sandman handoff when Golden Path has no candidates
stateClosed
labels
bugairegressionarchitecturemodel-experience
assigneesneo-gpt
createdAtJun 24, 2026, 7:59 PM
updatedAtJun 24, 2026, 8:18 PM
githubUrlhttps://github.com/neomjs/neo/issues/13962
authorneo-gpt
commentsCount0
parentIssue13755
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 24, 2026, 8:18 PM

Rewrite stale Sandman handoff when Golden Path has no candidates

Closed v13.1.0/archive-v13-1-0-chunk-6 bugairegressionarchitecturemodel-experience
neo-gpt
neo-gpt commented on Jun 24, 2026, 7:59 PM

Context

The Sandman handoff still contains stale single-author PR subsections even after PR #13957 removed that rendering path. Live verification on 2026-06-24 showed resources/content/sandman_handoff.md and the root checkout copy still rendering old ### @neo-* sections with captured timestamps from 2026-06-22, while the orchestrator state reports golden-path.lastSuccessAt on 2026-06-24.

Release classification: post-release hardening for the Dream Pipeline / Golden Path handoff surface; not attached to the v13 board.

Live latest-open sweep: checked latest 20 open issues on 2026-06-24; no equivalent open ticket found. A2A in-flight claim sweep: checked latest 30 messages on 2026-06-24; no overlapping lane-claim or lane-intent found.

The Problem

GoldenPathSynthesizer.synthesizeGoldenPath() can report a successful task boundary without rewriting the handoff when the semantic query produces no candidates. That preserves whatever stale generated markdown was already on disk. In the observed state, the stale disk content still includes PR-by-author sections removed by #13957, so the current renderer never got a chance to overwrite them.

The Architectural Reality

The Sandman handoff is generated centrally by ai/services/graph/GoldenPathSynthesizer.mjs, and the output contract is idempotent overwrite, not append or partial patch. renderRecentOpenPrSummary() now renders a compact capped list, but synthesizeGoldenPath() currently returns early when semanticIds.length === 0, before the later fs.writeFileSync() call that would refresh the file.

The orchestrator state can therefore say Golden Path succeeded while resources/content/sandman_handoff.md still contains older generated content.

The Fix

Keep the Golden Path pipeline on the centralized overwrite path even when semantic routing yields zero candidates. The zero-candidate path should render the deterministic empty Golden Path section, rebuild the current Active PR Cycle State with the compact renderer, and write sandman_handoff.md in the same pass.

Add a regression test that seeds stale author-section markdown, forces zero semantic candidates, runs synthesizeGoldenPath(), and asserts the stale ### @neo-* sections are removed while the compact Recent Open PRs (x of y items) section is present.

Acceptance Criteria

  • A zero-semantic-candidate Golden Path run rewrites sandman_handoff.md instead of returning before the file write.
  • A successful synthesis pass cannot leave stale per-author PR sections such as ### @neo-gpt, ### @neo-opus-grace, or ### @neo-opus-vega in the handoff.
  • The compact Recent Open PRs section remains capped and shows (x of y items).
  • Unit coverage proves stale handoff content is overwritten on the zero-candidate path.

Out of Scope

  • Changing Golden Path ranking weights or graph semantics.
  • Changing the PR summary renderer introduced by #13957 except as needed to prove stale content is overwritten.
  • Changing orchestrator scheduling or heavy-lease fairness.

Related

Handoff Retrieval Hints

Search terms: GoldenPathSynthesizer semanticIds.length === 0 sandman_handoff stale author sections, renderRecentOpenPrSummary, golden-path.lastSuccessAt stale handoff.

tobiu referenced in commit f57e071 - "fix(ai): overwrite stale sandman handoff on empty golden path (#13962) (#13963)" on Jun 24, 2026, 8:18 PM
tobiu closed this issue on Jun 24, 2026, 8:18 PM