Authored by Claude Opus 4.8 (Claude Code). Session 0f94aade-f9b1-4214-b17e-be0bdf33e2be.
Resolves #12823
Removes the obsolete 30-day lookback window (and the now-dead includeAll parameter) from SessionService.findSessionsToSummarize / summarizeSessions and the summarize-sessions.mjs call site. The periodic summarizer was hard-windowed to the last 30 days while the orchestrator backlog metric getPendingSessionSummaryCount is all-time — so ~299 of 478 sessions (older than 30 days) were counted pending while the sweep structurally never reached them. The window was a boot/healthcheck-timeout safeguard from when Memory Core summarized on server boot; that coupling is gone (summarization runs in the spawned orchestrator daemon child, and the MC healthcheck no longer calls it), so it was dead-weight stranding the historical tail. The sweep is now all-time and matches the metric; the backlog drains (degraded summaries via #12820's fallback where oversized).
Evidence: L2 (unit specs — findSessionsToSummarize now returns an ancient >30-day unsummarized session; active/peer-exclusion behavior preserved) → L4 required (AC4 post-merge: the live orchestrator pending-session-summary count drains and no longer floors at ~299). Residual: AC4 [#12823].
Deltas from ticket
None — scope matches the ticket. includeAll was removed entirely (not retained as a vestigial param) per the ticket's Avoided-Traps.
Test Evidence
npm run test-unit -- test/playwright/unit/ai/services/memory-core/QueryReRanker.spec.mjs → 12 passed, including the new findSessionsToSummarize includes >30-day-old sessions (30-day window removed) test (seeds a 90-day-old unsummarized session, asserts it is now returned).
npm run test-unit -- QueryReRanker.spec.mjs SessionSummarization.spec.mjs → 17 passed — no regression in drift-detection, active-session exclusion, or peer-exclusion behavior; gemma4 summarization ran healthy locally.
grep -n "includeAll|minTimestamp|ONE_MONTH" over SessionService.mjs + summarize-sessions.mjs → 0 residual references.
Post-Merge Validation
Commits
54d045841 — fix(memory-core): remove the obsolete 30-day window from session summarization (#12823)
Note
Cross-family reviewers (GPT + Claude family) are at their weekly rate-limit caps until 2026-06-11, so this awaits cross-family review per §6.1 until then (or operator merge). Opened under operator lead-delegation for the v13 session-summary backlog cluster (sibling: #12824).
Authored by Claude Opus 4.8 (Claude Code). Session 0f94aade-f9b1-4214-b17e-be0bdf33e2be.
Resolves #12823
Removes the obsolete 30-day lookback window (and the now-dead
includeAllparameter) fromSessionService.findSessionsToSummarize/summarizeSessionsand thesummarize-sessions.mjscall site. The periodic summarizer was hard-windowed to the last 30 days while the orchestrator backlog metricgetPendingSessionSummaryCountis all-time — so ~299 of 478 sessions (older than 30 days) were counted pending while the sweep structurally never reached them. The window was a boot/healthcheck-timeout safeguard from when Memory Core summarized on server boot; that coupling is gone (summarization runs in the spawned orchestrator daemon child, and the MC healthcheck no longer calls it), so it was dead-weight stranding the historical tail. The sweep is now all-time and matches the metric; the backlog drains (degraded summaries via#12820's fallback where oversized).Evidence: L2 (unit specs —
findSessionsToSummarizenow returns an ancient >30-day unsummarized session; active/peer-exclusion behavior preserved) → L4 required (AC4 post-merge: the live orchestratorpending-session-summarycount drains and no longer floors at ~299). Residual: AC4 [#12823].Deltas from ticket
None — scope matches the ticket.
includeAllwas removed entirely (not retained as a vestigial param) per the ticket's Avoided-Traps.Test Evidence
npm run test-unit -- test/playwright/unit/ai/services/memory-core/QueryReRanker.spec.mjs→ 12 passed, including the newfindSessionsToSummarize includes >30-day-old sessions (30-day window removed)test (seeds a 90-day-old unsummarized session, asserts it is now returned).npm run test-unit -- QueryReRanker.spec.mjs SessionSummarization.spec.mjs→ 17 passed — no regression in drift-detection, active-session exclusion, or peer-exclusion behavior; gemma4 summarization ran healthy locally.grep -n "includeAll|minTimestamp|ONE_MONTH"overSessionService.mjs+summarize-sessions.mjs→ 0 residual references.Post-Merge Validation
pending-session-summarycount drains toward 0 over successive sweeps (no longer floors at ~299).sourceTier: truncatedRaw/miniSummary) for oversized old sessions via the#12820fallback, rather than null.Commits
54d045841— fix(memory-core): remove the obsolete 30-day window from session summarization (#12823)Note
Cross-family reviewers (GPT + Claude family) are at their weekly rate-limit caps until 2026-06-11, so this awaits cross-family review per §6.1 until then (or operator merge). Opened under operator lead-delegation for the v13 session-summary backlog cluster (sibling: #12824).