Skip to content

Commit 1ef4e3b

Browse files
committed
chore(clickhouse): bring the AI_EVENTS satellite under declarative HCL
Model the AI_EVENTS role in posthog/clickhouse/hcl/ (the third managed role after OPS and LOGS), so its schema is captured declaratively and check.sh validates it. Env layering follows the actual topology: local/hobby run the MSK ingest variant (kafka_ai_events_json + ai_events_json_mv), US/EU run WarpStream (kafka_ai_events_json_ws + ai_events_json_ws_mv, MSK dropped by migration 0248), and prod-eu additionally carries sharded_ai_events. person/person_distinct_id2 are Distributed shims (0240) owned by the person domain and left unmanaged. dev composes only the shared objects (per the current dump). Goldens are generated from the layers; the local golden was verified against a live multinode ai_events node (introspect + diff = no drift beyond the known out-of-band set). prod-us/prod-eu goldens are authored from the captured prod dumps.
1 parent 6eff786 commit 1ef4e3b

12 files changed

Lines changed: 8218 additions & 1 deletion

File tree

posthog/clickhouse/hcl/golden/dev-ai_events.hcl

Lines changed: 729 additions & 0 deletions
Large diffs are not rendered by default.

posthog/clickhouse/hcl/golden/local-ai_events.hcl

Lines changed: 1465 additions & 0 deletions
Large diffs are not rendered by default.

posthog/clickhouse/hcl/golden/prod-eu-ai_events.hcl

Lines changed: 1525 additions & 0 deletions
Large diffs are not rendered by default.

posthog/clickhouse/hcl/golden/prod-us-ai_events.hcl

Lines changed: 1279 additions & 0 deletions
Large diffs are not rendered by default.

posthog/clickhouse/hcl/nodes

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,18 @@ dev logs roles/shared roles/logs/shared roles/logs/dev
3333
prod-us logs roles/shared roles/logs/shared roles/logs/prod-us
3434
prod-eu logs roles/shared roles/logs/shared roles/logs/prod-eu
3535

36+
# AI_EVENTS satellite (LLM analytics). Ingest objects differ by env: local/hobby
37+
# run the MSK variant (kafka_ai_events_json + ai_events_json_mv), US/EU run the
38+
# WarpStream variant (kafka_ai_events_json_ws + ai_events_json_ws_mv, MSK dropped
39+
# by migration 0248). person/person_distinct_id2 are Distributed shims (0240),
40+
# owned by the person domain and excluded from the managed set. dev currently has
41+
# only the shared objects (per the latest dump).
42+
local ai_events roles/shared roles/ai_events/local
43+
dev ai_events roles/shared
44+
prod-us ai_events roles/shared roles/ai_events/prod
45+
prod-eu ai_events roles/shared roles/ai_events/prod roles/ai_events/prod-eu
46+
3647
# prod-us data roles/shared roles/data/shared roles/data/prod-us
3748
# prod-us endpoints roles/shared
3849
# prod-us aux roles/shared
39-
# prod-us ai_events roles/shared
4050
# prod-us sessions roles/shared

0 commit comments

Comments
 (0)