LearnNewsExamplesServices
Frontmatter
id13697
titleBackfill + aged-drain the ~884 graph-unprojected SESSION nodes — findUndigestedSessions starves the aged tail, flooring the #13624 marker
stateClosed
labels
bugaiarchitectureperformancemodel-experience
assigneesneo-gpt
createdAtJun 21, 2026, 4:32 AM
updatedAtJun 21, 2026, 7:56 AM
githubUrlhttps://github.com/neomjs/neo/issues/13697
authorneo-opus-vega
commentsCount5
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 21, 2026, 5:18 AM

Backfill + aged-drain the ~884 graph-unprojected SESSION nodes — findUndigestedSessions starves the aged tail, flooring the #13624 marker

Closed v13.1.0/archive-v13-1-0-chunk-4 bugaiarchitectureperformancemodel-experience
neo-opus-vega
neo-opus-vega commented on Jun 21, 2026, 4:32 AM

Problem

The orchestrator heavy-maintenance pending-marker (getPendingSessionSummaryCount, #13647) floors at ~47 and never reaches 0 — the "orchestrator-done" signal #13624 needs. After #13647's axis-1 fix (marker excludes archived) + #13656 (drains the 238 orphans), the residual is ~884 SESSION rows summarized in Chroma but graph-unprojected (graph ~479 SESSION projections vs Chroma ~1363 summaries).

V-B-A / root cause

(Full cross-store V-B-A: #13647 issuecomment-4760664508.) DreamService.findUndigestedSessions (ai/daemons/orchestrator/services/DreamService.mjs:151) selects un-graphDigested sessions via sessionsCollection.get({limit: summarizationBatchLimit})no DESC/ASC aged-drain ordering — then .slice(0, remSleepBatchLimit). That is the same aged-tail starvation fixed for backfillMiniSummaries in #13656 (fresh-reserve DESC + aged-drain ASC), but in a sibling function #13656 did not touch. The only other projection path (MemorySessionIngestor.ingestSingleRow) is lazy / dangling-edge-triggered, so it does not drain the backlog either.

#13692 / #13695 fixed the embed-timeout cause (bulk Chroma adds storming the interactive embedder → projection timeouts), so new lag stops. But the existing aged ~884 will not self-heal — the limited batch never reaches them.

Proposed fix (2 parts)

  • (a) systematic — mirror #13656's aged-drain (fresh-reserve + aged-drain ASC) into findUndigestedSessions so the projection-drain cannot starve the aged tail again.
  • (b) one-time — re-project the existing un-graphDigested-but-unprojected SESSION rows to clear the backlog so the marker can reach 0.

Acceptance criteria

  • Empirical split: query the Chroma neo-agent-sessions graphDigested distribution across the ~884 → hard-orphaned (graphDigested=true but unprojected) vs in-queue-starved (flag unset). Sizes (a) vs (b).
  • (a) findUndigestedSessions gains the fresh-reserve + aged-drain split (mirror #13656); the aged tail is reachable each cycle.
  • (b) the existing backlog is re-projected (script or N drain cycles).
  • The pending-marker converges to the genuine drift (~2) so the orchestrator-done signal fires.
  • Test coverage for the aged-drain (mirror #13656's spec shape).

Ownership

Diagnosis + (b) = Vega (#13647 axis-1). (a) is a near-clone of #13656 — offered to @neo-opus-grace as a #13656-family follow-up (freshest context). Split being coordinated via A2A; this ticket follows the #13647 unassigned + body/A2A-ownership convention (single shared GH token).

Related

Parent epic #13624 (orchestrator net-progress). Axis-1 diagnosis #13647. Sibling aged-drain fix #13656. Cause-fix #13692 / #13695.

Authored by Vega (Claude Opus 4.8, Claude Code).

tobiu referenced in commit 836c381 - "fix(ai): age-drain and repair unprojected sessions (#13697) (#13701) on Jun 21, 2026, 5:18 AM
tobiu closed this issue on Jun 21, 2026, 5:18 AM