LearnNewsExamplesServices
Frontmatter
id15092
titlefix(golden-path): current-focus fallback route rows don''t parse via parseGoldenPath (never-empty floor silently empty) + false-green test
stateClosed
labels
bugai
assigneesneo-opus-ada
createdAt1:10 PM
updatedAt2:37 PM
githubUrlhttps://github.com/neomjs/neo/issues/15092
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAt2:37 PM

fix(golden-path): current-focus fallback route rows don't parse via parseGoldenPath (never-empty floor silently empty) + false-green test

neo-opus-ada
neo-opus-ada commented on 1:10 PM

Problem

The Computed Golden Path current-focus fallback (#15058 / #14609 behavior 1 — the "never-empty focus-as-route floor") renders numbered **issue-N**: rows that AgentOrchestrator.parseGoldenPath() cannot parse. In the no-survivor-contradiction state (every computed candidate contradicts live incident/prio-zero focus), the autonomous orchestrator route is silently empty — the exact opposite of the "never-empty floor" the fallback was built to provide.

Root cause (V-B-A'd against origin/dev)

AgentOrchestrator.parseGoldenPath() (ai/agent/AgentOrchestrator.mjs:102) row regex:

/\d+\.\s\*\*issue-(\d+)\*\*:[^\n]*\n\s+-\s\*(.*?)\*/g

requires each N. **issue-N**: row to be followed by an indented - *description* continuation line. The canonical route render (GoldenPathSynthesizer.mjs:1098) emits it:

1. **issue-15087**: Score 0.87 (…)
   - *title*

But renderComputedGoldenPathContradictionSection (ai/services/graph/computedGoldenPathRouting.mjs:243) emits no continuation line:

1. **issue-14988**: Current Release / Incident Focus (Fleet auth restart)
2. **issue-15075**: Current Release / Incident Focus (Dashboard lazy import)

so the row regex never matches.

Empirical proof (exact parser regexes against the exact renders)

Section section matched directives parsed
Canonical route (control) 1
#15058 current-focus fallback 0

The section's own JSDoc states the intent — "surfaces the live Current Focus items as the numbered **issue-N**: recommendation so AgentOrchestrator.parseGoldenPath() routes the incident/release work" — so the missing continuation is a genuine defect, not a design choice.

False-green test masking it

test/playwright/unit/ai/services/graph/computedGoldenPathRouting.spec.mjs:106-107:

// never empty: the live Current Focus item IS the numbered route (parseGoldenPath-compatible)
expect(section).toContain('1. **issue-100**');

asserts the render contains the substring and claims "parseGoldenPath-compatible", but never runs the parser. It is a render-substring check standing in for a caller round-trip — green while the route is broken.

Scope (narrow)

  1. Render fix: renderComputedGoldenPathContradictionSection — emit the - *…* continuation line per routed focus row so the existing parser matches. (Prefer fixing the render, not loosening the parser — lower blast radius.)
  2. Test hardening: replace the false-green substring assertion with a real parseGoldenPath-equivalent round-trip: render → parse → assert the incident issue id is extracted as a directive. Applies the "helper-replay ≠ caller test" lesson.

Out of scope / deliberately NOT fixed

  • The declared-intent fallback (#14659) renders as a separate ### Computed Golden Path — fallback: declared-intent (H3), explicitly "provisional, not the semantic ranking", and by design "additive — cannot zero or gate the base route." It is advisory, not executed route authority (see D#15090 OQ2 analysis). Its non-parsing is correct-by-design — do NOT make it parse (that would elevate a direction-proxy surface into executed route, crossing ADR-0033's additive-never-gating line).

Relationship to OQ2 (D#15090)

D#15090's OQ2 typed-ComputedRouteResult migration deletes the regex parser entirely and makes the route a typed field read — subsuming the render half of this fix. But (a) OQ2 is [GRADUATION_DEFERRED] with 5 open OQs, not imminent, and (b) the round-trip test is permanent — it is exactly the per-mode consumer round-trip assertion OQ2's acceptance requires (the false-green proves render-substring checks are structurally insufficient). This is the bridging fix; the round-trip test carries forward.

Acceptance

  • parseGoldenPath() extracts the incident/prio-zero directive from a current-focus-fallback render (round-trip test, red-before-green).
  • The declared-intent fallback remains non-executed (advisory) — a test asserts it yields zero parseGoldenPath directives, by design.
  • computedGoldenPathRouting.spec + AgentOrchestrator.spec green.

Refs D#15090 (OQ2), #15058, #14609, #15087.


Filed by Ada (@neo-opus-ada, Claude Opus 4.8, Claude Code). Origin session 01f4cc68-8b8e-43e6-b51c-55b4f421f4e0.

tobiu referenced in commit 5577799 - "fix(golden-path): current-focus fallback rows round-trip through parseGoldenPath (#15092) (#15093) on 2:37 PM
tobiu closed this issue on 2:37 PM