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 😴 Sleeping (View Logs) Web Apr 15, 2026 at 1:59 am
frontend-inspector 😴 Sleeping (View Logs) Web Apr 15, 2026 at 1:57 am
kitchen-sink ❌ Build Failed (View Logs) Web Apr 15, 2026 at 1:51 am
ladle ✅ Success (View Logs) Web Apr 15, 2026 at 1:23 am
website 😴 Sleeping (View Logs) Web Apr 15, 2026 at 1:08 am
mcp-hub ✅ Success (View Logs) Web Apr 15, 2026 at 12:57 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

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

Overview

This PR performs a significant API cleanup, renaming "manager" terminology to more generic HTTP server concepts, restructuring engine-related config out of the nested serverless object, and deleting deprecated SQLite packages. The bulk of the diff (~80%) is formatting-only changes.


Config API Renames (Breaking Changes)

The following public API fields are renamed (Old -> New):

  • serveManager -> removed (implicit)
  • publicDir -> staticDir
  • managerBasePath -> httpBasePath
  • managerPort -> httpPort
  • managerHost -> httpHost
  • serverless.spawnEngine -> startEngine (top-level)
  • serverless.engineVersion -> engineVersion (top-level)
  • serverless.configurePool -> configurePool (top-level)
  • JSON schema: runner -> envoy
  • JSON schema: runnerName -> poolName

The PR description checklist is entirely unchecked and does not mention a migration guide. If any of these fields are in published documentation or stable user-facing APIs, a brief deprecation note or CHANGELOG entry would be helpful.


Specific Issues

1. Port default change: 6420 to 6421

Both docs pages still display port 6420 in example URLs after this change:

  • website/src/content/docs/actors/quickstart/backend.mdx: "Your server is now running on http://localhost:6420"
  • website/src/content/docs/general/http-server.mdx: "Clients connect to the Rivet Engine on http://localhost:6420"

If 6420 is now the engine port and 6421 is the RivetKit HTTP port, the docs should be clarified. If clients connect directly to the engine at 6420, the URLs are correct but the variable name change to httpPort: 6421 is confusing since the docs do not reference it.

2. start() unconditionally sets publicEndpoint = ENGINE_ENDPOINT

In registry/index.ts, the new start() method always sets serverless.publicEndpoint to ENGINE_ENDPOINT when it is undefined, even if the user has a remote endpoint configured and startEngine is false. The old code conditioned this on serveManager || spawnEngine. If a user calls registry.start() with an explicit remote endpoint, this will incorrectly point publicEndpoint at the local engine address. Is this intentional?

3. Hardcoded deprecated fields still sent to engine

In serverless/configure.ts, four removed user-facing fields (max_runners, min_runners, runners_margin, slots_per_runner) are now hardcoded and still sent to the engine API. A follow-up task to remove them once the engine API no longer requires them would prevent unexpected breakage.

4. SQL injection in test fixture (pre-existing)

In fixtures/driver-test-suite/db-pragma-migration.ts, the INSERT statement uses string interpolation rather than parameterized queries. Not introduced by this PR, but worth a follow-up fix since the file was touched.


Positive Changes

  • Bug fix in engine process CWD (engine-process/mod.ts): Changing cwd from path.dirname(binaryPath) to storageRoot is a genuine bug fix. The engine binary may reside in a read-only location; the storage root is the correct working directory.
  • metadataPollInterval deduplication: The duplicate field at two levels of configure.ts was correctly collapsed into one.
  • requestLifespan units corrected: The JSON schema previously said "milliseconds" but the code used seconds. The schema now correctly says "seconds", matching the implementation (default: 15 * 60).
  • startEngine/configurePool promoted to top-level: These were nested under serverless despite applying in non-serverless contexts (e.g., Next.js). The restructuring is more logical.
  • Deprecated SQLite packages deleted: @rivetkit/sqlite-native and @rivetkit/sqlite-wasm are fully removed; CI build exclusions were correctly removed alongside them.
  • Next.js integration cleaned up: Removal of maxConcurrentActors, minRunners, maxRunners, slotsPerRunner is clean.

Minor Notes

  • The formatting-only changes are consistent but add significant noise to the diff, making substantive changes harder to isolate during review.
  • The comment "Deprecated engine fields with hardcoded defaults" in configure.ts should end with a period per project comment conventions.

Summary

The API restructuring is coherent and the naming improvements are good. The main items to verify before merging:

  1. Confirm the start() unconditional publicEndpoint = ENGINE_ENDPOINT assignment is safe for remote endpoint configurations.
  2. Verify the port 6420 vs 6421 split in docs is intentional and update copy as needed.
  3. Track removal of hardcoded deprecated engine fields once the engine API no longer requires them.

@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.046f5f1 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-046f5f1
docker pull rivetdev/engine:full-046f5f1
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