fix(rivetkit-core): cap SerializeState shutdown timeout at 15s#4742
Conversation
Code Review: fix(rivetkit-core): cap SerializeState shutdown timeout at 15sOverviewThis is a minimal, single-line change that halves the CorrectnessThe new value (15s) now aligns with the default lifecycle timeouts:
This alignment is good: it prevents the sanity cap from extending shutdown beyond the configured lifecycle window. Previously, a hung Potential timing concern: The sanity cap and the outer shutdown grace period are now the same duration. Depending on when Code Quality
Suggestions
// Must not exceed the shutdown grace period (DEFAULT_ON_DESTROY_TIMEOUT / DEFAULT_SLEEP_GRACE_PERIOD).
const SERIALIZE_STATE_SHUTDOWN_SANITY_CAP: Duration = Duration::from_secs(15);
SummaryThe change is correct and well-motivated: the 30s cap was counterproductively long for a shutdown path bounded at 15s by the lifecycle config. Minor concerns are the incomplete PR description and the lack of a comment tying the constant to the lifecycle defaults. |
96f71c0 to
c43b558
Compare
f32030d to
96f22d0
Compare
c43b558 to
f4dbc84
Compare
96f22d0 to
cfc540f
Compare
f4dbc84 to
b3b1cf8
Compare
0c5605c to
ed50b2a
Compare
610bbe5 to
bbf3422
Compare
ed50b2a to
9ba012c
Compare
Preview packages published to npmInstall with: npm install rivetkit@pr-4742All packages published as Engine binary is shipped via Docker images: docker pull rivetdev/engine:slim-801cfc2
docker pull rivetdev/engine:full-801cfc2Individual packagesnpm install rivetkit@pr-4742
npm install @rivetkit/react@pr-4742
npm install @rivetkit/rivetkit-napi@pr-4742
npm install @rivetkit/workflow-engine@pr-4742 |

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: