Skip to content

fix(rivetkit): configure inspector protocol versions#5442

Merged
NathanFlurry merged 2 commits into
mainfrom
stack/fix-rivetkit-configure-inspector-protocol-versions-kupzounm
Jul 20, 2026
Merged

fix(rivetkit): configure inspector protocol versions#5442
NathanFlurry merged 2 commits into
mainfrom
stack/fix-rivetkit-configure-inspector-protocol-versions-kupzounm

Conversation

@NathanFlurry

@NathanFlurry NathanFlurry commented Jul 19, 2026

Copy link
Copy Markdown
Member

No description provided.

@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review

Small, well-scoped fix. I traced the negotiation logic end-to-end (Rust inspector_ws.rs, TS client.browser.ts, actor-inspector-context.tsx, and the driver test) and it's internally consistent:

  • Rust inspector_wire_mode_from_path treats a missing protocol_version query param as LegacyEmbeddedV5 (pinned to v5, embedded-in-payload framing) and a present param as Negotiated { version } (out-of-band version, no embedded header). LEGACY_INSPECTOR_VERSION = 5 matches MIN_RIVETKIT_VERSION_SCHEDULES / MIN_RIVETKIT_VERSION_INSPECTOR_NEGOTIATION both being 2.3.4 in the frontend, so schedules (v6) and negotiation land together and the legacy path correctly gates out SchedulesUpdated/SchedulesResponse/etc. via supports_schedules().
  • The driver test previously built the WS URL without protocol_version and used serializeWithEmbeddedVersion/deserializeWithEmbeddedVersion, which would have driven the server into the legacy v5 path. Switching to protocol_version: String(INSPECTOR_PROTOCOL_VERSION) on the URL plus plain serialize/deserialize(payload, INSPECTOR_PROTOCOL_VERSION) now exercises the negotiated path at the current protocol version (6), matching what the frontend already does when usesNegotiatedInspectorProtocol() is true. This looks like the correct fix rather than a workaround.
  • The new comments in inspector_ws.rs and actor-inspector-context.tsx accurately describe the compatibility rationale and follow the repo's comment style (complete sentences, no em dashes).

No bugs found. One optional, non-blocking thought: the Rust side already has unit tests for both the negotiated and legacy-embedded-v5 paths (negotiated_frames_use_the_out_of_band_version, legacy_frames_remain_embedded_v5, parses_inspector_protocol_query_parameter), so the driver test likely does not need to also cover the legacy path — just flagging it in case an end-to-end regression test for old deployed runtimes talking to a new dashboard has value.

Nothing else stands out on security, performance, or test coverage grounds. The diff is comments plus a mechanical test alignment, with no runtime behavior change outside the test.

@NathanFlurry
NathanFlurry force-pushed the stack/feat-rivetkit-add-actor-scheduling-qmyvxlll branch from ed5f5a7 to b50ef9a Compare July 20, 2026 06:46
@NathanFlurry
NathanFlurry force-pushed the stack/fix-rivetkit-configure-inspector-protocol-versions-kupzounm branch from da9713d to 1b43c93 Compare July 20, 2026 06:46
@NathanFlurry
NathanFlurry changed the base branch from stack/feat-rivetkit-add-actor-scheduling-qmyvxlll to main July 20, 2026 08:37
@NathanFlurry
NathanFlurry merged commit 1b43c93 into main Jul 20, 2026
11 of 23 checks passed
@NathanFlurry
NathanFlurry deleted the stack/fix-rivetkit-configure-inspector-protocol-versions-kupzounm branch July 20, 2026 08:39
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