fix(ingestion): ai_dev_usage placeholder missing cost_cents / PR-attribution columns — E2E red on main since Jun 4 - #1289
Conversation
…ge placeholder Migration 20260601000000_ai-claude-team-metrics.sql creates a gold view selecting c.cost_cents, c.prs_with_cc_count and c.prs_total_count from silver.class_ai_dev_usage, but the bootstrap placeholder for that table was not extended when those columns were added to the dbt model. On a fresh cluster (and in the e2e rig, which applies placeholders + migrations from scratch) ClickHouse validates the CREATE VIEW SELECT and fails with `Code: 47 UNKNOWN_IDENTIFIER: 'c.cost_cents'`, aborting all migrations — this is why the E2E suite on main has been red since 2026-06-04. Add the three columns as Nullable(UInt32), matching the connector staging models (claude_team__ai_dev_usage et al.). The placeholder is dropped and replaced by dbt with the real schema on the first run, so minimum-viable parity with the migrations is all that is required. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: insight-ci <ci@cyberfabric.local>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR updates the bronze placeholder schema script to extend the ChangesPlaceholder Schema Extension
🎯 2 (Simple) | ⏱️ ~5 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Folding this into #1287 per review — the e2e-fix PR needs it anyway to go green. |
Problem
The E2E suite (
E2E — Bronze to API) has been failing onmainsince 2026-06-04 (last 4 runs red). Root cause:20260601000000_ai-claude-team-metrics.sqlcreates a gold view selectingc.cost_cents,c.prs_with_cc_count,c.prs_total_countfromsilver.class_ai_dev_usage.scripts/create-bronze-placeholders.shwas not extended.CREATE VIEWSELECT against the placeholder and aborts:All subsequent migrations are skipped, so the whole session setup collapses and every e2e test errors.
Fix
Add the three columns to the
class_ai_dev_usageplaceholder asNullable(UInt32)— matching the connector staging models (claude_team__ai_dev_usage,claude_enterprise__ai_dev_usage,cursor__ai_dev_usage,copilot__ai_dev_usageall emit them asNullable(UInt32)). The placeholder is dropped and replaced by dbt with the real schema on first run; minimum-viable parity with the migrations is all that's needed.Verified the migration references nothing else that's missing: it reads only
silver.class_ai_dev_usage(all 12 referenced columns now covered) andinsight.people.Note
This is another instance of the "schema updated in one place, forgotten in another" drift class — same family as cross-connector silver drift. A follow-up PR will propose a contract/parity gate for exactly this.
🤖 Generated with Claude Code
Summary by CodeRabbit