LearnNewsExamplesServices
Frontmatter
id12819
titlev13: close the silent session-summary gap with a provenance-labeled degraded fallback (Option F)
stateClosed
labels
bugai
assigneesneo-opus-grace
createdAtJun 9, 2026, 12:51 PM
updatedAtJun 9, 2026, 1:55 PM
githubUrlhttps://github.com/neomjs/neo/issues/12819
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 9, 2026, 1:55 PM

v13: close the silent session-summary gap with a provenance-labeled degraded fallback (Option F)

neo-opus-grace
neo-opus-grace commented on Jun 9, 2026, 12:51 PM

Problem (v13 release-blocker)

SessionService.summarizeSession joins raw turn documents and one-shots them; a guardrail skips invocation when the prompt exceeds the local-model safe-processing band (localModels.chat.safeProcessingLimitTokens) and returns null. So an oversized night-shift session (200+ turns, > context) gets no session summary at all — a silent gap, not merely a lossy one.

Root cause (V-B-A'd)

  • ai/services/memory-core/SessionService.mjssummarizeSession joins raw documents (:503) + the guardrail returns null past the safe band (:593).
  • The per-turn miniSummary projection already exists (MemoryService._hydrateRecentTurnSummaries + the #12746 / #12802 / #12805 backfill), ~280 char/turn → ~15k tokens for 200 turns (one-shots), but summarizeSession ignores it.

Fix — Option F (graduated from #12817 LEAF 1; gpt [GRADUATION_APPROVED])

  • Within the guardrail: raw one-shot, unchanged (preferred path).
  • When the raw prompt would exceed the safe band: instead of returning null, build the session summary from the per-turn miniSummaries and tag it with provenance — sourceTier: 'miniSummary', degraded: true, rawCanonical: true. Raw turns stay the canonical drill-down substrate.

Acceptance Criteria

  • An oversized session (raw prompt > safeProcessingLimitTokens) produces a non-null session summary built from per-turn miniSummaries (no silent skip).
  • The fallback summary carries explicit provenance metadata (sourceTier / degraded / rawCanonical) so consumers distinguish it from a raw-grounded summary.
  • The raw path is unchanged when within the guardrail (no regression).
  • Graph extraction (DreamService / SemanticGraphExtractor) continues to consume raw turns, never the degraded index (V-B-A confirmed it reads raw today — preserve).
  • Deterministic unit coverage: within-band → raw summary; over-band → miniSummary-derived labeled fallback (not null).

Out of scope

  • The fidelity eval + the A/B/C/E architecture choice (#12817 LEAF 2, parked post-v13; eval bar = false-arc + pivotal-signal preservation, not raw detail-retention).
  • Promoting miniSummary-derived from fallback to primary (the LEAF 2 research question, per @tobiu's premise-reframe).

Provenance / relations

Graduated from Ideation Discussion #12817 (LEAF 1). Relates to #12679 (temporal pyramid), #12065 (REM-SSOT epic), #12073 (chunker), #12799 (sibling silent-degradation family).

Authored by Claude Opus 4.8 (Claude Code)

tobiu referenced in commit bacec80 - "fix(memory-core): close the silent session-summary gap with a degraded miniSummary fallback (#12819) (#12820) on Jun 9, 2026, 1:55 PM
tobiu closed this issue on Jun 9, 2026, 1:55 PM
tobiu referenced in commit 6a6b0bf - "feat(orchestrator): log the session-summary backlog count on the periodic sweep (#12821) (#12822) on Jun 9, 2026, 2:35 PM