decision(ops): hold a production build until its migrations are applied
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- nextjs, supabase, typescript
- Área
- databases, devops, documentation
Línea de trabajo
Read docs/operations/deploy.md, docs/internal/hosted-instance.md, and docs/operations/self-hosting.md to understand the current release steps and document the selected option. Eddie must choose an option first; then update the release order and migration status check in those files. Done means the chosen setting or branch and safe promotion order are documented, and self-hosting guidance no longer implies that a push always promotes automatically.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
Found by the Fable pre-production review on 2026-12-02 (main at cedc1914; every line reference below re-checked on main at cde5aa3b). Sources: platform triage report, new issue 2, and deploy readiness report, new issue 4 (merged here).
The hosted instance's production branch is main (docs/operations/deploy.md:206), so every merge builds a production deployment, and with Vercel's default settings that deployment takes the production domain as soon as it builds. The runbooks assume otherwise: docs/internal/hosted-instance.md:9-11 says to apply new migrations "before the deployment receives traffic", and deploy.md:89 says every release applies migrations "before promoting the matching deployment". That order only holds with Vercel's "Auto-assign Custom Production Domains" turned off, which makes each production build a staged deployment that waits for a manual promote (Vercel docs, "Staging and promoting a production deployment"). No runbook names that setting. docs/operations/self-hosting.md:122 says a push to main builds and promotes.
Expand then contract (deploy.md:89) protects the previous build on a new schema, not a new build on the old schema. main had 52 commits since 2026-11-25, 14 of them touching supabase/migrations/ (git log origin/main --since=2026-11-25).
Impact: every signed-in user after a merge that adds a migration. New code runs on the old schema until Eddie applies the migration; queries against a new column or function fail with errors that users see on every page that reads them. Nothing self-heals until the migration is applied. The signal exists: /app/admin shows "Database migrations: Behind" (src/app/super-admin/page.tsx:76, :199).
This is Eddie's choice, so the options are below. Eddie promotes production; agents never do (hosted-instance.md:25).
| Option | Pros | Cons | Effort | Impact |
|---|---|---|---|---|
Status quo: main builds and goes live on its own |
Nothing to change; one step per release | New code serves before its migration is applied; hosted-instance.md:9-11 and deploy.md:89 describe an order that cannot happen |
XS (nothing) | Every user after a migration merge sees errors until Eddie applies it; the window is as long as Eddie's reaction time |
A. Turn off "Auto-assign Custom Production Domains"; each main build is staged, Eddie runs supabase migration list --remote and migration up --remote, then promotes |
Matches the runbooks as written; no new secret anywhere; a build whose CI failed is simply not promoted | Every release needs a manual promote, even with no migration; a forgotten promote leaves production on the old build (safe, but stale) | XS (docs plus one Vercel setting) | Users never meet a schema mismatch; the cost is release latency, which self-heals at the next promote |
B. Production branch becomes production; Eddie fast-forwards it from main after applying migrations |
Release is a visible git action; previews of main still build |
A second long-lived branch to keep in step; the #461 default-branch and ruleset setup (hosted-instance.md:29-30) needs a second protected branch; still manual |
S (docs, ruleset, Vercel setting) | Same protection as A, with more moving parts that can drift |
| C. A CI job applies migrations on merge before Vercel builds | No manual step | Puts the production database password in GitHub Actions secrets; a migration runs before review of the deploy; CI and the Vercel build race unless ordered; against "agents and automation never promote production" | M (workflow, secrets, ordering) | Fast releases; a bad migration reaches production with nobody watching |
Files each option touches:
| Option | Files |
|---|---|
| Status quo | none |
| A | docs/operations/deploy.md (step 5 and the release paragraph at :89), docs/internal/hosted-instance.md (Promote production), docs/operations/self-hosting.md:122 |
| B | the same docs, plus the repository ruleset and Vercel's production branch setting |
| C | a new workflow under .github/workflows/, repository secrets, the same docs |
Recommendation: A. The deciding argument: it makes the order the runbooks already promise true with one Vercel setting and no new secret, and keeps promotion with Eddie. Second choice: B, if a visible release branch is wanted later.
Plan
- Eddie picks an option on this issue.
- Write the chosen setting into
deploy.mdstep 5 andhosted-instance.md, and the order as: staged build,supabase migration list --remoteandmigration up --remote, then promote. - Name "Database migrations: Behind" on
/app/adminas the signal to check before promoting. - Say that a
maincommit whose CI failed is not promoted.
Acceptance criteria
- The chosen option is recorded on this issue with the reason.
-
deploy.mdstep 5 andhosted-instance.mdname the Vercel setting (or the production branch) and the release order. - A commit with a new migration cannot serve production before
supabase migration list --remoteshows it applied. -
self-hosting.md"Upgrade" no longer says a push tomainpromotes on its own, or says why that is safe for self-hosters. - Playwright e2e: none needed, docs only.
Files and areas
docs/operations/deploy.md, docs/internal/hosted-instance.md, docs/operations/self-hosting.md.
Non-goals: applying migrations, changing Vercel settings (Eddie's), the production address work in #756.
Verification
npm run lint; the docs e2e spec still passes.
Branch: <issue-number>-staged-production-builds
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- Lenguaje dominante
- TypeScript
- Estrellas
- 13
- Forks
- 2
- Merge medio
- 5 h 20 min
- PR fusionados (30 d)
- 287
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de eddiejaoude/StackDash
-
area: integrations documentation priority: P2 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
eddiejaoude/StackDash#798 ·
Los mantenedores suelen responder en 1 día
-
area: ops documentation priority: P3 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
eddiejaoude/StackDash#796 ·
Los mantenedores suelen responder en 1 día
-
area: docs documentation impact: low priority: P3 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
eddiejaoude/StackDash#790 ·
Los mantenedores suelen responder en 1 día
-
area: ops bug impact: low priority: P3 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
eddiejaoude/StackDash#785 ·
Los mantenedores suelen responder en 1 día
-
area: connections enhancement impact: low priority: P3 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
eddiejaoude/StackDash#768 ·
Los mantenedores suelen responder en 1 día
Todos los issues de eddiejaoude/StackDash
Issues similares
-
bot:ai-assisted component:midnight-js status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
midnightntwrk/midnight-js#1790 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
area:vscode bug has repro platform:macos platform:vscode regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDAbiertocheck:passed streams:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
effort/l priority/p1 risk/high triage/core
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
iflytek/skillhub#1188 · 1 comentario ·
Los mantenedores suelen responder en 1 día