fix(rivetkit): use startup kv preload#4956
Conversation
3c7167b to
19adfab
Compare
PR #4956 Review: fix(rivetkit): use startup kv preloadOverviewThis PR fixes a bug where KV preload data was being ignored during actor startup. Three distinct issues are corrected:
Code Quality
Minor indentation artifact in the diff: the for-loop closing brace appears on its own line without matching context. The code is correct but rustfmt should clean this up.
One subtle issue in if let Some(entry) = self
.preloaded_kv
.as_ref()
.and_then(|preloaded| preloaded.key_entry(key))
{
return Ok(entry);
}
For confirmed-absent keys ( Potential Bugs
LAST_PUSHED_ALARM: Uint8Array.from([6]),
WORKFLOW_PREFIX: Uint8Array.from([6]), // same byte valueThis mirrors the Rust side ( However, two exported constants with identical byte values in the same object is a landmine. A future refactor or iteration over TestsThe new tests are well-structured and cover the critical cases:
The One gap: there is no test for the Minor Notes
|
eb18651 to
6a52d2e
Compare
19adfab to
314c8ff
Compare

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: