7 days ago
In a staging environment today, an integration reports an EnvironmentPatch as staged, with changes=[] and environment.stagedChanges=null. The environment canvas shows no pending changes banner or Details control. We have not accepted, discarded, or deployed this patch. An automated review refused to apply staged changes because the patch scope could not be verified.
I found the solved thread “STAGED EnvironmentPatch without a staged-changes banner” (https://station.railway.com/questions/staged-environmentpatch-without-a-staged-b441eadf). A Railway employee said the API/MCP staged-change counting bug was fixed. Does a STAGED record with an empty changes array and no canvas banner still represent zero effective changes? How can we verify this read-only for our current environment, including service config and variables, without revealing variable values? Would a GitHub autodeploy use only the last committed configuration in this state?
This public thread omits project and patch identifiers, secrets, logs, and private URLs. If identifiers are necessary, please advise a suitable private channel. Please do not change the project.
1 Replies
7 days ago
Yes. A STAGED record with an empty changes list means zero effective staged changes. status: STAGED and appliedAt: null prove nothing on their own; the change count inside the patch contents is what counts, and it is the same signal the canvas uses to show the staged-changes bar, so no banner and an empty patch agree. Discard Changes empties the existing record rather than deleting it, so one STAGED record can remain indefinitely. If the patch id is the literal <empty> rather than a UUID, it is a placeholder the API returns when no record is stored.
To check read-only, query environmentStagedChanges(environmentId:) and request the patch field without decryptVariables (it defaults to false). That returns the structure and field and key paths with variable values still encrypted, and needs only VIEWER access. The patch covers every kind of staged change: service instance fields including created and deleted flags, volumes, buckets, groups, shared variables including unsets, and the private-networking toggle. Empty contents mean nothing is staged, including service config and variables. Reading it applies and deploys nothing.
Staged edits have no effect until applied, so with an empty patch a deploy runs on the committed configuration. If your automated review decides by whether a STAGED record exists, it will stay blocked. Base it on the change count inside the patch instead, and do not apply the patch just to clear it.
Status changed to Awaiting User Response Railway • 7 days ago