Skip to content

Add IT_PING to real-time event schema validation#12

Open
gianlaferla wants to merge 2 commits intomainfrom
fix/add-it-ping-schema-validation
Open

Add IT_PING to real-time event schema validation#12
gianlaferla wants to merge 2 commits intomainfrom
fix/add-it-ping-schema-validation

Conversation

@gianlaferla
Copy link

Summary

  • Adds it_ping to the list of recognized notification types in the schema validator
  • Creates the corresponding JSON schema file for IT_PING events with the required fields: ping_id, user_id, timestamp, origin

Problem

When ENABLE_EVENT_SCHEMA_VALIDATION is enabled on crm-integration-consumer, IT_PING messages are rejected with "invalid payload type it_ping" because the type is not in getNotificationTypes(). This error is fatal (log.Fatalf) and crashes the consumer pod. Since the message is not acked before the crash, RabbitMQ redelivers it to the next pod — creating a poison-pill loop that crashes all consumer replicas.

Impact observed in production (eu2):

  • softgenius namespace: 8,090 errors since Feb 5 (redelivery loop)
  • kirgo namespace: 3,197 errors since Feb 10
  • sefiarray namespace: 2,283 errors starting Feb 12 (~760/hour and accelerating)

Test plan

  • go test ./pkg/validator/... passes
  • Verify consumer pods no longer crash on IT_PING messages after updating the dependency

🤖 Generated with Claude Code

gianlaferla and others added 2 commits February 12, 2026 18:19
The IT_PING message type was missing from the list of recognized
notification types in the schema validator. When event schema
validation is enabled on the crm-integration-consumer, IT_PING
messages cause a fatal error ("invalid payload type it_ping")
which crashes the consumer pods and triggers a poison-pill
redelivery loop across all replicas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests cover valid payloads (both uppercase and lowercase type),
missing required fields, and invalid field types using the real
embedded schema via NewClient().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant