Verify context_modifier keys exist in prompt_modifiers for all active channels

Type: sql Component: rpe-context-assembler Tags: channels,context-modifier,prompt-modifiers,p1.7,data-integrity Assertion: exact_match Last result:
Validates

Detects dangling context_modifier references that would fire "context_modifier key not found in prompt_modifiers" WARN at runtime. Run after adding a new context_modifier value to channels.

Expected Output
Zero rows returned. All context_modifier keys referenced by active channels exist in prompt_modifiers.
Script
SELECT c.telegram_channel_id, c.channel_name, c.context_modifier,
       pm.modifier_name AS found_in_prompt_modifiers
FROM zoey_core.channels c
LEFT JOIN telegram_system.prompt_modifiers pm
  ON pm.modifier_name = c.context_modifier AND pm.context = 'all'
WHERE c.context_modifier IS NOT NULL AND c.is_active = 1 AND pm.modifier_name IS NULL
ORDER BY c.telegram_channel_id;
Run Tool

Run History

No runs yet