feat(remote): implement proxy from-substitution and outbound ID routing

Inbound wire messages are now delivered FROM the proxy representing the
remote sender, so local actors see a replyable `from`. This enables full
two-way communication across the wire:

- endpoint: deliver send_named/send via proxy (deliver_named/deliver_pid)
  instead of sending raw; from_id=0 bypasses proxy for anonymous sends

- proxy: handle deliver_named and deliver_pid to send from within actor
  scope (providing from-substitution); cache one owned pid clone per sender
  keyed by stable instance_id() to avoid use-after-free when forwarding
  reply handles to the endpoint asynchronously

- test: add remote_endpoint_id_test covering the full inbound proxy table /
  from-substitution / outbound ID table / send-by-ID round-trip

- test: extend remote_child_endpoint with echo_id actor and send_wire_by_id
  to support the new test
This commit is contained in:
CJ van den Berg 2026-03-10 12:59:13 +01:00
parent 734bb6c784
commit e75eb2d6cd
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 290 additions and 36 deletions

View file

@ -5,6 +5,7 @@ pub const ip_tcp_client_server = @import("ip_tcp_client_server.zig");
pub const remote_poc = @import("remote_poc_test.zig");
pub const remote_roundtrip = @import("remote_roundtrip_test.zig");
pub const remote_endpoint = @import("remote_endpoint_test.zig");
pub const remote_endpoint_id = @import("remote_endpoint_id_test.zig");
test {
std.testing.refAllDecls(@This());