Commit graph

10 commits

Author SHA1 Message Date
446667892c
feat: clean up local_actors/outbound tables when senders exit
The endpoint now links to each local actor when it is first assigned an
outbound wire ID, trapping the exit to remove stale entries from the
outbound and local_actors tables.

To preserve spawn_link semantics, the endpoint stores the spawner's
instance_id() at init time. Trapped exits from the spawner are always
re-propagated regardless of whether the spawner also appears as an outbound
sender.
2026-04-17 22:47:23 +02:00
46cbd53a24
feat: implement endpoint link and exit handling 2026-04-17 22:47:23 +02:00
3bee4a9e40
refactor: implement transport_error 2026-04-17 22:47:23 +02:00
5a6fe9f36c
refactor: remove proxy_id concept entirely
Not really needed and just adds extra fluff.
2026-04-17 22:47:23 +02:00
bf5a80ef05
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
2026-04-17 22:47:22 +02:00
a0879d063b
feat(remote): implement outbound ID table for local actor identity on the wire
- Proxy passes sender's handle pointer as from_id instead of 0
- Endpoint assigns stable wire IDs to local actors on first send, keyed by handle pointer
- Reverse table (wire_id → pid) enables inbound send routing to local actors by ID
- Full bidirectional send-by-ID is now functional end-to-end
2026-04-17 22:47:22 +02:00
b000eaf01e
feat(remote): add inbound proxy table to endpoint
- Spawn a local Proxy actor on first message from each new remote actor ID
- Route inbound wire exit to the corresponding proxy
- Clean up proxy table entries on proxy_exit notification
- Teardown sends {"exit", "transport_closed"} to all live proxies
2026-04-17 22:47:22 +02:00
0780004cf7
WIP: implement proxy 2026-04-17 22:47:22 +02:00
c56aa44312
WIP: add remaining message types 2026-04-17 22:47:22 +02:00
3b9e10a03d
WIP: add remote_endpoint_test 2026-04-17 22:47:22 +02:00