feat: gate production on readiness - #10
Merged
Merged
Conversation
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 deploys could start after a failed Prisma migration, the health endpoint did not check its dependencies, and
growthpath-mailhad no always-running PR gate or recovery proof.This makes startup fail closed, turns
/api/healthinto a bounded Postgres and Redis readiness check with the Railway commit SHA, and makes one stable Actions job run for every production PR. The job covers type-checking, all web test suites, and the production Docker build.Railway is already configured with
/api/health, a 300-second health timeout, and the Prisma pre-deploy command. PITR is enabled and a private sibling restore was validated with 25 public tables and 41 migrations before cleanup. No production row data or secrets were emitted.Verification:
actionlint .github/workflows/test-web.ymlsh -n docker/start.shpnpm --filter=web typecheckpnpm test:web:all(202 tests; disposable Postgres and Redis)docker build --file docker/Dockerfile --tag usesend-issue-6:verify .codex review --base origin/growthpath-mail(clean)Deployment effect: merging triggers the production Railway service. There are no new Prisma migrations. The deploy will be the first to exercise the configured pre-deploy migration command and dependency-aware health gate.
Closes #6