8f55949b11
Implement telemetry schema, adapter, and pipeline integration for FedMart real-time monitoring of XIC symbolic pipeline execution. ## Components ### Telemetry Schema (integrations/fedmart/telemetry_schema.json) - JSON schema defining XIC telemetry event structure - Required fields: event_type, timestamp, run_id, glyph_count, etc. - Optional: metadata, raw_payload for detailed analysis - Supports multi-glyph resonance summaries and guardrail events ### FedMart Adapter (integrations/fedmart/xic_adapter.py) - FedMartAdapter class for telemetry emission and spec registration - emit_telemetry(): normalize and forward telemetry events - register_spec_map(): push XIC specification status - Control hooks: pause_run(), throttle_run() for guardrail actions - Local mode (buffering) and remote mode (HTTP POST) - Global singleton instance via get_adapter() ### Pipeline Integration (glyphos/symbolic_pipeline.py) - Emit telemetry at end of run_symbolic_pipeline() - Captures: glyph_ids, resonance scores, execution steps, guardrails - Builds resonance_map_summary with top glyphs and averages - Optional import (graceful degradation if FedMart not available) ### Validation Suite (tests/validate_fedmart_integration.py) - 12 comprehensive tests covering all adapter functions - Tests: telemetry emission, normalization, spec registration - Tests: control actions, buffer operations, schema compliance - Tests: multi-glyph resonance tracking, guardrail event capture - All 12 tests passing ✅ ## Key Features ✅ Telemetry normalization (timestamp ISO 8601, run_id generation) ✅ Multi-glyph resonance summaries (top 5 glyphs, average resonance) ✅ Guardrail event tracking (truncation, max steps, etc.) ✅ Spec map registration for specification tracking ✅ Control actions (pause/throttle for guardrail responses) ✅ Local mode for testing, remote mode for production ✅ Schema compliance validation ✅ Graceful degradation if FedMart not available ## Testing All 12 validation tests passing: ✅ Schema validation ✅ Adapter initialization ✅ Telemetry emission (local mode) ✅ Normalization with defaults ✅ Spec map registration ✅ Control actions ✅ Pipeline telemetry integration ✅ Guardrail event capture ✅ Multi-glyph resonance tracking ✅ Buffer operations ✅ Schema compliance ✅ Empty buffer handling ## Next Steps Phase 2: UI Visualization - real-time dashboard for FedMart Phase 3: XIC v2 Control Flow - IF, MATCH, LOOP operations Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>