Skip to content

[SLOP(claude-opus-4-8)] refactor(rivetkit): deprecate actor kv api across core and typescript#5253

Open
NathanFlurry wants to merge 1 commit into
stack/slop-claude-opus-4-8-docs-examples-split-effect-example-into-hello-world-effect-and-chat-room-effect-wolqzmyofrom
stack/slop-claude-opus-4-8-refactor-rivetkit-deprecate-actor-kv-api-across-core-and-typescript-polvovvk
Open

[SLOP(claude-opus-4-8)] refactor(rivetkit): deprecate actor kv api across core and typescript#5253
NathanFlurry wants to merge 1 commit into
stack/slop-claude-opus-4-8-docs-examples-split-effect-example-into-hello-world-effect-and-chat-room-effect-wolqzmyofrom
stack/slop-claude-opus-4-8-refactor-rivetkit-deprecate-actor-kv-api-across-core-and-typescript-polvovvk

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

No description provided.

@NathanFlurry

Copy link
Copy Markdown
Member Author

Stack for rivet-dev/rivet

Get stack: forklift get 5253
Push local edits: forklift submit
Merge when ready: forklift merge 5253

@claude

claude Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Code Review\n\nSummary: Clean, minimal deprecation of the actor KV API across Rust core, the Rust wrapper crate, and the TypeScript package. The approach is solid.\n\n---\n\n### What's working well\n\n- kv_internal() pattern is correct. Adding a pub(crate) accessor so internal engine code (inspector token, actor startup persistence) can continue using KV storage without triggering deprecation warnings is the right approach. The doc comment explaining why it exists is good.\n- All internal call sites updated. The 6 internal kv() to kv_internal() conversions in task.rs and auth.rs are complete.\n- #[allow(deprecated)] in rivetkit/src/context.rs is correct. kv_internal() is pub(crate) in rivetkit-core, so the Rust wrapper crate cannot access it. Calling the deprecated public kv() and suppressing the warning locally is the only option.\n- Both Rust and TypeScript get deprecation markers, which is consistent.\n\n---\n\n### Issues\n\nMinor: inconsistent TypeScript deprecation messages\n\nThe two TypeScript deprecation strings do not match:\n\n- ActorKv interface: Use embedded SQLite (c.db / c.sql) or actor state instead.\n- kv property on ActorContext: Use embedded SQLite (db / sql) or actor state instead.\n\nOne uses the context-prefixed form (c.db) and the other does not. Pick one and use it consistently across both.\n\n---\n\n### Suggestions (non-blocking)\n\n1. Add a comment explaining the #[allow(deprecated)]\n\nThe reason for #[allow(deprecated)] in rivetkit/src/context.rs is not immediately obvious. A one-line comment would clarify that kv_internal() is pub(crate) in rivetkit-core and therefore inaccessible from this crate, making the deprecated public kv() the only viable call target.\n\n2. Docs page should reflect the deprecation\n\nThe sitemap entry for /docs/actors/kv was removed, but the page still exists and is navigable via direct link. Users landing there from search results or old links will not know to migrate. Worth adding a deprecation callout at the top of that page in a follow-up.\n\n3. Test files\n\nAny existing tests that call ctx.kv() directly will now emit deprecation warnings (which is the intent), but they may need #[allow(deprecated)] if CI becomes noisy. Worth a quick scan after this lands.\n\n---\n\n### Verdict\n\nThe core change is correct and complete. Fix the message inconsistency before merging; the rest are suggestions.

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