Skip to content

Comments

chore(rivetkit): fix run engine config#4268

Merged
NathanFlurry merged 1 commit intomainfrom
02-23-chore_rivetkit_fix_run_engine_config
Feb 24, 2026
Merged

chore(rivetkit): fix run engine config#4268
NathanFlurry merged 1 commit intomainfrom
02-23-chore_rivetkit_fix_run_engine_config

Conversation

@NathanFlurry
Copy link
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

railway-app bot commented Feb 23, 2026

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

Service Status Web Updated (UTC)
website ❌ Build Failed (View Logs) Web Feb 23, 2026 at 6:38 pm
frontend-inspector ❌ Build Failed (View Logs) Web Feb 23, 2026 at 6:37 pm
frontend-cloud ❌ Build Failed (View Logs) Web Feb 23, 2026 at 6:36 pm
mcp-hub ✅ Success (View Logs) Web Feb 23, 2026 at 6:23 pm
ladle ❌ Build Failed (View Logs) Web Feb 23, 2026 at 6:23 pm

Copy link
Member Author

NathanFlurry commented Feb 23, 2026


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Feb 23, 2026

PR #4268 Review: chore(rivetkit): fix run engine config

Summary

This PR contains two distinct sets of changes:

  1. The actual fix (1 line): corrects an env var typo in the engine process config
  2. New multiplayer-game-patterns-vercel example and updates to existing Vercel examples (~12k lines)

Core Fix

rivetkit-typescript/packages/rivetkit/src/engine-process/mod.ts

-RIVET__RUNTIME__WORKER__SHUTDOWN_DURATION: "1",
+RIVET__RUNTIME__WORKER_SHUTDOWN_DURATION: "1",

The double underscore separator (WORKER__SHUTDOWN) was incorrect — the correct env var uses a single underscore (WORKER_SHUTDOWN). This is the right fix.


Issues Found

Pre-built JS bundle committed to source control

examples/multiplayer-game-patterns-vercel/public/assets/index-9bY3DXxE.js and public/index.html are committed as build artifacts. The hashed filename index-9bY3DXxE.js indicates this is the output of vite build, not source. Build artifacts shouldn't live in the repo for several reasons:

  • They'll become stale whenever source changes without a rebuild
  • public/index.html has a hardcoded reference to the hashed asset filename: src="/assets/index-9bY3DXxE.js"
  • The bundle contains minified React, the full RivetKit client library, game logic, etc. — likely >500KB of generated content

If these are needed for Vercel deployment without a build step, that should be explicitly documented. Otherwise, add public/assets/ to .gitignore and let Vercel run vite build.

Wrong domain in README deploy button

examples/multiplayer-game-patterns-vercel/README.md line 4 uses rivet-gg/rivet in the Vercel deploy URL, which should be rivet-dev/rivet per project conventions:

-https://github.com/rivet-gg/rivet/tree/main/examples/multiplayer-game-patterns-vercel
+https://github.com/rivet-dev/rivet/tree/main/examples/multiplayer-game-patterns-vercel

Wrong directory in README "Getting Started"

-cd rivet/examples/multiplayer-game-patterns
+cd rivet/examples/multiplayer-game-patterns-vercel

The README is for the -vercel variant but the cd command points to the non-vercel example. The README also says only "io-style (open lobby, 10 tps)" is covered, but the full example implements 10 game patterns.

as never type assertion in App.tsx

frontend/App.tsx:199:

matchInfo: route.matchInfo as never,

This is a type escape hatch that hides a structural type mismatch. Consider using a typed discriminated union for each game pattern's matchInfo, or casting to unknown first if you want an explicit cast ladder: as unknown as SpecificType. Using as never silently disables type-checking on this prop.

Indentation inconsistency in ranked/match.ts

The createState property in rankedMatch is double-indented compared to sibling properties (onConnect, onDisconnect, etc.):

export const rankedMatch = actor({
    events: { ... },
        createState: (   // <-- extra indent level
            _c,
            input: ...,
        ): State => {
    onConnect: (c, conn) => {  // <-- back to normal indent

Minor Observations

  • The README description is incomplete — it only mentions "io-style" but the example covers arena, battle-royale, ranked, open-world, idle, turn-based, party, physics-2d, and physics-3d.
  • The vercel.json rewrite "source": "/api/(.*)""destination": "/api" looks correct for the serverless function routing.
  • The queue-based matchmaker patterns (io-style, arena, ranked) are well-structured and the two-phase lobby flow is clearly documented with block comments.
  • The ensureColumn migration helper pattern used in the IO-style matchmaker is a nice defensive approach for schema evolution.

@NathanFlurry NathanFlurry changed the base branch from 02-22-chore_multiplayer_cookbook_patterns to graphite-base/4268 February 23, 2026 18:34
@NathanFlurry NathanFlurry force-pushed the 02-23-chore_rivetkit_fix_run_engine_config branch from 6365c5c to 3d549ca Compare February 23, 2026 18:35
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4268 February 23, 2026 18:35 Destroyed
@NathanFlurry NathanFlurry changed the base branch from graphite-base/4268 to 02-22-chore_multiplayer_cookbook_patterns February 23, 2026 18:35
@NathanFlurry NathanFlurry force-pushed the 02-23-chore_rivetkit_fix_run_engine_config branch from 3d549ca to 9cd9ac5 Compare February 24, 2026 02:39
@NathanFlurry NathanFlurry force-pushed the 02-22-chore_multiplayer_cookbook_patterns branch from 16615f2 to 04ec189 Compare February 24, 2026 02:40
@NathanFlurry NathanFlurry mentioned this pull request Feb 24, 2026
11 tasks
@NathanFlurry NathanFlurry force-pushed the 02-22-chore_multiplayer_cookbook_patterns branch from 04ec189 to 8c9ac24 Compare February 24, 2026 02:57
@NathanFlurry NathanFlurry force-pushed the 02-23-chore_rivetkit_fix_run_engine_config branch from 9cd9ac5 to 43fa711 Compare February 24, 2026 02:57
@NathanFlurry NathanFlurry force-pushed the 02-23-chore_rivetkit_fix_run_engine_config branch from 43fa711 to 3d549ca Compare February 24, 2026 03:19
@NathanFlurry NathanFlurry force-pushed the 02-22-chore_multiplayer_cookbook_patterns branch from 8c9ac24 to 16615f2 Compare February 24, 2026 03:19
@NathanFlurry NathanFlurry marked this pull request as ready for review February 24, 2026 04:00
@NathanFlurry NathanFlurry force-pushed the 02-22-chore_multiplayer_cookbook_patterns branch from 16615f2 to 6e1a56c Compare February 24, 2026 04:01
@NathanFlurry NathanFlurry force-pushed the 02-23-chore_rivetkit_fix_run_engine_config branch from 3d549ca to 40818ca Compare February 24, 2026 04:01
@NathanFlurry NathanFlurry force-pushed the 02-22-chore_multiplayer_cookbook_patterns branch from 6e1a56c to 459718a Compare February 24, 2026 04:10
Base automatically changed from 02-22-chore_multiplayer_cookbook_patterns to main February 24, 2026 04:10
@NathanFlurry NathanFlurry force-pushed the 02-23-chore_rivetkit_fix_run_engine_config branch from 40818ca to 1f4b5a7 Compare February 24, 2026 04:11
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4268 February 24, 2026 04:11 Destroyed
@NathanFlurry NathanFlurry merged commit fae739b into main Feb 24, 2026
4 of 14 checks passed
@NathanFlurry NathanFlurry deleted the 02-23-chore_rivetkit_fix_run_engine_config branch February 24, 2026 04:11
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