Skip to content

feat: support reference mutation through IPC#4

Merged
Lojhan merged 3 commits intomainfrom
feat/reference_args_mutation
Mar 17, 2026
Merged

feat: support reference mutation through IPC#4
Lojhan merged 3 commits intomainfrom
feat/reference_args_mutation

Conversation

@Lojhan
Copy link
Collaborator

@Lojhan Lojhan commented Mar 17, 2026

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 new writeBack utility.

@Lojhan Lojhan requested a review from wellwelwel March 17, 2026 19:37
wellwelwel
wellwelwel previously approved these changes Mar 17, 2026
@Lojhan Lojhan merged commit 8f140aa into main Mar 17, 2026
12 checks passed
@Lojhan Lojhan deleted the feat/reference_args_mutation branch March 17, 2026 20:15
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.

2 participants