chore: remove leftover Supabase code path (FER-11415)#33
Draft
pgragg wants to merge 2 commits into
Draft
Conversation
The agent-score data layer was cut over from Supabase/PostgREST to RDS Postgres (agent_score namespace) and OG images moved from Supabase Storage to S3. This removes the now-dead Supabase scaffolding left behind by that maintenance-window cutover. - Merge the misnamed lib/supabase.ts RDS+S3 shim into lib/scores.ts; drop the dynamic ./supabase self-imports. getScoreBySlug/getAllScores/ upsertScore/deleteScoresByFilter now live alongside the leaderboard helpers and read/write RDS via lib/db.ts. - Repoint app/api/score/route.ts and app/api/score/[jobId]/route.ts at @/lib/scores; OG uploads now import @/lib/og-storage (S3) directly. - Repoint scripts/score-single.ts and scripts/rerun-all.ts at lib/scores. - Delete obsolete one-off Supabase scripts: check-supabase.ts, dedup-supabase.ts, migrate-to-supabase.ts, rescore-to-supabase.ts. - Drop Supabase-as-live-store wording from .env.example and UI/script strings. Preserve scripts/supabase-to-rds-migration/ + RUNBOOK.md. No @supabase/* dependency remained in package.json/lockfile (the migration commit already removed it). lib/categorize.ts keeps "supabase" as a brand token in its cloud-infra regex, and data/*.json keep Supabase as a scored company — both intentional.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
External review of #33 caught that scripts/check-supabase.ts and scripts/dedup-supabase.ts were not obsolete Supabase scripts — they already talk to RDS via lib/db (health-check + dup-cleanup against public.scores) and were only misleadingly named. Restore them and rename to check-scores.ts / dedup-scores.ts (scrubbing the stale Supabase wording) instead of deleting, so the operational tooling is preserved. Genuinely Supabase-writing scripts (migrate-to-supabase.ts, rescore-to-supabase.ts) stay deleted.
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
Cleanup pass after the agent-score Supabase→RDS cutover (FER-11415). The migration repointed the data layer at RDS Postgres (
agent_scorenamespace) and moved OG images to S3, but left the Supabase scaffolding in place. This removes all of it. Code only — no infra/data/AWS/Vercel/Supabase changes, no migration scripts run.Removals & repoints
lib/supabase.tsdeleted. It was a misnamed RDS+S3 shim. Its real functions (ScoreRow,rowToCompany,upsertScore,getScoreBySlug,getAllScores,deleteScoresByFilter) are merged intolib/scores.ts, which now reads/writes RDS directly vialib/db.ts. The dynamicawait import('./supabase')self-imports ingetCompanyWithFallback/getLeaderboardare gone.app/api/score/route.tsandapp/api/score/[jobId]/route.tsimport from@/lib/scores; OG uploads import@/lib/og-storage(S3) directly. Log/comment wording updated off "Supabase".scripts/score-single.tsandscripts/rerun-all.tsnow import fromlib/scores/lib/og-storage.check-supabase.ts,dedup-supabase.ts,migrate-to-supabase.ts,rescore-to-supabase.ts(the last two migrated data to Supabase;migrate-to-supabase.tsalso imported agetLeaderboardSyncthat no longer exists)..env.example,components/ScoreChecker.tsx, and a script spinner label no longer describe Supabase as the live store.Intentionally preserved
scripts/supabase-to-rds-migration/toolkit +RUNBOOK.md(operational history / cutover tooling).lib/categorize.tskeepssupabaseas a brand token in its cloud-infra detection regex.data/scores.json/data/companies.jsonkeep Supabase as a scored company.lib/db.ts.Dependency note
No
@supabase/*entry remained inpackage.jsonorpackage-lock.json— the migration commit already removed it, so there was nothing to uninstall and the lockfile is unchanged.Checks
tsc --noEmit— cleanvitest run— 25/25 passnext lint— ESLint was never configured in this repo (interactive setup prompt); pre-existing, not introduced here.next buildnot run (nice-to-have; typecheck + tests cover the changed modules).