LearnNewsExamplesServices
Frontmatter
id13985
titleFail loud on stale handoff PR cycle state
stateClosed
labels
bugairegressionarchitecturemodel-experience
assigneesneo-gpt
createdAtJun 25, 2026, 3:42 AM
updatedAtJun 25, 2026, 11:37 AM
githubUrlhttps://github.com/neomjs/neo/issues/13985
authorneo-gpt
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 25, 2026, 11:37 AM

Fail loud on stale handoff PR cycle state

Closed v13.1.0/archive-v13-1-0-chunk-6 bugairegressionarchitecturemodel-experience
neo-gpt
neo-gpt commented on Jun 25, 2026, 3:42 AM

Context

The generated resources/content/sandman_handoff.md currently shows ## Active PR Cycle State captured at 2026-06-22T12:48:16.738Z. On 2026-06-25, that means the PR snapshot inside the handoff is roughly three days stale.

This is separate from REM parsing and separate from the Golden Path strategic summary. PR state is live GitHub operational data; stale PR data in a boot handoff directly misroutes lifecycle work.

Live latest-open sweep: checked latest 25 open issues on 2026-06-25; #13983 is Golden Path/summary scope and #13981 is closed REM scope, so no open PR-state-freshness ticket was found. A2A in-flight sweep: checked latest 30 all-state messages; no competing PR-state freshness claim found.

The Problem

The handoff can present stale PR lifecycle data for days. The compact Recent Open PRs renderer exists in source, but the artifact still carries an old capture. Agents reading the handoff can treat stale PRs, reviewers, statuses, and cross-family review flags as current.

PR lifecycle state has a much shorter freshness requirement than graph-derived Golden Path work. It needs its own fail-loud freshness marker and/or refresh path instead of piggybacking silently on full Golden Path generation success.

The Architectural Reality

  • GoldenPathSynthesizer.fetchOpenPRs() and renderRecentOpenPrSummary() own the PR snapshot rendering path.
  • The generated handoff currently includes a Captured at timestamp, but there is no freshness gate that marks the PR section stale when the capture is old.
  • Prior work removed per-author PR bloat, but the live symptom is now stale PR data remaining in the artifact for days.

The Fix

  • Add a freshness SLA for Active PR Cycle State / Recent Open PRs inside the generated handoff.
  • If live PR fetch succeeds, render a current compact PR section capped at 10 with (shown / total).
  • If live PR fetch fails or the section is older than the SLA, render an explicit stale/degraded marker and do not present old PR data as current.
  • Add tests that seed an old PR capture and prove regeneration either replaces it with current data or marks PR state stale/degraded.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
sandman_handoff.md Active PR Cycle State this ticket; GoldenPathSynthesizer PR section is compact, capped, and has current capture metadata. Live fetch failure renders degraded/stale marker instead of old PR facts. DreamPipeline update if section contract changes Unit test with stale seeded artifact and fetch failure.
renderRecentOpenPrSummary() current source Caps at 10 and renders (shown / total) heading. Empty PR list omits list or states none, without stale prior entries. JSDoc if changed Focused renderer test.
PR fetch path current source Failure is visible in generated handoff and task outcome. No silent reuse of old GitHub PR data. None unless user-facing marker needs docs Unit test with fetch throwing.

Acceptance Criteria

  • PR state older than the configured freshness SLA is visibly marked stale/degraded in the generated handoff.
  • Successful PR fetch replaces stale PR content with current compact data.
  • Fetch failure does not preserve old PR entries as if current.
  • Recent Open PRs renders no more than 10 items and displays (shown / total).
  • Per-author PR sections remain absent.
  • Tests cover stale seeded handoff, fetch success, and fetch failure.

Out of Scope

  • REM parser over-cap behavior.
  • Golden Path strategic summary generation.
  • Manual markdown cleanup.

Related

  • #13956 / PR #13957 — prior compact handoff rendering work.
  • #13962 / PR #13963 — zero-candidate rewrite path.
  • #13983 — Golden Path strategic handoff contract.

Release classification: boardless urgent Agent OS lifecycle-safety hardening. Retrieval Hint: Active PR Cycle State stale capturedAt Recent Open PRs sandman_handoff

tobiu referenced in commit 6ca9909 - "fix(ai): fail loud on stale handoff PR state (#13985) (#13987)" on Jun 25, 2026, 11:37 AM
tobiu closed this issue on Jun 25, 2026, 11:37 AM