LearnNewsExamplesServices
Frontmatter
id12812
titleIntra-run progress logs for session-summary + mini-summary backfill (long-run visibility)
stateClosed
labels
enhancementai
assigneesneo-opus-vega
createdAtJun 9, 2026, 10:14 AM
updatedAtJun 11, 2026, 8:34 AM
githubUrlhttps://github.com/neomjs/neo/issues/12812
authorneo-opus-grace
commentsCount1
parentIssue12740
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 11, 2026, 8:34 AM

Intra-run progress logs for session-summary + mini-summary backfill (long-run visibility)

neo-opus-grace
neo-opus-grace commented on Jun 9, 2026, 10:14 AM

Context

Follow-up to #12810 (which added the at-trigger backlog depth). @tobiu: long summary tasks (15-30 min) currently emit only Starting X → silence → completed / watchdog-killed — no progress. Other heavy tasks (file ingest, embeddings) show granular 5/30 done. We want the same for session summaries (each) and mini-summaries (every ~5) so a 15-30 min run gives real output, not silence.

V-B-A — why the operator is currently blind (root cause)

The ProcessSupervisor spawns the lifecycle children (summarize-sessions.mjs, backfill-memory-summaries.mjs) with stdio: ['ignore', 'ignore', 'pipe'] (ai/daemons/orchestrator/services/ProcessSupervisorService.mjs:353) — child STDOUT is IGNORED; only STDERR is captured + re-logged as [ProcessSupervisor] {label} stderr: … (:241-250). Consequences:

  • The children's console.log progress (e.g. summarize-sessions.mjs's lines) is discarded — invisible in the orchestrator.log the operator watches.
  • The memory-core logger (ai/mcp/server/memory-core/logger.mjs) writes to a file sink (mc-server*.log) + stderr, gated by stderrMode: 'debug'. So logger.* progress reaches orchestrator.log only if its level routes to stderr.
  • SessionService.summarizeSessions already logs Processing batch X/Y (:1216, logger.info) at batch-start — but it is invisible in orchestrator.log if logger.info does not reach stderr (the likely reason the operator doesn't see it today).
  • MemoryService.backfillMiniSummaries has no intra-loop progress log at all.

The Fix

  1. Mini-summary backfill (MemoryService.backfillMiniSummaries): emit a progress log every ~5 processed rows — miniSummary backfill: N/total (U updated, D deferred) — reusing the processed counter added by the #12802 run-budget.
  2. Session summary (SessionService.summarizeSessions): emit a per-session completion log — session summarization: N/total done (<sessionId>) — after each summarizeSession resolves (the chunk.map at :1218).
  3. Visibility routing (the key decision): since child stdout is ignored, progress MUST reach STDERR (the captured channel) to land in the operator's orchestrator.log view. Confirm/adjust so info-level progress reaches stderr (verify stderrMode handling in ai/mcp/server/shared/logger.mjs), OR switch the supervisor child stdio to capture stdout (stdio[1]='pipe'). Decide at implementation; target: progress visible alongside the [ProcessSupervisor] Starting … lines.

Decision Record impact

none — orchestrator/service logging.

Acceptance Criteria

  • Mini-summary backfill emits a progress log every ~5 rows (N/total + updated/deferred).
  • Session summarization emits a per-session completion log (N/total).
  • The progress is visible in the operator's orchestrator.log view (not only the mc-server file sink) — verified against the stdout-ignore / stderr-capture routing.
  • Unit coverage where feasible (loop progress emission); the routing may need a manual/integration check.

Out of Scope

Related

  • #12740 (epic). #12810 (at-trigger backlog depth — this is the intra-run complement).

Live latest-open sweep: checked latest open issues + dup-search at 2026-06-09T08:14:03Z; no progress-log dup.

Authored by Claude Opus 4.8 (Claude Code)

tobiu referenced in commit 9bcd7bc - "feat(memory-core): intra-run progress logs for session-summary + miniSummary backfill (#12812) (#12885) on Jun 11, 2026, 8:34 AM
tobiu closed this issue on Jun 11, 2026, 8:34 AM