Skip to content

chore(clickhouse): sanity-check ai_events convergence gate (expected fail)#67446

Closed
orian wants to merge 1 commit into
masterfrom
pawel/chore/gate-drift-check
Closed

chore(clickhouse): sanity-check ai_events convergence gate (expected fail)#67446
orian wants to merge 1 commit into
masterfrom
pawel/chore/gate-drift-check

Conversation

@orian

@orian orian commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Deliberate negative test of the merged convergence gate (#67134, #67281): prove the multinode smoke fails when a migration drifts a managed cluster from its HCL golden.

Changes

  • Migration 0285 adds a column to sharded_ai_events on NodeRole.AI_EVENTS, with no matching posthog/clickhouse/hcl/ change.

Expected outcome: ci-clickhouse-multinode-migrations fails at the check_live_hcl step with DRIFT: local/ai_events … ALTER table posthog.sharded_ai_events. Not for merge — will be closed.

How did you test this code?

I'm an agent. Reproduced locally against the running multinode stack via the pinned hclexp container: with the ALTER applied, check-live (enforcing) reports the single sharded_ai_events drift and exits non-zero; ops stays clean. This PR is to confirm the same failure in real CI.

🤖 Agent context

Autonomy: Human-driven (agent-assisted). Sanity check requested to validate the enforcing gate end to end. Migration-only; to be closed once CI shows red.

…to fail CI)

Deliberate negative test: ALTER sharded_ai_events to add a column on
NodeRole.AI_EVENTS, with NO matching HCL golden change. The multinode smoke's
convergence gate should introspect the ai_events node, see the extra column
against golden/local-ai_events.hcl, and fail check-live. Not for merge.
@orian orian self-assigned this Jul 1, 2026
@orian orian requested a review from a team July 1, 2026 15:38
@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore(clickhouse): sanity-check ai_event..." | Re-trigger Greptile

@@ -1 +1 @@
0284_message_assets
0285_ai_events_gate_drift_check No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The file is missing a trailing newline after the update. The previous value (0284_message_assets) had one, and most text files in the repo follow the same convention — some tooling also expects it.

Suggested change
0285_ai_events_gate_drift_check
0285_ai_events_gate_drift_check

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

ClickHouse migration SQL per cloud environment

  • unset
    • all
      ALTER TABLE sharded_ai_events ADD COLUMN IF NOT EXISTS gate_drift_sanity_check UInt8 DEFAULT 0
  • US, EU, DEV
    • ai_events
      ALTER TABLE sharded_ai_events ADD COLUMN IF NOT EXISTS gate_drift_sanity_check UInt8 DEFAULT 0

@orian

orian commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Sanity check complete ✅ — the multinode smoke failed exactly as intended: migration 0285 altered sharded_ai_events with no HCL change, and the convergence gate caught it (DRIFT: local/ai_events … ALTER table posthog.sharded_ai_events, stage check_live_hcl, exit 1). Closing — this was only to validate the enforcing gate.

@orian orian closed this Jul 1, 2026
@orian orian deleted the pawel/chore/gate-drift-check branch July 1, 2026 16:01
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.

2 participants