rpe-context-assembler: Known Failure Modes
rpe-context-assembler is the most complex service in the pipeline. It orchestrates the full RPE analysis cycle:
consume rpe.assemble → assemble context → fan out to 5 analysis services → synthesize → decide → route to agent-brain or observe-gate.
FAILURE MODES:
1. Analysis fanout stall — one or more of the 5 HTTP services (rpe-classifier, rpe-sentiment, rpe-intent, rpe-dynamics, rpe-extractor) does not respond within 25s. Promise.all blocks until all resolve or timeout. Single slow service stalls the entire fanout.
2. rpe-synthesizer timeout — synthesis call (10s) fails. Without an engagement recommendation the assembler cannot make an observe/respond decision.
3. agent-tools HTTP failure — distiller call fails (25s timeout). Context assembly is incomplete.
4. RabbitMQ connection lost — cannot consume from rpe.assemble or publish to agent.chat.request.
5. MongoDB write failure to zoey_detail_log — non-fatal but detail logs are lost. Watch for mongo write errors.
6. Neo4j unreachable — graceful empty context (no graph data). Not fatal but response quality degrades.
7. Redis inactivity scanner blocking — session buffer operations taking too long. Performance issue, not hard failure.
8. Observe gate false positive — rpe-synthesizer returns "observe" for a message that should get a response. Check synthesizer LLM template and confidence values.
FIRST CHECKS:
- Check all 5 analysis service health endpoints simultaneously.
- RabbitMQ: rpe.assemble queue depth and consumer count (should be 1).
- Is rpe-synthesizer responding? GET http://rpe-synthesizer:3607/health
- Is agent-tools responding? GET http://agent-tools:3502/health (or whatever the execute endpoint port is)
- Check zoey_detail_log in MongoDB for the specific request_id — contains full intermediate state.
DEPLOY TYPE: image-copy. Changes require rebuild + up -d.
RELATIONSHIP BLOCK (P1.7) FAILURE MODES (added 2026-05-29):
9. botScopeUuid null — bots.scope_uuid not populated (migration 016 not run) or channel has no bot_id. Layer 2 skipped. Error: RELATIONSHIP_BLOCK_NO_BOT_UUID.
10. userScopeUuid null — loadUserScopeData returned null for the active user. Block renders in degraded mode. Error: RELATIONSHIP_BLOCK_NO_SCOPE_UUID.
11. context_modifier key missing — key referenced in channels.context_modifier or relationship_members.context_modifier does not exist in prompt_modifiers (context=all). That prose block omitted; rest of block continues.
12. relationship_members all-null pairs — every pair in the relationship has both notes=null AND context_modifier=null. buildRelationshipBlock returns null for Layer 2. If channels.relationship_id is set this fires RELATIONSHIP_BLOCK_EMPTY_WITH_REL_ID.
13. Channel not found — channel row inactive or telegram_channel_id mismatch. buildRelationshipBlock returns null immediately. Check zoey_core.channels.is_active.