fix(emergency-pat): dual-driver like src/db — works on self-hosted Postgres #5518
ccantynzAI Reviewcommented 10d ago
AI Triage
(no summary)
Priority: medium Risk area: mixed
Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)
Suggestions only — nothing has been applied. The PR author stays in control.
gluecron[bot]🤖 botAI Reviewcommented 10d ago
AI review unavailable
The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Why Craig's on-box mint failed
scripts/emergency-pat.tshardcoded the Neon HTTP driver — on the Vapron box's localhost Postgres it builthttps://localhost/sqland died with an inscrutableConnectionRefused. The app's own db layer has had dual-driver auto-detection since 2026-08-19; the script predates it and was only ever run against production Neon.isNeonUrlrule assrc/db:*.neon.tech→ neon-http, everything else → postgres.js TCP. Queries unchanged (both drivers are tagged templates returning row arrays).APP_BASE_URL) — the wrong-instance trap is the entire reason anyone reaches for this script.Typecheck clean.
🤖 Generated with Claude Code