Skip to content

chore(rivetkit): doc skip ready wait#4927

Closed
NathanFlurry wants to merge 4 commits intographite-base/4927from
05-03-chore_rivetkit_doc_skip_ready_wait
Closed

chore(rivetkit): doc skip ready wait#4927
NathanFlurry wants to merge 4 commits intographite-base/4927from
05-03-chore_rivetkit_doc_skip_ready_wait

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

Copy link
Copy Markdown
Member Author

NathanFlurry commented May 4, 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
Contributor

claude Bot commented May 4, 2026

PR Review: chore(rivetkit): doc skip ready wait

Overview

This PR introduces skipReadyWait as a user-facing alias for the internal bypassConnectable flag. The rename improves documentation clarity — skipReadyWait clearly communicates intent (bypass the gateway's ready-hold), whereas bypassConnectable is an implementation detail. Both flags now work everywhere the feature is supported, and the old name is preserved for backward compatibility.


Code Quality

resolveActorGatewayOptions (actor-common.ts) — nullish coalescing order issue

The resolution chain uses ?? (nullish coalescing), which only falls through on null/undefined, not false:

const bypassConnectable =
  overrides?.bypassConnectable ??
  overrides?.skipReadyWait ??
  defaults.bypassConnectable ??
  defaults.skipReadyWait ??
  false;

If a caller explicitly passes { bypassConnectable: false, skipReadyWait: true }, the result is falseskipReadyWait is silently ignored. Since these are meant to be equivalent aliases (either one opts in), the correct logic should align with shouldBypassConnectable:

const bypassConnectable =
  overrides?.bypassConnectable === true ||
  overrides?.skipReadyWait === true ||
  defaults.bypassConnectable === true ||
  defaults.skipReadyWait === true;

The edge case (both set with conflicting values) is unlikely in practice, but the current logic is inconsistent with shouldBypassConnectable which uses OR semantics via ||.

shouldBypassConnectable (driver.ts) — good helper

Clean extraction of the multi-site check. Uses strict === true equality, which is correct for optional booleans. The four call-site updates are mechanical and correct.


Tests

The new test suite covers:

  • skipReadyWait: true → URL has rvt-bypass_connectable=true
  • bypassConnectable: true → URL has rvt-bypass_connectable=true
  • bypassConnectable: true → WebSocket protocols include rivet_bypass_connectable
  • Missing: skipReadyWait: true → WebSocket protocols include rivet_bypass_connectable

The WebSocket path (buildWebSocketProtocols) uses shouldBypassConnectable so it would work, but there is no test confirming skipReadyWait parity on the WebSocket code path. Worth adding for symmetry with the URL-query-param tests.


Documentation

The three new doc sections (lifecycle, request-handler, websocket-handler) and the main JS client entry are clear and well-placed.

Minor: the lifecycle docs section says "Probes and readiness checks can opt out with gateway.skipReadyWait" — this phrasing implies gateway is an actor-level config key rather than a per-call option on handle.fetch/handle.webSocket. The JS client page already shows the correct call-site, so a forward-reference or slight rewording ("Pass gateway: { skipReadyWait: true } on the fetch/webSocket call") would reduce ambiguity.


Summary

Area Status
Correctness resolveActorGatewayOptions nullish-coalescing order produces the wrong result when both aliases are passed with conflicting values
Backward compat bypassConnectable still works at all call sites
DRY shouldBypassConnectable helper cleanly eliminates four duplicate checks
Test coverage Mostly complete; missing one WebSocket path test for skipReadyWait
Docs Good; one phrasing ambiguity in lifecycle.mdx

Overall a clean, well-scoped change. The main thing worth fixing before merge is the OR-vs-nullish-coalescing inconsistency in resolveActorGatewayOptions.

@NathanFlurry NathanFlurry marked this pull request as ready for review May 4, 2026 05:12
@NathanFlurry NathanFlurry force-pushed the 05-03-fix_guard_parse_gateway_bypass_query_booleans branch from f7d89ed to 6b85d8c Compare May 4, 2026 05:14
@NathanFlurry NathanFlurry force-pushed the 05-03-chore_rivetkit_doc_skip_ready_wait branch from 656743e to 5fbbe77 Compare May 4, 2026 05:14
@NathanFlurry NathanFlurry changed the base branch from 05-03-fix_guard_parse_gateway_bypass_query_booleans to graphite-base/4927 May 4, 2026 08:05
@NathanFlurry NathanFlurry force-pushed the 05-03-chore_rivetkit_doc_skip_ready_wait branch from 5fbbe77 to 4df4d5a Compare May 4, 2026 09:06
@NathanFlurry
Copy link
Copy Markdown
Member Author

Landed in main via stack-merge fast-forward push. Commits are in main; closing to match.

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