fix(pegboard): unwrap actor name metadata#4423
Conversation
|
🚅 Deployed to the rivet-pr-4423 environment in rivet-frontend
|
|
PR Review: fix(pegboard): unwrap actor name metadata The one-line fix is correct. Here is the analysis: CHANGE ANALYSIS The fix addresses a double-wrapping issue in the Rust serverless metadata fetcher. The /metadata endpoint returns actorNames where each entry has the shape { metadata: { ...actual metadata... } }. The old code stored the entire wrapper object as the metadata value; the new code correctly calls .get("metadata")?.as_object()? to extract only the inner object. This is consistent with how the TypeScript side produces actor names (buildActorNames returns Record<string, { metadata: Record<string, unknown> }>) and how the Swift client deserializes it (MetadataActorName has a metadata field). The Rust consumer was the only side not unwrapping correctly. CORRECTNESS The filter_map chain handles missing or null metadata keys by silently dropping those entries, which is the right behavior for malformed data. SUGGESTIONS
SUMMARY The fix is correct and the diagnosis in the PR description is accurate. The only meaningful gap is test coverage. Approve with or without the test depending on team priority. |
PR Review: fix(pegboard): unwrap actor name metadataSummary: Correct fix for a double-wrapping bug where the engine stored the entire CorrectnessThe fix is correct. The TypeScript The updated comment on line 179 accurately describes the schema and is a helpful addition. Concerns1. Silent actor name drops without logging The 2. No test coverage The PR author acknowledges stopping the test run early. No Rust unit tests exist for the 3. Missing The TypeScript VerdictThe core fix is correct and appropriately scoped. Recommend: (1) add a |
Description
Fix the Rust serverless metadata fetcher so it stores the inner actor metadata object instead of the full
ActorNamewrapper. This prevents/actors/namesfrom returningmetadata.metadatawhen actor names are sourced through the engine.Type of change
How Has This Been Tested?
Reviewed the workspace diff and traced the manager and engine codepaths to confirm the engine was wrapping
ActorNametwice. I started a targetedcargo test -p pegboard extract_actor_name_metadatarun, but stopped it after the initial dependency build was taking too long.Checklist: