fix(web): restore Snowflake usage analytics - #5656
Merged
Merged
Conversation
iscekic
approved these changes
Aug 28, 2026
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Reviewed by grok-4.6 · Input: 222.3K · Output: 24.6K · Cached: 1M Review guidance: REVIEW.md from base branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
d83bf8e687d161e8bb0955b110ed986e049ca64b) to restore Snowflake-backed personal and organization Usage summaries, timeseries, breakdowns, and tables.SUM(user_byok_request_count), preserving the current user-provided-key definition rather than reverting to upstream/managed-provider BYOK counts.Warehouse contract checked
Current dbt source has separate
byok_request_countanduser_byok_request_countaggregates in both models:This confirms the source contract, not the deployed warehouse state or credentials.
Validation
pnpm --filter web test --runInBand --runTestsByPath src/routers/usage-analytics-router.test.ts src/lib/drizzle.test.ts src/lib/ai-gateway/providers/vercel/index.test.ts— 3 suites, 87 tests passed against local test PostgreSQL; Snowflake calls mocked.pnpm --filter web lintpnpm --filter web typecheckpnpm formaton the four changed files andgit diff --checkuser_byok_request_count, and that required data is current.Scope
Only #5229 is reversed. This does not restore leaderboard endpoints deleted by #5233, remove the availability banner, re-enable Snowflake replication alerts, rotate credentials, or change the external replication connector. No production credentials or live Snowflake data were accessed.