Skip to content

fix(rivetkit): update config to match envoys & remove manager references#4663

Open
NathanFlurry wants to merge 1 commit into04-14-chore_publish_pin_docker_base_image_refsfrom
recover-engine-npm-package
Open

fix(rivetkit): update config to match envoys & remove manager references#4663
NathanFlurry wants to merge 1 commit into04-14-chore_publish_pin_docker_base_image_refsfrom
recover-engine-npm-package

Conversation

@NathanFlurry
Copy link
Copy Markdown
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link
Copy Markdown

railway-app bot commented Apr 14, 2026

🚅 Deployed to the rivet-pr-4663 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-cloud ✅ Success (View Logs) Web Apr 15, 2026 at 2:51 am
frontend-inspector ✅ Success (View Logs) Web Apr 15, 2026 at 2:51 am
kitchen-sink ❌ Build Failed (View Logs) Web Apr 15, 2026 at 2:50 am
website 😴 Sleeping (View Logs) Web Apr 15, 2026 at 2:34 am
mcp-hub ✅ Success (View Logs) Web Apr 15, 2026 at 2:25 am
ladle ✅ Success (View Logs) Web Apr 15, 2026 at 1:23 am

Copy link
Copy Markdown
Member Author

NathanFlurry commented Apr 14, 2026

Warning

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 stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link
Copy Markdown

claude bot commented Apr 14, 2026

Code Review: fix(rivetkit): update config to match envoys & remove manager references

Overview

This PR renames/refactors the RivetKit config API to align with "envoy" terminology, flattens previously nested config fields, removes deprecated @rivetkit/sqlite-native and @rivetkit/sqlite-vfs packages, makes the HTTP server lazy-start, and updates docs throughout.


Issues

1. Stale port in docs after default port change (6420 → 6421)

website/src/content/docs/actors/quickstart/backend.mdx and website/src/content/docs/general/http-server.mdx both still mention http://localhost:6420 after the default was bumped to 6421. These will mislead new users.

2. requestLifespan unit description changed without migration guidance

The JSON schema description changed from "milliseconds" (old) to "seconds" (new). The TypeScript code already uses seconds (15 * 60 = 900). If the old description was wrong and the code always used seconds, this is a doc fix only — but users who followed the old description and passed milliseconds (e.g. 900_000) will silently get a 1000x larger timeout. Worth calling out in the PR or changelog.

3. registry.start() guard condition may not work as intended

In rivetkit-typescript/packages/rivetkit/src/registry/index.ts:

if (this.#config.serverless.publicEndpoint === undefined) {
    this.#config.serverless.publicEndpoint = ENGINE_ENDPOINT;
}

ServerlessConfigSchema may already apply a default to publicEndpoint, meaning after parsing the value won't be undefined even if the user never set it. Worth verifying the guard matches the actual runtime state post-parsing.

4. Missing newline at end of JSON schema files

Both rivetkit-json-schema/registry-config.json and rivetkit-typescript/artifacts/registry-config.json now end without a trailing newline. Minor hygiene issue causing unnecessary diff noise.

5. Test file still references old 6420 port

The driver test variants file has a hardcoded fallback:

const endpoint = process.env.RIVET_ENDPOINT || "http://127.0.0.1:6420";

Should be updated to 6421 (or reference a shared constant) to avoid tests silently connecting to the wrong port when RIVET_ENDPOINT is unset.


Observations

Breaking changes are not flagged — all config renames (serveManager, managerPort, managerBasePath, managerHost, publicDir, serverless.spawnEngine, serverless.engineVersion, serverless.configureRunnerPool, runner/runnerName/runnerKey) are hard breaks with no backward-compat shims. The RIVET_RUNNER_VERSIONRIVET_ENVOY_VERSION env var rename is similarly hard. If this is an intentional semver major bump, it should be noted in the PR description so reviewers and release tooling know.

Flattening configurePool and engine fields is a clear improvement — the old nesting inside serverless was confusing for settings that affect the local engine.

Lazy ensureHttpServer() is a good pattern change. Separating it from Runtime.create() avoids unconditionally binding a port in serverless mode.

Hardcoded deprecated fields in configure.tsmax_runners, min_runners, runners_margin, slots_per_runner are now hardcoded with a comment "Deprecated engine fields with hardcoded defaults." Clarifying whether these are deprecated by the engine API or by RivetKit config would help future readers.

Formatting-only churn — the bulk of the diff (especially engine-runner-protocol/src/index.ts, websocket-tunnel-adapter.ts, tunnel.ts) is purely reformatting (4-space to tabs, adding semicolons). Mixing cosmetic reformats with semantic changes makes the diff harder to review.

Docs runtime-modes table still has "Runner" in the row header while the method is now registry.startEnvoy(). Minor inconsistency worth a one-word fix.


Summary

The config API cleanup is directionally correct and improves clarity. Main things to address before merge: stale 6420 port references in docs, verifying the publicEndpoint guard condition, missing trailing newlines in the JSON schema files, and the stale port in the test fallback. The breaking nature of the renames should be surfaced in the PR description or changelog.

@NathanFlurry NathanFlurry changed the base branch from main to graphite-base/4663 April 14, 2026 23:43
@NathanFlurry NathanFlurry force-pushed the recover-engine-npm-package branch from 5835291 to 76b2ccd Compare April 14, 2026 23:43
@NathanFlurry NathanFlurry changed the base branch from graphite-base/4663 to 04-14-chore_publish_pin_docker_base_image_refs April 14, 2026 23:44
@NathanFlurry NathanFlurry changed the title fix(pegboard): use v2 actor workflow for normal runner configs fix(rivetkit): update config to match envoys & remove manager references Apr 15, 2026
@NathanFlurry NathanFlurry force-pushed the recover-engine-npm-package branch from 76b2ccd to 3d11847 Compare April 15, 2026 00:17
@NathanFlurry NathanFlurry force-pushed the recover-engine-npm-package branch from 3d11847 to c43281b Compare April 15, 2026 00:56
@NathanFlurry NathanFlurry marked this pull request as ready for review April 15, 2026 01:06
@NathanFlurry NathanFlurry force-pushed the recover-engine-npm-package branch from c43281b to 2e8cb57 Compare April 15, 2026 01:08
@NathanFlurry NathanFlurry force-pushed the recover-engine-npm-package branch from 2e8cb57 to 50b79ec Compare April 15, 2026 01:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

Preview packages published to npm

Install with:

npm install rivetkit@pr-4663

All packages published as 0.0.0-pr.4663.e516712 with tag pr-4663.

Engine binary is shipped via @rivetkit/engine-cli on linux-x64-musl, linux-arm64-musl, darwin-x64, and darwin-arm64. Windows users should use the release installer or set RIVET_ENGINE_BINARY.

Docker images:

docker pull rivetdev/engine:slim-e516712
docker pull rivetdev/engine:full-e516712
Individual packages
npm install rivetkit@pr-4663
npm install @rivetkit/react@pr-4663
npm install @rivetkit/rivetkit-native@pr-4663
npm install @rivetkit/workflow-engine@pr-4663

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