Skip to content

fix(deploy): skip Railway rebuilds for non-runtime changes#617

Merged
BigSimmo merged 4 commits into
mainfrom
codex/railway-deploy-filters
Jul 13, 2026
Merged

fix(deploy): skip Railway rebuilds for non-runtime changes#617
BigSimmo merged 4 commits into
mainfrom
codex/railway-deploy-filters

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • add conservative app and worker Railway watch patterns so CI/docs/tests-only commits do not rebuild production
  • make the app's deep /api/health/ready check and both service-specific config files authoritative
  • classify Railway config changes as container-affecting and exercise them in Docker-image PR CI
  • add 30 regression cases for runtime triggers, non-runtime exclusions, and service isolation

Root cause

Both live services had empty watch patterns, and the app still health-checked /. The custom config filenames were not linked into Railway, so every main commit rebuilt both services and dashboard defaults could drift from the tracked files.

Verification

  • npm test -- tests/railway-config.test.ts: 30 passed
  • npm run check:ci-scope: passed
  • npm run check:github-actions: passed
  • focused Prettier and git diff --check: passed
  • npm test: 229 files passed, 1 skipped; 2,178 tests passed, 1 skipped
  • npm run check:production-readiness:ci: READY
  • production readiness with Railway env: 6 passed, READY
  • live reindex health: 2,851 indexed; zero queued/processing/failed jobs
  • live web and worker deployments: SUCCESS/RUNNING
  • production /api/health/ready: HTTP 200

verify:cheap passed through lint, then local typecheck stopped on pre-existing missing installed Sentry/axe packages and stale .next route types. No dependency install or generated-output cleanup was performed; clean hosted CI is expected to provide the definitive typecheck/build.

Production and rollback

The matching service settings were applied to Railway production before this PR. Controlled source redeploys succeeded:

  • app: 7bf87f48-cbea-4408-b6de-04fe8a069113
  • worker: 24aef5e1-0e1d-4031-8290-0f9253763274

No secrets, variables, scaling, migrations, backfills, or production data were changed. Railway retained the prior deployments until both replacements passed.

Summary by CodeRabbit

  • New Features

    • Improved deployment configuration to monitor relevant application and worker files for rebuilds.
    • Added readiness health checks, deployment timeouts, and restart retry limits for greater reliability.
    • Updated worker deployment settings to explicitly use its dedicated Dockerfile.
  • Documentation

    • Clarified deployment, rollout, rollback, and health verification procedures.
  • Tests

    • Added coverage for deployment triggers, service isolation, and health check configuration.

BigSimmo added 2 commits July 14, 2026 01:50
Track per-service watch paths and the deep readiness endpoint, and classify Railway config changes as container-affecting. Verified with focused config tests, CI scope checks, full unit tests, and live Railway health readback.
@supabase

supabase Bot commented Jul 13, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 023b7dcd-538b-4871-9567-06d8d8b40711

📥 Commits

Reviewing files that changed from the base of the PR and between ee43ecf and 435274b.

📒 Files selected for processing (6)
  • .github/workflows/docker-image.yml
  • docs/deployment-architecture.md
  • railway.app.json
  • railway.worker.json
  • scripts/ci-change-scope.mjs
  • tests/railway-config.test.ts

📝 Walkthrough

Walkthrough

Railway app and worker configurations now define build watch patterns and deployment policies. CI detects Railway configuration changes as container changes, tests validate deploy triggers and service isolation, and deployment documentation reflects readiness checks and worker verification.

Changes

Railway deployment configuration

Layer / File(s) Summary
Service configuration and validation
railway.app.json, railway.worker.json, tests/railway-config.test.ts
App and worker watch patterns and deployment settings were added, with tests covering healthchecks, restart policies, deploy triggers, and service isolation.
CI trigger and scope integration
.github/workflows/docker-image.yml, scripts/ci-change-scope.mjs
Pull request filters and container change classification now include both Railway configuration files, with updated self-test coverage.
Deployment guidance
docs/deployment-architecture.md
Documentation now describes the config-as-code settings, readiness healthcheck, service deployment targets, and worker verification procedure.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: dependabot[bot]

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/railway-deploy-filters

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35d4a2657f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread railway.worker.json Outdated
@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

Include the transitive run-tsx startup modules and server-only stub in Railway worker deploy triggers. Verified by 34 focused Railway config tests.
@BigSimmo
BigSimmo enabled auto-merge (squash) July 13, 2026 18:01
@BigSimmo
BigSimmo merged commit f096f09 into main Jul 13, 2026
22 checks passed
@BigSimmo
BigSimmo deleted the codex/railway-deploy-filters branch July 14, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant