docs: improve sleeping and actor lifecycle documentation#4472
docs: improve sleeping and actor lifecycle documentation#4472NathanFlurry merged 3 commits intomainfrom
Conversation
Adds a dedicated "Sleeping" section covering when actors sleep, how to control sleep (setPreventSleep, keepAwake, noSleep), the shutdown sequence, waitUntil, and forced shutdown behavior during version deploys. Documents the previously undocumented waitUntilTimeout option. Fixes incorrect sleepTimeout reference in architecture.mdx. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove deprecated c.keepAwake() section - Deprecate options.noSleep in favor of c.setPreventSleep() - Rename 'Forced Shutdown' to 'Actor Migration' with brief intro - Consolidate and shorten sleep shutdown sequence - Recommend c.waitUntil() for critical action work - Reorganize sleep section with timeouts before sequence - Link sleep timeouts to options documentation
|
🚅 Deployed to the rivet-pr-4472 environment in rivet-frontend
|
PR Review: docs: improve sleeping and actor lifecycle documentationThis is a good PR that improves documentation organization and fixes a real behavioral bug. Here are the issues found: Bug: noSleep Indentation in config.ts The deprecated JSDoc comment and the noSleep property have mismatched indentation (lines 221-222). The comment is at 3 tabs of indentation but the OpenAPI Spec / Implementation Mismatch The PR removes Per the CLAUDE.md guidelines, the HTTP inspector and its spec should stay in sync. If the intent is to remove these endpoints from the spec, the corresponding router routes and any driver tests should also be removed. If this is intentional deferral, a comment explaining why would help. Sitemap Entry Commented Out Instead of Deleted
Positive Notes
|
Summary
Reorganizes and simplifies the actor sleeping and shutdown documentation to be more concise and actionable. Removes deprecated APIs and clarifies best practices for managing actor sleep and shutdown.
Changes
c.keepAwake(promise)section and related referencesoptions.noSleepin favor ofc.setPreventSleep(true)inonWakeonSleepandc.waitUntilsubsections, streamlining the sleeping sectionc.waitUntil()for critical action work that must complete before shutdownwaitUntilTimeoutto options reference, limits, versions, and architecture pagesType of change