rpe-context-assembler

Section: section5-rpe Subsystem: telegram-services_v2 Port: Deploy type: image-copy Compose: telegram-services_v2/phase2-section5-rpe/docker-compose.yml
Fragile: IMAGE-COPY — requires build + up -d. Loads KnownPersons scoped to the CURRENT SPEAKER's UserProfile — not the channel owner. Historical bug: was fetching channel owner's KnownPersons instead (Laura identity bug 2026-04-18).
Description

RPE context assembly service

Role

Assembles relational context (KnownPersons, UserProfile, channel history) for each incoming message

Dependencies

hard rabbitmq (prysm-store)
hard agent-tools (section4.5-agent)
hard rpe-classifier (section5-rpe)
hard rpe-dynamics (section5-rpe)
hard rpe-extractor (section5-rpe)
hard rpe-intent (section5-rpe)
hard rpe-sentiment (section5-rpe)
hard rpe-synthesizer (section5-rpe)
soft neo4j (prysm-store)

Runbooks

Diagnose missing botScopeUuid in rpe-context-assembler (Layer 2 skipped) data-quality
Diagnose missing prompt_modifier key for relationship context block data-quality
Diagnose missing userScopeUuid in rpe-context-assembler (degraded render) data-quality

Behavioral Assertions

rpe.assemble queue has exactly 1 consumer
Input: Normal operating state
Expected: RabbitMQ management API: queue rpe.assemble consumer_count = 1
Analysis fanout completes within 30 seconds (all 5 analysis services respond)
Input: DM message processed through full RPE pipeline
Expected: Time between request.dispatched (fanout) and request.dispatched (to agent-brain) < 30s

Diagnostic Tools

Check Redis relationship block cache for a channel bash
Check relationship_members for NULL scope_uuids sql
Verify bots table has scope_uuid for all rows sql
Verify context_modifier keys exist in prompt_modifiers for all active channels sql

Recent Issues

#TitleSeverityStatusCreated
#657[rpe-context-assembler] NET_SYNTHESIZER_TIMEOUTmediumopen6/1/2026
#2Laura identity bug — rpe-context-assembler loaded wrong UserProfile KnownPersonshighresolved4/18/2026