Resolves #13974
Related: #13835
SemanticGraphExtractor.executeTriVectorExtraction() now returns typed failure descriptors instead of bare null for REM failure paths, while successful extraction still returns the existing Tri-Vector payload. DreamService.processUndigestedSessions() consumes those descriptors for deferReason / terminalForCadence, removes the payload-size defer heuristic, and keeps ingestion failures retryable.
Evidence: L2 (focused unit coverage for extractor failure descriptors plus DreamService digest-state consumption) -> L2 required (internal REM state-machine contract). No residuals.
Deltas from Ticket
- Kept
ConsumerFriction V1 stable: no new symptom enum, cadence-specific deferReason remains separate.
- Preserved a legacy bare-null fallback in
DreamService as retryable schema-failure, so old-style stubs or unexpected nulls do not silently defer sessions.
- Removed the ADR 0019-defensive
localModels?.chat?.safeProcessingLimitTokens heuristic at the DreamService decision point.
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 test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs
npm run test-unit -- test/playwright/unit/ai/services/graph/SemanticGraphExtractor.spec.mjs
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs
npm run test-unit -- test/playwright/unit/ai/services/graph/SemanticGraphExtractor.spec.mjs test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjs
Post-Merge Validation
Commits
60f0f59431 - fix(ai): expose REM extractor failure terminality (#13974)
Authored by Euclid (GPT-5, Codex Desktop). Session 019ef378-527d-7393-bc74-ec3a1d3f2ddf.
Resolves #13974 Related: #13835
SemanticGraphExtractor.executeTriVectorExtraction()now returns typed failure descriptors instead of barenullfor REM failure paths, while successful extraction still returns the existing Tri-Vector payload.DreamService.processUndigestedSessions()consumes those descriptors fordeferReason/terminalForCadence, removes the payload-size defer heuristic, and keeps ingestion failures retryable.Evidence: L2 (focused unit coverage for extractor failure descriptors plus DreamService digest-state consumption) -> L2 required (internal REM state-machine contract). No residuals.
Deltas from Ticket
ConsumerFrictionV1 stable: no new symptom enum, cadence-specificdeferReasonremains separate.DreamServiceas retryableschema-failure, so old-style stubs or unexpected nulls do not silently defer sessions.localModels?.chat?.safeProcessingLimitTokensheuristic at the DreamService decision point.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 test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjsnpm run test-unit -- test/playwright/unit/ai/services/graph/SemanticGraphExtractor.spec.mjsnpm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjsnpm run test-unit -- test/playwright/unit/ai/services/graph/SemanticGraphExtractor.spec.mjs test/playwright/unit/ai/daemons/orchestrator/services/DreamService.spec.mjsPost-Merge Validation
deferReasonvalues in per-session telemetry when provider failures occur.Commits
60f0f59431-fix(ai): expose REM extractor failure terminality (#13974)Authored by Euclid (GPT-5, Codex Desktop). Session 019ef378-527d-7393-bc74-ec3a1d3f2ddf.