Skip to content

fix: fix pool metadata protocol version refresh, rivetkit native ws#4585

Merged
MasterPtato merged 1 commit intomainfrom
04-07-fix_fix_pool_metadata_protocol_version_refresh_rivetkit_native_ws
Apr 8, 2026
Merged

fix: fix pool metadata protocol version refresh, rivetkit native ws#4585
MasterPtato merged 1 commit intomainfrom
04-07-fix_fix_pool_metadata_protocol_version_refresh_rivetkit_native_ws

Conversation

@MasterPtato
Copy link
Copy Markdown
Contributor

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 8, 2026

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

Service Status Web Updated (UTC)
frontend-inspector ❌ Build Failed (View Logs) Web Apr 8, 2026 at 9:25 pm
kitchen-sink ❌ Build Failed (View Logs) Web Apr 8, 2026 at 9:25 pm
frontend-cloud 🕒 Building (View Logs) Web Apr 8, 2026 at 9:25 pm
website 😴 Sleeping (View Logs) Web Apr 8, 2026 at 4:57 pm
mcp-hub ✅ Success (View Logs) Web Apr 8, 2026 at 12:10 am
ladle ❌ Build Failed (View Logs) Web Apr 8, 2026 at 12:09 am

@claude
Copy link
Copy Markdown

claude bot commented Apr 8, 2026

PR Review: fix pool metadata protocol version refresh, rivetkit native ws

Good fixes for two real bugs. The consolidation of metadata-refresh logic into a dedicated op is the right call. A few issues to address before merging:


Blocking Issues

1. Debug log left in production code

rivetkit-typescript/packages/rivetkit/fixtures/driver-test-suite/registry-loader.ts has a stray debug statement that must be removed before merging:

console.log(listActorFixtureFiles(), "WHATHATHTHATHTH")

Non-Blocking Issues

2. Cache.enabled field is logically disconnected from from_config

The Cache struct now has both enabled: bool and Option<CacheDriver>, but CacheInner::from_config only branches on driver().map and never reads enabled. A config of enabled: false, driver: Some(InMemory) would still create a live in-memory cache. Either remove enabled and use driver: None as the disabled sentinel (which is what the code already does), or wire enabled into from_config explicitly.

3. make_ws_key silently zeroes on short buffers (N-API path)

The N-API-facing version in envoy_handle.rs accepts raw Buffer slices from JS with no length validation. If either slice is shorter than 4 bytes the key silently becomes partially zeroed, risking key collisions. Returning a napi Error when lengths are wrong would be safer.

4. Residual async ordering window in on_open callback (bridge_actor.rs)

The on_open callback fires the JS event with NonBlocking (which can be processed before the current Tokio task yields) and then stores the sender in the map behind an async move lock. There is still a narrow window where JS receives websocket_open and calls ws.send() before the sender is inserted. The fix is a clear improvement over before. Worth at minimum documenting the remaining window, or pinning the map insertion before the event fires.

5. Missing connect() await in standalone-native-test.mts

The explicit conn.connect() await was removed. If handle.increment(42) is called before the connection is established, the test may fail non-deterministically. Verify this is safe given the updated connection lifecycle.

6. MigratedToV2 message send - verify signal handler exists

The new MigratedToV2 message send in actor/mod.rs was added after the migration workflow dispatch. Confirm the signal type is defined and has a registered handler, and that sending it when no listener is active does not panic or silently drop the signal.


Minor Notes

  • Removing the 5-second sleep and explicit metadata refresh from driver-engine.test.ts is the real win here.
  • Removing the spurious gasoline dep from rivet-envoy-protocol/Cargo.toml is good housekeeping.
  • auto_restart removal from EnvoyConfig is clean; just verify nothing outside this repo consumes it.

🤖 Generated with Claude Code

@NathanFlurry NathanFlurry marked this pull request as ready for review April 8, 2026 10:37
@NathanFlurry NathanFlurry mentioned this pull request Apr 8, 2026
11 tasks
@MasterPtato MasterPtato force-pushed the 04-07-fix_fix_pool_metadata_protocol_version_refresh_rivetkit_native_ws branch from a50c388 to cf4316a Compare April 8, 2026 20:30
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4585 April 8, 2026 20:30 Destroyed
Copy link
Copy Markdown
Contributor Author

MasterPtato commented Apr 8, 2026

Merge activity

  • Apr 8, 8:52 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 8, 9:25 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 8, 9:26 PM UTC: @MasterPtato merged this pull request with Graphite.

@MasterPtato MasterPtato changed the base branch from rivetkit-native to graphite-base/4585 April 8, 2026 21:21
@MasterPtato MasterPtato changed the base branch from graphite-base/4585 to main April 8, 2026 21:23
@MasterPtato MasterPtato force-pushed the 04-07-fix_fix_pool_metadata_protocol_version_refresh_rivetkit_native_ws branch from cf4316a to df3dd00 Compare April 8, 2026 21:24
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4585 April 8, 2026 21:24 Destroyed
@MasterPtato MasterPtato merged commit 3a5f121 into main Apr 8, 2026
9 of 19 checks passed
@MasterPtato MasterPtato deleted the 04-07-fix_fix_pool_metadata_protocol_version_refresh_rivetkit_native_ws branch April 8, 2026 21:26
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