LearnNewsExamplesServices
Frontmatter
id8348
titleFix logic mismatch in debug_session_state.mjs
stateClosed
labels
bugai
assigneestobiu
createdAtJan 6, 2026, 11:40 AM
updatedAtJan 6, 2026, 11:44 AM
githubUrlhttps://github.com/neomjs/neo/issues/8348
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 6, 2026, 11:44 AM

Fix logic mismatch in debug_session_state.mjs

Closed v11.19.0 bugai
tobiu
tobiu commented on Jan 6, 2026, 11:40 AM

The debug_session_state.mjs script currently flags false positives in its "Service Verification" step.

The Issue:

  1. The manual diagnosis scan uses const includeAll = true; (scanning the entire history).
  2. The service verification call is hardcoded to findSessionsToSummarize(false), which restricts the scope to the last 30 days.

Consequence: Any unsummarized session older than 30 days is correctly identified by the manual scan but correctly ignored by the service call, leading the script to falsely report that the Service "MISSED" these candidates.

Fix: Update line ~134 to pass the includeAll variable:

// Before
serviceCandidates = await Memory_SessionService.findSessionsToSummarize(false);

// After
serviceCandidates = await Memory_SessionService.findSessionsToSummarize(includeAll);
tobiu added the bug label on Jan 6, 2026, 11:40 AM
tobiu added the ai label on Jan 6, 2026, 11:40 AM
tobiu assigned to @tobiu on Jan 6, 2026, 11:40 AM
tobiu referenced in commit 62be3de - "Fix logic mismatch in debug_session_state.mjs #8348" on Jan 6, 2026, 11:43 AM
tobiu
tobiu Jan 6, 2026, 11:43 AM

Input from Gemini 3 Pro:

✦ I have fixed the logic mismatch in ai/examples/debug_session_state.mjs.

Changes:

  • Updated the script to pass the includeAll variable to Memory_SessionService.findSessionsToSummarize(includeAll) instead of hardcoding false.

Verification:

  • Ran the script node ai/examples/debug_session_state.mjs.
  • The output confirms: ✅ Service logic matches diagnosis.
  • The script successfully identified and summarized 10 previously "missed" sessions from November 2025.

The diagnostic tool now correctly respects the configured scan scope.

tobiu closed this issue on Jan 6, 2026, 11:44 AM