docs(rivetkit): document keepAwake/waitUntil counter-arm race and surface bridge errors#4759
Conversation
Code Review: PR #4759PR state: Draft | Files changed: 1 ( SummaryThis PR (1) documents the pre-existing counter-arm race in CorrectnessThe changes are correct. The Issues and Observations1. Comment style deviates from CLAUDE.md conventions (minor) CLAUDE.md: "Write comments as normal, complete sentences. Avoid fragmented structures with parentheticals and dashes." Several new comments use fragmented constructions, e.g.: // for the duration of the promise (blocks both idle sleep and grace finalize).
// Counter-arm race (acceptable): the NAPI `keep_awake` call is async,Suggested complete-sentence rewrites: // Forward to core keep_awake. The counter blocks both idle sleep and grace finalize.
// Counter-arm race note: the NAPI keep_awake call is async, so the Rust
// keep_awake_guard increment happens on first poll, not when JS calls this method.2. Race comment conflates The comment says: "In practice the idle timer runs on This conflates two predicate paths:
The 3. Other At least one other fire-and-forget 4. No test coverage for The check relies on a regex against a VerdictThe fix is correct and safe. Main recommendations before marking ready:
|
…face bridge errors
c76a37f to
3d62102
Compare
3f88401 to
0e7355d
Compare
Preview packages published to npmInstall with: npm install rivetkit@pr-4759All packages published as Engine binary is shipped via Docker images: docker pull rivetdev/engine:slim-e2b1650
docker pull rivetdev/engine:full-e2b1650Individual packagesnpm install rivetkit@pr-4759
npm install @rivetkit/react@pr-4759
npm install @rivetkit/rivetkit-napi@pr-4759
npm install @rivetkit/workflow-engine@pr-4759 |

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: