Skip to content

fix(web): use configured Snowflake schema for leaderboards - #5669

Merged
pandemicsyn merged 1 commit into
mainfrom
fix-leaderboard-snowflake-schema
Aug 28, 2026
Merged

fix(web): use configured Snowflake schema for leaderboards#5669
pandemicsyn merged 1 commit into
mainfrom
fix-leaderboard-snowflake-schema

Conversation

@pandemicsyn

Copy link
Copy Markdown
Contributor

Summary

  • Remove the legacy kilo_dw.dbt_prod qualification from all three public leaderboard queries.
  • Resolve microdollar_usage_daily and usage_daily through the existing SQL API database/schema context (SNOWFLAKE_DATABASE and SNOWFLAKE_SCHEMA), matching Usage analytics. This allows the current KILO_TRANSITION.KILO_CORE target without hardcoding it in SQL.
  • Add regression coverage for all three routes, verifying unqualified table references and forwarding the resolved configuration.

The endpoints restored by #5660 still targeted the old namespace. This PR is a fresh branch from main and contains no discarded Snowflake diagnostics changes. Response contracts, filters, aggregation semantics, caching, and credentials are unchanged.

Validation

  • Confirmed all three new regression cases fail with the original hardcoded prefixes and pass after the fix.
  • pnpm --filter web test --runInBand --runTestsByPath src/app/api/public/leaderboard-provider-race/route.test.ts src/lib/cached-fetch.test.ts — 14 tests passed.
  • pnpm --filter web lint — passed.
  • pnpm --filter web typecheck — passed, with Rollup external-dependency warnings.
  • Changed files formatted and checked using oxfmt with --ignore-path .gitignore because .prettierignore otherwise excludes API paths named public.
  • git diff --check — passed.

Deployment verification

No live Snowflake queries or environment changes were performed. After deployment, verify all three public endpoints return successful reports and the configured role can read the two rollups in the configured database/schema.

@pandemicsyn
pandemicsyn merged commit 1f81c78 into main Aug 28, 2026
17 checks passed
@pandemicsyn
pandemicsyn deleted the fix-leaderboard-snowflake-schema branch August 28, 2026 20:51
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