You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds per-actor metadata patching and read projection across the engine, runner protocol, and RivetKit surfaces. Actors can now patch metadata internally, the REST API can patch metadata without waking sleeping actors, point lookups return full metadata, and list queries can project selected metadata_key values. The change also adds mk2 protocol v8 support for metadata patch events and wires the RivetKit file-system and remote manager paths through the same feature.
Type of change
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Added RivetKit metadata driver tests, but pnpm -C rivetkit-typescript/packages/rivetkit check-types could not run in this workspace because node_modules are missing.
cargo check --manifest-path engine/packages/engine/Cargo.toml --tests is still blocked by existing engine test drift outside this feature, and engine/packages/engine/tests/api_actors_list.rs still needs metadata_key literals added.
Checklist:
My code follows the style guidelines of this project
I have performed a self-review of my code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
PR Review: feat(actor): add metadata patching and projection. Overall this is a well-structured feature. The layered validation, projection enum pattern, and async-safe file writes are all solid. Issues to address: (1) Potential Bug - Unbounded Subscription Wait in engine/packages/api-peer/src/actors/patch_metadata.rs: patched_sub.next().await? has no timeout. If the actor workflow receives the PatchMetadata signal but crashes before sending MetadataPatched, the REST call hangs indefinitely. Add a timeout. (2) Schema file v8.bare is labeled 'Runner Protocol v1' at the top - should be v8. (3) Validation limits and key regex are duplicated across three places (actor_metadata.rs, runner mod.ts, metadata-limits.ts) with no sync mechanism. (4) Missing docs: limits.mdx needs the new metadata limits, troubleshooting.mdx needs the new error codes. (5) engine tests/api_actors_list.rs metadata_key literals not yet added per PR description. (6) Minor: getWithKey in file-system manager always reads full metadata even when not needed. (7) Minor: validate_patch is called redundantly inside apply_patch. (8) Nit: indentation in Main::PatchMetadata match arm around line 598 of workflows/actor/mod.rs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds per-actor metadata patching and read projection across the engine, runner protocol, and RivetKit surfaces. Actors can now patch metadata internally, the REST API can patch metadata without waking sleeping actors, point lookups return full metadata, and list queries can project selected
metadata_keyvalues. The change also adds mk2 protocol v8 support for metadata patch events and wires the RivetKit file-system and remote manager paths through the same feature.Type of change
How Has This Been Tested?
cargo check --manifest-path engine/sdks/rust/runner-protocol/Cargo.tomlcargo check --manifest-path engine/packages/pegboard/Cargo.tomlcargo check --manifest-path engine/packages/api-peer/Cargo.tomlcargo check --manifest-path engine/packages/api-public/Cargo.tomlpnpm -C rivetkit-typescript/packages/rivetkit check-typescould not run in this workspace becausenode_modulesare missing.cargo check --manifest-path engine/packages/engine/Cargo.toml --testsis still blocked by existing engine test drift outside this feature, andengine/packages/engine/tests/api_actors_list.rsstill needsmetadata_keyliterals added.Checklist: