You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite. Learn more
This PR simplifies getRivetkitRuntimeMode to a single env-var check and removes the force_normal_runner_config_upsert footgun that caused runner config upserts against remote engine endpoints.
Breaking Change — NODE_ENV=production No Longer Implies Serverless
The new behavior is simply: serverless if RIVETKIT_RUNTIME_MODE === "serverless", otherwise envoy.
Production deployments that relied on NODE_ENV=production to automatically select serverless mode will now silently get envoy mode — a behavioral regression. This is the most significant concern in the PR. At minimum, a migration note in the docs or a startup warning should call this out for existing users.
The Railway detection removal (RAILWAY_DEPLOYMENT_ID) is a non-issue in practice since envoy is the new default anyway.
Naming Improvement — ✓
Renaming ensure_normal_runner_config to ensure_local_normal_runner_config is accurate and communicates the intent well. The old name was misleading because "normal" does not convey the local-only scope.
force_normal_runner_config_upsert Removal — ✓
Removing the field is the right call. It was a footgun: a mode flag that could override the local-endpoint guard and cause runner config upserts against remote engines. The simplified ensure_local_normal_runner_config is correct — runner config should only be upserted when talking to a local engine.
Minor: Log message wording
runner_config.rs:73 — "ensured local normal runner config" is slightly awkward. "ensured local runner config" (dropping "normal") reads more cleanly. Nitpick only.
Tests — ✓
The test cleanup in listener.test.ts correctly reflects the new simplified logic. Each test case maps cleanly to a branch of the new one-liner. Snapshot scope is appropriately narrowed to just the one env var that matters.
Docs — partial
The docs update correctly removes RAILWAY_DEPLOYMENT_ID. It should also note that the production default changed: previously NODE_ENV=production implied serverless; now RIVETKIT_RUNTIME_MODE=serverless must be set explicitly. Users migrating from the old behavior currently have no signal from the docs that their config needs updating.
Verdict
The removal of force_normal_runner_config_upsert and the function rename are clean improvements. The main concern is the silent behavioral change for production deployments that relied on NODE_ENV=production → serverless auto-detection. That warrants a deprecation note, a startup warning, or at minimum a prominent changelog entry before this merges.
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
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.
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: