decision(ops): hold a production build until its migrations are applied
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- nextjs, supabase, typescript
- 領域
- databases, devops, documentation
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 13
- フォーク
- 2
- 平均マージ
- 5時間 20分
- マージ済み PR(30日)
- 287
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eddiejaoude/StackDash のほかの issue
-
area: integrations documentation priority: P2 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eddiejaoude/StackDash#798 ·
メンテナーはふだん 1 日以内に返信
-
area: ops documentation priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
eddiejaoude/StackDash#796 ·
メンテナーはふだん 1 日以内に返信
-
area: docs documentation impact: low priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
eddiejaoude/StackDash#790 ·
メンテナーはふだん 1 日以内に返信
-
area: ops bug impact: low priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
eddiejaoude/StackDash#785 ·
メンテナーはふだん 1 日以内に返信
-
area: connections enhancement impact: low priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
eddiejaoude/StackDash#768 ·
メンテナーはふだん 1 日以内に返信
eddiejaoude/StackDash の issue をすべて見る
似ている issue
-
bot:ai-assisted component:midnight-js status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
midnightntwrk/midnight-js#1790 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area:vscode bug has repro platform:macos platform:vscode regression
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDオープンcheck:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
effort/l priority/p1 risk/high triage/core
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
iflytek/skillhub#1188 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信