fix: restore database connectivity and streamline work processing - #176
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Production deployments were failing before migrations because the database driver did not trust Supabase's certificate. Use Supabase's root certificate with verification enabled, and use the same
pgdriver and connection settings for runtime, migrations, account setup, and cron configuration.Reduce work projection overhead while preserving PR attribution, separate branches, force-push handling, frozen history, and refresh timing:
Validation: 304 tests, typecheck, lint, both Knip modes, and production build passed. A historical database comparison produced identical evidence and all 334 work items across 1,375 commits and 401 branches; all 305 repository scopes also matched. Checked inactive/irrelevant branches, stale heads/lineages, empty generations, membership ordering, null/empty file facts, retention, and metadata updates. All 120 previously sampled saved snapshots remained unchanged. Fresh database, upgrade, repeat migration, and generated-column update checks passed; Drizzle reports no schema drift.
On that local historical copy, base projection reads fell from ten to eight. PostgreSQL response bytes fell from 5.35 MB to 4.75 MB (~11%), measured at the connection in three identical runs. The compact-statistics read improved from ~414 ms to ~32 ms. The generated column added ~1.9 MB to the original 79 MB commit table. These are query-level measurements, not a monthly egress guarantee. The generated migration briefly locks/rewrites the commit table; no tables or evidence are removed.
Ran the actual migration and setup scripts against disposable PostgreSQL with real cron and Vault extensions. Verified repeated/concurrent cron configuration, removal of disabled/old jobs, full rollback on injected failure, account reauthorization/history retention, identity and active-sync rejection, and atomic credential updates. Removed unused cron job-ID bookkeeping and the redundant connection wrapper.
The latest build connected to the local historical database successfully; unrelated public GitHub embed requests returned 403 and used their existing fallback. Verified read-only Supabase connections separately under Bun and Node, including certificate validation. No production migrations or deployment were run manually.