Repository navigation
refactor: remove the remaining Supabase code paths; Turso is the only remote store - #12156
Conversation
… remote store The Supabase project (muse-dev2) is deleted and live services already run on Turso. This removes what could still reach it: - pm-aggregator: drop the `supabase` store backend and the Supabase Management-API client; shared SQL helpers move to src/sql-client.ts and the remote stores are named for Turso. Remove the Supabase usage-export overlay and the migrate-stores-to-supabase script. install.sh now writes PM_AGG_STORE_BACKEND=turso. - Remove pm-stack/supabase-export (quota exporter for the deleted project) and its CI step and registry entry. - fleet-queue: the queue broker is Turso-only; an unset QUEUE_BROKER_BACKEND means turso, any other value exits 3. Delete supabase-exec.py. - Backups: drop the laptop-backups `supabase` option, the disabled supabase-turso-coord-mirror module, the Supabase export in pm-dashboard-backup, cold-store's backup-supabase, and agent-backup's Postgres-only scripts. - Trim stale Supabase comments elsewhere to the current state. Kept on purpose: the R2 bucket name `supabase-backups` (live backups write there), vendor-name data in the aggregator, dated docs and SQL migrations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be0d2b9f34
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # DB-backup class (DESIGN.md section 5): nightly dumps live unbundled under | ||
| # db-backups/<db>/, one subfolder per database. | ||
| BACKUP_DBS = ("supabase", "turso", "d1") | ||
| BACKUP_DBS = ("turso", "d1") |
There was a problem hiding this comment.
Preserve access to historical backup families
On installations with existing db-backups/supabase/ filings in Google Drive, removing this family from BACKUP_DBS disables retrieval of those historical dumps: both the CLI parser and get_backup() reject the family before reading Drive. It also hides those backups from default listings and excludes them from nightly retention. Retiring Supabase ingestion does not require disabling access to already-created backups; retain the legacy family for retrieval and retention without restoring any Supabase connection code.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fair point. Removing supabase from BACKUP_DBS has two effects on the dumps already filed under db-backups/supabase/ in Drive:
- the tool can no longer list or retrieve them;
- nightly retention no longer prunes them.
Nothing is deleted. The files are still in Drive and can be fetched there directly.
This is marked optional, so I'm not pushing for it alone. If this PR gets another push, I'll add supabase back as a read-only legacy family covering list, get and prune, with no Supabase connection code.
Generated by Claude Code
There was a problem hiding this comment.
Addressed in 4041b68. supabase is back as a read-only legacy family (LEGACY_BACKUP_DBS): list-backups, get-backup and prune-backups still see db-backups/supabase/ when it exists. put-backup rejects it, and ensure-folders finds the folder but never creates it. Two new tests cover a fresh install and an install with old dumps. The cold-store suite passes (204 tests).
Generated by Claude Code
Merge origin/main into the Supabase removal branch (one conflict in collect-fleet-feed.ts: main's project-board code kept, AA wording moved to Turso). Supabase stays a read-only legacy backup family: list-backups, get-backup and prune-backups still see db-backups/supabase/ where it exists, so old dumps stay retrievable and under retention. Nothing new is filed there and fresh installs never create the folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before: the Supabase project (muse-dev2) is deleted and every live service already runs on Turso, but the repo still carried code that could reach Supabase. That included a selectable
supabasebackend in the aggregator and the queue broker, a quota exporter for the deleted project, backup paths and options, a disabled mirror module, and Postgres-only helper scripts. Setting the wrong env var would point a service back at a host that no longer exists.After: nothing in the repo can talk to Supabase, and Turso is the only remote store.
Owner's request: "fix all uses of supabase".
What changed
PM_AGG_STORE_BACKENDaccepts onlyfileorturso.src/supabase.tsis deleted. The SQL helpers moved tosrc/sql-client.ts, and the remote stores are renamed for Turso. The SQL itself is unchanged.scripts/migrate-stores-to-supabase.ts.install.shnow writesPM_AGG_STORE_BACKEND=turso. It used to writesupabase, which would have failed at startup.QUEUE_BROKER_BACKENDunset means turso; any other value exits 3. The deployed unit already setsturso.supabase-exec.py.supabaseoption, the disabledsupabase-turso-coord-mirrormodule, the Supabase export inpm-dashboard-backup.sh(its opt-out is renamedPM_AGG_STORE_EXPORT), cold-store'sbackup-supabase, and agent-backup's Postgres-only scripts.Kept on purpose
supabase-backups, because live backups still write there. Renaming it is an infrastructure change.prune_m1.sql's keep-list.supabase.muse-dev2.*entries insecrets/sops/common/bws.yaml. Removing them is a secrets change and is left for the owner.Tests
cd pm-stack/aggregator && bun testbunx tsc --noEmitcd pm-stack/dispatch && bun testcargo test -p fleet-queue -p fleet-secrets --all-featurespytestpytesttest-backup.shnixos/home/*.test.sh: the manifest test now passes. The copy test still has the same 4 failures it had before this change; they come from running as root.bash -nandnix-instantiate --parsepass on every shell and Nix file touched.Checked live
On the laptop,
pm-aggregatorandpm-dashboard-backupalready run withPM_AGG_STORE_BACKEND=turso. The user journal shows no service reaching Supabase since the 2026-11-20 dispatch restart.Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.