feat: support reference mutation through IPC#4
Merged
Conversation
wellwelwel
previously approved these changes
Mar 17, 2026
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.
Problem
When running as a child process, calling a shared resource method that mutates a reference argument (e.g. pushing into an array, updating an object property) had no effect on the caller's local variable. Arguments are serialized over IPC to the parent, where a copy gets mutated — but the original reference in the child was never updated.
Solution
After each remote procedure call, the parent now sends back the post-call state of all arguments (
mutatedArgs). The child-side proxy then reconciles each original reference in-place using a newwriteBackutility.