Erase client lifecycle handlers through avatar wrapper#125
Merged
ogyrec-o merged 1 commit intoMay 28, 2026
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Follow-up to #124 for #123.
Wraps concrete
ClientLifecycleHandlervalues in an avatar-owned erased registration payload before passing them through the hiddenfreven_world_apibackend boundary.Why
#124 added the SDK-facing registration boundary, but the initial hidden plumbing passed the concrete handler type
HthroughBox<dyn Any + Send + Sync>.The engine runtime does not know the concrete
H, so it cannot downcast and recover a callableClientLifecycleHandler.This PR adds
ClientLifecycleHandlerRegistration, which storesBox<dyn ClientLifecycleHandler>. The runtime can downcast the hidden Any payload to this stable avatar-owned wrapper and then store/call the boxed handler.Boundaries
Validation
cargo +stable check --locked -p freven_avatar_apicargo +stable test --locked --workspacecargo +stable clippy --locked --workspace --all-targets -- -D warningscargo +stable fmt --all -- --checkgit --no-pager diff --checkRelated