LearnNewsExamplesServices
Frontmatter
id14879
titleComputed GP frontier-empty fallback hardcodes an unmeasured cause
stateClosed
labels
bugaiarchitecture
assigneesneo-opus-ada
createdAt11:24 AM
updatedAt12:21 PM
githubUrlhttps://github.com/neomjs/neo/issues/14879
authorneo-opus-ada
commentsCount0
parentIssue14472
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[ ] 14883 GP fallback: plumb REM pipeline state for precise frontier-cause attribution
closedAt12:21 PM

Computed GP frontier-empty fallback hardcodes an unmeasured cause

Closed Backlog/active-chunk-4 bugaiarchitecture
neo-opus-ada
neo-opus-ada commented on 11:24 AM

Context

@tobiu hit the Computed Golden Path fallback this session (2026-07-06) and called it "worst case, not even slightly accurate":

<h2 class="neo-h2" data-record-id="3">Computed Golden Path — fallback: declared-intent (frontier empty)</h2>

> The semantic frontier is empty (REM-starved / cold-start). Ranking 10 unblocked open-epic-tree leaf/leaves by declared intent instead — provisional, not the semantic ranking.

The fallback firing was correct (the frontier anchor was genuinely empty). The cause it printed was false.

The Problem

The "(REM-starved / cold-start)" clause is a hardcoded literal — the render never measures whether REM is actually starved. V-B-A this session falsified it:

  • get_rem_pipeline_state: undigested: 7, digested: 1483, last 5 cycles completed. REM was healthy, not starved (the #14717 starvation-breaker merged 07-04 and is holding).
  • The real cause was the wake daemon being off (bridgeDaemonEnabled false) → no autonomous REM cycles firing → the frontier anchor never re-populated despite healthy digestion. Re-enabling the daemon resolved it at the root.

So the fallback asserts a specific, wrong mechanism ("REM-starved") every time it fires, regardless of the actual pipeline state. This is exactly the GP-v2 "honest states" failure: a plausible-but-unmeasured cause is worse than an honest "cause unknown / frontier unanchored," because the operator (and autonomous pickup) reads a confident wrong diagnosis and mis-acts on it.

The Architectural Reality

  • ai/services/graph/goldenPathPickupBridge.mjs:116renderDeclaredIntentFallback hardcodes: `> The semantic frontier is empty (REM-starved / cold-start). Ranking ...`. The function receives only rankedItems + limit; it has no cause signal to render.
  • ai/services/graph/goldenPathPickupBridge.mjs:32DECLARED_INTENT_PROVENANCE (the provenance line; correct, keep).
  • ai/services/graph/goldenPathPickupBridge.mjs:43shouldActivateFallback correctly detects frontierEmpty || routedCount === 0, but detection ≠ cause.
  • ai/graph/directionAttribution.mjs — already computes INTENT_STARVED ("a declared active goal NO motion serves — the June-2026 failure") and aligned / starved goal buckets. The honest-states vocabulary already exists; the fallback just doesn't consume it.
  • Caller: ai/services/graph/GoldenPathSynthesizer.mjs (~L1080, Frontier empty — rendered declared-intent fallback) — this is where live pipeline state is available to classify the real cause.

The Fix

  1. Add a pure cause-classifier (sibling to shouldActivateFallback in goldenPathPickupBridge.mjs, no new file): classifyFrontierEmptyCause({undigested, recentCycleCount, digested, frontierAnchorEmpty}) → a stable code + human phrase, e.g. COLD_START (no digested history), REM_STALLED (undigested high / no recent cycles), FRONTIER_UNANCHORED (digestion healthy but anchor empty — the daemon-off case), reusing the INTENT_STARVED vocabulary from directionAttribution.mjs where a declared goal is starved.
  2. Thread the measured cause into renderDeclaredIntentFallback(rankedItems, {limit, cause}) — render the classifier's phrase instead of the hardcoded "(REM-starved / cold-start)."
  3. Wire the caller (GoldenPathSynthesizer.mjs) to compute the cause from live pipeline state and pass it.
  4. Fail-safe: if the cause cannot be measured, render a neutral "frontier anchor empty — cause unattributed" — never re-assert an unmeasured mechanism.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
renderDeclaredIntentFallback(rankedItems, limit)(rankedItems, {limit, cause}) goldenPathPickupBridge.mjs:104 render the measured cause phrase neutral "cause unattributed" when cause absent JSDoc @param update single in-repo caller: GoldenPathSynthesizer.mjs
classifyFrontierEmptyCause(state) (new export) new, sibling to shouldActivateFallback map measured pipeline state → honest cause code+phrase FRONTIER_UNANCHORED default (least-asserting) JSDoc unit-tested pure fn

Decision Record impact

aligned-with the #14565 direction-attribution chain — consumes its INTENT_STARVED vocabulary; introduces no new config and amends no ADR. No AiConfig surface touched (ADR-0019 not in scope).

Acceptance Criteria

  • renderDeclaredIntentFallback no longer contains the literal string "REM-starved" or "cold-start"; the rendered cause is the value passed by the caller.
  • classifyFrontierEmptyCause is a pure, unit-tested function returning a stable code for each of: cold-start, REM-stalled, frontier-unanchored-but-digestion-healthy.
  • The caller passes a cause measured from live pipeline state (undigested / recentCycles / digested / anchor-empty).
  • When the cause is unmeasurable, the render says so honestly and asserts no mechanism.
  • Unit test asserts the daemon-off scenario (undigested low, cycles present, anchor empty) renders FRONTIER_UNANCHORED, NOT "REM-starved".

Out of Scope

  • The frontier-anchoring / REM-cycle-firing mechanism itself (that is the wake-daemon + Grace's daemon-side lane; this ticket is render honesty only).
  • The fallback activation predicate shouldActivateFallback (correct as-is).
  • The DECLARED_INTENT_PROVENANCE line (correct as-is).

Avoided Traps

  • Do not just swap one hardcoded phrase for another (e.g. "cause unknown") — that repeats the sin at lower confidence. The cause must be measured, with an honest unattributed-fallback only when measurement fails.
  • Do not re-implement starvation detection — reuse directionAttribution.mjs INTENT_STARVED and the existing get_rem_pipeline_state shape.

Related

  • Parent epic: #14472 (Golden Path v2). Sibling vocabulary: #14565 (direction-attribution / INTENT_STARVED).
  • Distinct from #14588 (contradiction-guard zero-route collapse — CLOSED via #14596) and #14659 / #14686 (the pickup-bridge fallback mechanism itself — the mechanism is correct; only its cause-attribution lies).

Origin Session ID: 9360840f-5d7a-4680-8110-86877722735b Retrieval Hint: query_raw_memories("goldenPathPickupBridge frontier-empty REM-starved honest-states cause attribution") · commit anchor: goldenPathPickupBridge.mjs DECLARED_INTENT_PROVENANCE

Live latest-open sweep: checked latest 20 open issues 2026-07-06; no equivalent found (nearest: #14611 FM-cockpit honest round-trip states — unrelated surface).

tobiu referenced in commit be813d8 - "fix(graph): Computed GP fallback attributes the measured cause, not hardcoded "REM-starved" (#14879) (#14882) on 12:21 PM
tobiu closed this issue on 12:21 PM