Resolves #12073
Wires the existing turn-aligned session chunker into the full Tri-Vector REM extraction path. Fitting sessions still use the exact single-pass document path; large sessions map complete raw turn chunks, reduce successful chunk payloads deterministically, and commit graph mutations only after every chunk succeeds.
Evidence: L2 (focused unit suites and source preflight in local sandbox) -> L2 required (deterministic map/reduce, failure terminality, and orchestrator state propagation are unit-verifiable). Residual: live REM backlog drain still needs post-merge observation under the running orchestrator.
Deltas from ticket
The chunking primitive already existed; this PR wires it into SemanticGraphExtractor.executeTriVectorExtraction() and keeps the reduce step intentionally deterministic rather than pretending to do semantic-perfect synthesis. Chunk failures now preserve chunk provenance in the typed failure evidence, and DreamService stores that evidence in per-session tri-vector state for handoff diagnostics.
Test Evidence
npm run agent-preflight -- ai/services/graph/SemanticGraphExtractor.mjs ai/daemons/orchestrator/services/DreamService.mjs test/playwright/unit/ai/services/graph/SemanticGraphExtractor.spec.mjs
npm run test-unit -- test/playwright/unit/ai/services/graph/SemanticGraphExtractor.spec.mjs -> 12 passed
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs -> 34 passed
Post-Merge Validation
Commits
05637d2026 — map/reduce Tri-Vector extraction with focused unit coverage
Authored by Euclid (GPT-5, Codex Desktop). Session 019ef378-527d-7393-bc74-ec3a1d3f2ddf.
Resolves #12073
Wires the existing turn-aligned session chunker into the full Tri-Vector REM extraction path. Fitting sessions still use the exact single-pass document path; large sessions map complete raw turn chunks, reduce successful chunk payloads deterministically, and commit graph mutations only after every chunk succeeds.
Evidence: L2 (focused unit suites and source preflight in local sandbox) -> L2 required (deterministic map/reduce, failure terminality, and orchestrator state propagation are unit-verifiable). Residual: live REM backlog drain still needs post-merge observation under the running orchestrator.
Deltas from ticket
The chunking primitive already existed; this PR wires it into
SemanticGraphExtractor.executeTriVectorExtraction()and keeps the reduce step intentionally deterministic rather than pretending to do semantic-perfect synthesis. Chunk failures now preserve chunk provenance in the typed failure evidence, andDreamServicestores that evidence in per-session tri-vector state for handoff diagnostics.Test Evidence
npm run agent-preflight -- ai/services/graph/SemanticGraphExtractor.mjs ai/daemons/orchestrator/services/DreamService.mjs test/playwright/unit/ai/services/graph/SemanticGraphExtractor.spec.mjsnpm run test-unit -- test/playwright/unit/ai/services/graph/SemanticGraphExtractor.spec.mjs-> 12 passednpm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs-> 34 passedPost-Merge Validation
Commits
05637d2026— map/reduce Tri-Vector extraction with focused unit coverageAuthored by Euclid (GPT-5, Codex Desktop). Session 019ef378-527d-7393-bc74-ec3a1d3f2ddf.