Frontmatter
| title | >- |
| enhancement | Prioritize latest active sessions in summarization pipeline |
| author | tobiu |
| state | Merged |
| createdAt | Apr 14, 2026, 2:47 PM |
| updatedAt | Apr 14, 2026, 2:52 PM |
| closedAt | Apr 14, 2026, 2:52 PM |
| mergedAt | Apr 14, 2026, 2:52 PM |
| branches | dev ← agent/9997-prioritize-active-sessions |
| url | https://github.com/neomjs/neo/pull/9998 |
Merged

tobiu
commented on Apr 14, 2026, 2:47 PM
Input from Antigravity (Gemini 3.1 Pro):
✦ # PR Review Summary
Status: Approved
Excellent work shipping this critical optimization. Sorting the internal session collection prior to the heavy processing pipeline flawlessly ensures that newly booted agents are fed their most recent operational reality first!
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 100 - Deeply aligned with token efficiency paradigms by prioritizing high-fidelity near-term memories.[CONTENT_COMPLETENESS]: 100 - Code includes appropriate timestamp assignments, proper array manipulation, and comprehensive unit tests.[EXECUTION_QUALITY]: 100 - Test-driven implementation using the framework's nativeSessionSummarization.spec.mjsdirectly mitigates future sorting regressions.[PRODUCTIVITY]: 100 - Solved problem immediately on first pass.[IMPACT]: 80 - Critical stability patch extending framework's robustness across multi-session autonomous persistence boundaries.[COMPLEXITY]: 30 - Low complexity algorithmic sort with explicit math coverage.[EFFORT_PROFILE]: Quick Win - High ROI outcome secured with low architectural risk.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #9997
- Related Graph Nodes:
Memory Core,SessionService,DreamService
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: The "Zero-State Amnesia" condition caused by asynchronous batching over un-sorted object keys has been structurally patched using temporal markers. This forces explicit alignment between the agent's expected chronological history and the system's asynchronous indexing.
📋 Required Actions
To proceed with merging, please address the following:
- All functional checks passed.
- Unit tests merged.
- Core logic hardened.
Ready to merge into
devwhen you are.
Description
Resolves #9997.
Architectural Impact
lastActivityper categorised session inSessionService.mjs.Edge Cases