Skip to content

test(rivetkit): remove sleepWithPreventSleep fixture and tests#4756

Merged
NathanFlurry merged 1 commit intomainfrom
sleep-cleanup/11-remove-prevent-sleep-fixture
Apr 27, 2026
Merged

test(rivetkit): remove sleepWithPreventSleep fixture and tests#4756
NathanFlurry merged 1 commit intomainfrom
sleep-cleanup/11-remove-prevent-sleep-fixture

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

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link
Copy Markdown

claude Bot commented Apr 24, 2026

PR Review: test(rivetkit): remove sleepWithPreventSleep fixture and tests

Summary: Pure deletion PR (163 deletions, 0 additions) removing the sleepWithPreventSleep fixture and associated driver tests, in coordination with parent PR #4741 which deprecated set_prevent_sleep to a no-op in the Rust core.


Code Quality

The cleanup is complete and internally consistent:

  • Fixture file actors/sleepWithPreventSleep.ts (re-export shim) is deleted
  • registry-static.ts import and registration entries are removed together
  • sleep.ts fixture actor definition and PREVENT_SLEEP_TIMEOUT constant removed
  • All 3 related tests in actor-sleep.test.ts removed

No dangling references to sleepWithPreventSleep or PREVENT_SLEEP_TIMEOUT remain in the TypeScript package.

Rationale Alignment

Well-grounded. With set_prevent_sleep now a no-op in registry/native.ts (setPreventSleep(_preventSleep: boolean): void {}), running driver tests against that path would yield misleading passing results. Removing the tests is the correct response.

Remaining Coverage Gap

The TypeScript-native path in rivetkit-typescript/packages/rivetkit/src/actor/instance/mod.ts still contains an active setPreventSleep implementation managing #preventSleep, #preventSleepClearedPromise, and the CanSleep.PreventSleep check (lines 1653-1659, 2408-2442, 2503). Production code in agent-os/actor/index.ts (line 108) still calls c.setPreventSleep(true/false) actively.

This PR correctly removes driver-test coverage for the NAPI/Rust path (it is a no-op there). However, the TS-native path behavior remains tested only indirectly through agent-os integration. Worth tracking whether dedicated TS-native setPreventSleep tests are needed given active production usage.

No Issues Found

No bugs, security concerns, style violations, or incomplete deletions. The change is correct and complete for its stated purpose.


Reviewed by claude[bot] · Updated 2026-04-26

@NathanFlurry NathanFlurry force-pushed the sleep-cleanup/10-alarm-overdue-during-sleep-test branch from 50500b5 to d151463 Compare April 24, 2026 13:16
@NathanFlurry NathanFlurry force-pushed the sleep-cleanup/11-remove-prevent-sleep-fixture branch from c7f9133 to ace5f49 Compare April 24, 2026 13:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Preview packages published to npm

Install with:

npm install rivetkit@pr-4756

All packages published as 0.0.0-pr.4756.eb5c72d with tag pr-4756.

Engine binary is shipped via @rivetkit/engine-cli on linux-x64-musl, linux-arm64-musl, darwin-x64, and darwin-arm64. Windows users should use the release installer or set RIVET_ENGINE_BINARY.

Docker images:

docker pull rivetdev/engine:slim-eb5c72d
docker pull rivetdev/engine:full-eb5c72d
Individual packages
npm install rivetkit@pr-4756
npm install @rivetkit/react@pr-4756
npm install @rivetkit/rivetkit-napi@pr-4756
npm install @rivetkit/workflow-engine@pr-4756

@NathanFlurry NathanFlurry force-pushed the sleep-cleanup/10-alarm-overdue-during-sleep-test branch from d151463 to 5322de5 Compare April 26, 2026 02:34
@NathanFlurry NathanFlurry force-pushed the sleep-cleanup/11-remove-prevent-sleep-fixture branch from ace5f49 to 3bd44a0 Compare April 26, 2026 02:34
Base automatically changed from sleep-cleanup/10-alarm-overdue-during-sleep-test to main April 27, 2026 07:13
@NathanFlurry NathanFlurry merged commit 3bd44a0 into main Apr 27, 2026
23 of 27 checks passed
@NathanFlurry NathanFlurry deleted the sleep-cleanup/11-remove-prevent-sleep-fixture branch April 27, 2026 07:14
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