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
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).
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 ~479SESSIONprojections 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-graphDigestedsessions viasessionsCollection.get({limit: summarizationBatchLimit})— no DESC/ASC aged-drain ordering — then.slice(0, remSleepBatchLimit). That is the same aged-tail starvation fixed forbackfillMiniSummariesin #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)
findUndigestedSessionsso the projection-drain cannot starve the aged tail again.graphDigested-but-unprojected SESSION rows to clear the backlog so the marker can reach 0.Acceptance criteria
neo-agent-sessionsgraphDigesteddistribution across the ~884 → hard-orphaned (graphDigested=truebut unprojected) vs in-queue-starved (flag unset). Sizes (a) vs (b).findUndigestedSessionsgains the fresh-reserve + aged-drain split (mirror #13656); the aged tail is reachable each cycle.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).