Repository navigation
chore: declare the API's env in Railway IaC, and release 0.0.3 - #48
Closed
maxigimenez wants to merge 1 commit into
Closed
maxigimenez wants to merge 1 commit into
maxigimenez wants to merge 1 commit into
Conversation
`SENTINEL0_SECRET_KEY` was documented as something to set on the Railway dashboard, and `.railway/railway.ts` was left declaring only `DATABASE_URL` -- so `railway config plan` showed the key as a *removal*, and an apply would have deleted it. Since that key is what decrypts every stored tracker credential, the next apply would have made all of them unreadable, and the shape of the failure is that the deploy succeeds and the Integrations screen starts throwing instead. A service's `env` is reconciled rather than merged: a variable set outside this file and absent from it is removed. That is not specific to the new key -- `DASHBOARD_URL`, `CORS_ORIGINS`, `LOG_LEVEL`, `DATABASE_POOL_MAX`, `DATABASE_SSL` and `SLACK_WEBHOOK_HOST` were all one apply away from the same deletion, silently, because nothing reads them until the moment they matter. So every variable the api service reads is now declared with `preserve()`. A declared name that is not set yet is a no-op, while an undeclared one is a deletion waiting to happen, which makes declaring the full set strictly safer than declaring the ones that happen to be in use today. `PORT` stays out: it is injected by Railway rather than configured. `pnpm railway:plan` reads clean again. The version goes to 0.0.3 across the workspace and the cli's internal `@sentinel0/*` pins, with the lockfile regenerated to record them. Stale version numbers in the docs move with it: the sample `/health` output in api.md and deploy-cloud.md said 0.0.1, releasing.md packed a 0.0.1 tarball, and both it and publish-cli.yml used 0.0.2 as their "next release" example, which is now 0.0.4. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V2EALFY5U8TCSXHMTnUmra
maxigimenez
force-pushed
the
chore/railway-secret-key-and-0.1.0
branch
from
September 7, 2026 07:42
d000092 to
e77dac0
Compare
Owner
Author
|
Superseded by #49 — this one was auto-closed when the branch was renamed from |
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.
You were right — #47 documented setting
SENTINEL0_SECRET_KEYon Railway but left.railway/railway.tsdeclaring onlyDATABASE_URL, sorailway config planshowed the key as a removal.That was worse than a plan-noise problem. The key is what decrypts every stored tracker credential, so an apply would have deleted it and made all of them unreadable — and the failure shape is that the deploy succeeds and the Integrations screen starts throwing.
The actual scope
envis reconciled, not merged: a variable set outside this file and absent from it is removed. That was never specific to the new key. Every one of these was onerailway config applyaway from the same silent deletion:DASHBOARD_URL·CORS_ORIGINS·LOG_LEVEL·DATABASE_POOL_MAX·DATABASE_SSL·SLACK_WEBHOOK_HOSTSo all of them are now declared with
preserve(), alongsideSENTINEL0_SECRET_KEY. A declared name that isn't set yet is a no-op; an undeclared one is a deletion waiting to happen — which makes declaring the full set strictly safer than declaring only what happens to be in use today.PORTstays undeclared: Railway injects it rather than it being configured.pnpm railway:plannow reports "Your Railway configuration is already up to date." — verified against the live project, which also confirms nothing else had drifted.The trap is written down in
CLAUDE.mdanddocs/deploy-cloud.md, since it will bite the next variable otherwise.Release 0.0.3
pnpm version:set 0.0.3across the root, all five packages, and the cli's internal@sentinel0/*pins, with the lockfile regenerated to record them.Stale version numbers move with it: the sample
/healthoutput inapi.mdanddeploy-cloud.mdsaid0.0.1,releasing.mdinstalled a0.0.1tarball, and both it andpublish-cli.ymlused0.0.2as their "next release" example — now0.0.4.Publishing is still
workflow_dispatch, so this bumps the numbers and ships nothing on its own.Verification
pnpm build,pnpm lint,pnpm test— 526 tests pass.railway.tstypechecks, andrailway:planis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01V2EALFY5U8TCSXHMTnUmra