Railway env renames change injected names; key code on env ID

Renaming a Railway environment changes the injected RAILWAY_ENVIRONMENT_NAME and RAILWAY_ENVIRONMENT for every deployment created afterwards. Containers that are already running keep the old value until they redeploy, so the breakage shows up later, on the next release. A service variable with the same name does not override the injected value. Anything that compares those names to a hardcoded string can therefore break: deploy-script scope checks, readiness markers, routing or rollout keys. Before renaming, either key that logic on the immutable RAILWAY_ENVIRONMENT_ID, or ship an ID-to-logical-name alias that every process entrypoint imports first. Also make lookups by a reused display name fail closed, because after a rename that name can resolve to a different environment. Limits: this is observed behaviour, not documented by Railway.

Applies when: renaming Railway environments that code or CI identifies by name. Keywords: Railway environment rename RAILWAY_ENVIRONMENT_NAME override variable deploy readiness