Skip to content

fix(rivetkit): remove deprecated actor options#4992

Draft
NathanFlurry wants to merge 1 commit into05-06-fix_rivetkit_fix_default_spawn_engine_behaviorfrom
runtime-options/remove-deprecated-actor-options
Draft

fix(rivetkit): remove deprecated actor options#4992
NathanFlurry wants to merge 1 commit into05-06-fix_rivetkit_fix_default_spawn_engine_behaviorfrom
runtime-options/remove-deprecated-actor-options

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

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 7, 2026

Code Review: fix(rivetkit): remove deprecated actor options

Overview

This PR removes deprecated actor options (noSleep, onDestroyTimeout, waitUntilTimeout) across the full stack — Rust core, NAPI bridge, WASM bridge, TypeScript schemas, JSON artifact, examples, and test fixtures. It replaces noSleep: true with the scoped c.keepAwake(promise) API.

The removal is clean and consistent across all layers. Overall this is a straightforward, well-executed cleanup.


Issues

start-stop-race.ts: noSleep: true replaced with sleepTimeout: 60_000 is a fragile substitute

noSleep: true was semantically never sleep. The replacement just defers sleep to 60 seconds, meaning any test that runs longer than that will see unexpected onSleep/onWake calls and potentially flake. The correct replacement is c.keepAwake(...) inside the actor body (e.g. a never-resolving promise in onWake), not a wall-clock workaround. At minimum this deserves a comment explaining the intent so the next person does not just bump the timeout when it flakes.

actor-config.json is missing a trailing newline

The diff ends with no newline at end of file. The artifact should be regenerated with a final newline for consistency.

WasmServeConfig additions are unrelated to this PR's stated purpose

Five new fields (envoy_key, dev_serverless_url, dev_serverless_manual, dev_serverless_drain_timeout, dev_serverless_request_timeout) were added to WasmServeConfig in rivetkit-wasm/src/lib.rs. These have nothing to do with removing deprecated actor options. They add public API surface without documentation or tests in this diff. If they are needed because this branch is stacked on other work, they should be called out in the PR description.


Minor nits

  • The PR checklist is blank. This removes previously-deprecated but still-functional API surface, so the Breaking change box should be checked.
  • The CanSleep::NoSleep variant removal in sleep.rs is correct. The CLAUDE.md update dropping no_sleep from the can_sleep inputs list is consistent with the removal.

Positives

  • All layers are updated atomically: Rust core, NAPI, WASM, TypeScript schema, JSON artifact, examples, and driver fixtures. No dangling references.
  • The new rejects removed actor option test correctly verifies that passing old option names throws at parse time rather than being silently ignored.
  • The keepAwake migration in the AI agent examples is correct. c.keepAwake(consumeStream(c)) properly registers the async operation to block sleep for the lifetime of the stream consumer.
  • Removing the warnDeprecatedShutdownTimeoutKeys runtime warning path is a clean finish to the deprecation cycle.

@NathanFlurry NathanFlurry changed the base branch from 05-06-fix_rivetkit_fix_default_spawn_engine_behavior to graphite-base/4992 May 7, 2026 04:20
@NathanFlurry NathanFlurry force-pushed the graphite-base/4992 branch from 087737c to 077bd4e Compare May 7, 2026 04:28
@NathanFlurry NathanFlurry force-pushed the runtime-options/remove-deprecated-actor-options branch from 0a691be to eb0a964 Compare May 7, 2026 04:28
@NathanFlurry NathanFlurry changed the base branch from graphite-base/4992 to 05-06-fix_rivetkit_fix_default_spawn_engine_behavior May 7, 2026 04:28
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