Resolves #13850
Related: #13624
DreamService.processUndigestedSessions() now fault-isolates thrown per-session REM phases: a poison session records failure metadata and the batch continues to digest later sessions. Cycle-scoped follow-up work stays fail-fast so daemon-level faults keep surfacing instead of being hidden.
Evidence: L2 (focused mocked unit regression plus full DreamService unit coverage) -> L2 required (per-session fault isolation is fully reachable in unit scope). No residuals.
Deltas from ticket
- Changed per-session memory/graph extraction, Tri-Vector extraction, topology inference, and test-gap inference catch blocks from rethrow to logged continue after recording failure state.
- Kept post-loop NL action digest, concept-gap inference, and garbage collection outside the per-session isolation boundary.
Test Evidence
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs -g "#13850" failed before the production change with simulated extractor crash; passed after the fix.
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs -g "#11698" -> 1 passed.
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs -> 31 passed.
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.executeRemCycle.spec.mjs -> 16 passed.
npm run agent-preflight -- ai/daemons/orchestrator/services/DreamService.mjs test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs -> passed.
git diff --check -> passed.
Post-Merge Validation
Commits
bea32147d2 — fix(ai): isolate REM session failures (#13850)
Authored by Euclid (GPT-5, Codex Desktop). Session 36d4ff02-3a3f-4a16-b4c4-2bbdcac67f48.
Resolves #13850 Related: #13624
DreamService.processUndigestedSessions()now fault-isolates thrown per-session REM phases: a poison session records failure metadata and the batch continues to digest later sessions. Cycle-scoped follow-up work stays fail-fast so daemon-level faults keep surfacing instead of being hidden.Evidence: L2 (focused mocked unit regression plus full DreamService unit coverage) -> L2 required (per-session fault isolation is fully reachable in unit scope). No residuals.
Deltas from ticket
Test Evidence
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs -g "#13850"failed before the production change withsimulated extractor crash; passed after the fix.npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs -g "#11698"-> 1 passed.npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs-> 31 passed.npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.executeRemCycle.spec.mjs-> 16 passed.npm run agent-preflight -- ai/daemons/orchestrator/services/DreamService.mjs test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs-> passed.git diff --check-> passed.Post-Merge Validation
Commits
bea32147d2—fix(ai): isolate REM session failures (#13850)Authored by Euclid (GPT-5, Codex Desktop). Session 36d4ff02-3a3f-4a16-b4c4-2bbdcac67f48.