fix(rivetkit): fix empty state [slopfix]#4967
fix(rivetkit): fix empty state [slopfix]#4967MasterPtato wants to merge 1 commit into05-04-chore_update_commentfrom
Conversation
Preview packages published to npmInstall with: npm install rivetkit@pr-4967All packages published as Engine binary is shipped via Docker images: docker pull rivetdev/engine:slim-9037bcc
docker pull rivetdev/engine:full-9037bccIndividual packagesnpm install rivetkit@pr-4967
npm install @rivetkit/react@pr-4967
npm install @rivetkit/rivetkit-napi@pr-4967
npm install @rivetkit/workflow-engine@pr-4967 |
54bc0b3 to
1d1ad71
Compare
f574ff9 to
148d187
Compare
PR #4967 Review:
|
| Check | Status |
|---|---|
scc::HashMap instead of Mutex<HashMap> |
N/A — no new maps |
tokio::sync for async locks |
OK — parking_lot::RwLock used correctly in sync-context ConnHandleInner |
| Tracing structured fields | OK — tracing::debug!(actor_id = %..., conn_id, reason = ?..., "lowercase msg") |
No _ => fallthrough on enums |
N/A — no new match statements |
No Box::leak in per-request paths |
OK |
| Conventional commits | OK |
No eprintln!/println! |
OK |
| Comment style | Minor violations (parentheticals) |
Summary
The fix is correct. Before promoting out of DRAFT:
- Add a comment in
napi_actor_events.rsdocumenting why empty bytes implies uninitialized (not valid empty state). - Clarify whether the
state_initialized()check indispatch_eventis defensive or load-bearing relative to the one indisconnect_managed. - Add regression tests for the two fixed scenarios.
|
Closing in favor of the split replacement stack:\n\n- conn-preflight/no-disconnect-on-failed-preflight\n- rivetkit-state/defer-initialized-persist\n- engine-pools/install-rustls-provider\n\nThe replacement stack keeps the failed-preflight/onDisconnect behavior, empty-state initialization ordering, and rustls provider setup as separate Graphite branches. |

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: