Commit graph

164 commits

Author SHA1 Message Date
38e16482d6
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-15 13:03:56 +02:00
d6a0097120
fix: make timer_.on_expired survive (not crash) if the timer as been destroyed 2026-04-15 13:03:56 +02:00
3cc3013a88
refactor: add remote exit test 2026-04-15 13:03:56 +02:00
6395b63bd8
feat: implement endpoint link and exit handling 2026-04-15 13:03:55 +02:00
4baca8b192
refactor: implement transport_error 2026-04-15 13:03:55 +02:00
650beac975
refactor: remove proxy_id concept entirely
Not really needed and just adds extra fluff.
2026-04-15 13:03:55 +02:00
bc45042063
refactor: make all tests write to a test trace file when TRACE=true 2026-04-15 13:03:55 +02:00
f68af5ec6e
fix: cpp tests hanging when traces are enabled 2026-04-15 13:03:55 +02:00
f64f8de656
refactor: make remote tests write trace files on TRACE=true 2026-04-15 13:03:55 +02:00
1b9338bdd3
refactor: trace actor instance IDs instead of pointer values 2026-04-15 13:03:55 +02:00
25143e6cb0
fix(cbor): reset json stream to dec mode in tohex
We were leaking hex mode into the stream causing the following values to
sometimes be hex.
2026-04-15 13:03:55 +02:00
69a5062c82
refactor: make instance_id a incrementing integer instead of a point value 2026-04-15 13:03:55 +02:00
3dcb9f0e2f
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-15 13:03:55 +02:00
639999f37e
refactor: export trace_to_json_file in zip api 2026-04-15 13:03:55 +02:00
a51c6c51fa
feat: add instance_id actor primative 2026-04-15 13:03:55 +02:00
7432e8382a
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-15 13:03:55 +02:00
43406334b7
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-15 13:03:55 +02:00
d06af8367d
feat: add unlinked-spawn to the C and Zig APIs 2026-04-15 13:03:55 +02:00
d40db53545
WIP: implement proxy 2026-04-15 13:03:55 +02:00
ae619675de
WIP: add remaining message types 2026-04-15 13:03:54 +02:00
02bda4ae61
WIP: add remote_endpoint_test 2026-04-15 13:03:54 +02:00
1865c73232
WIP: refactor: add remote_roundtrip_test 2026-04-15 13:03:54 +02:00
df8f3876a9
WIP refactor: add remote_poc_test 2026-04-15 13:03:54 +02:00
a817bc6868
fix: update subprocess to new Receiver interface 2026-04-15 13:03:54 +02:00
d75f0cf188
WIPWIP: docs/remoting-poc-test.md 2026-04-15 13:03:54 +02:00
f57958a724
docs: add remoting design document 2026-04-15 13:03:54 +02:00
469e26c0d8
fix: windows build 2026-04-15 12:46:53 +02:00
3a321ecfe0
fix(zig-0.16): update return trace handling to new API 2026-04-15 12:46:13 +02:00
af6262e48e
build: update to final zig-0.16.0 release 2026-04-15 12:45:24 +02:00
d545b10ce8
build: update to zig-0.16.0-dev.3133+5ec8e45f3 2026-04-09 19:47:17 +02:00
8d359a75a1
refactor: clean-up ip_tcp_client_server_c 2026-03-04 21:45:01 +01:00
e9c1758101
feat: add thespian_unexpected to C API 2026-03-04 21:42:30 +01:00
5789db98fc
fix: ip_tcp_client_server_c 2026-03-04 21:34:11 +01:00
ca4d224db4
refactor: add lots of logging 2026-03-04 21:06:53 +01:00
824faa87da
refactor: add a test using the C API 2026-03-04 20:22:26 +01:00
cf6685b34b
refactor: add some misuse checks to the C API 2026-03-04 20:19:59 +01:00
703e5d5be1
feat: add thespian_exit to the C API 2026-03-04 20:19:15 +01:00
e9998ce127
refactor: remove junk c api tests 2026-03-04 19:48:01 +01:00
33229ffc11
fix: clean-up and fix ip_tcp_client_server.zig testcase 2026-03-04 19:41:39 +01:00
5a729b6d06
feat: BREAKING force all zig actors to declare a destructor
Actors may be destroyed without ever calling their receivers. This is
regular behavior when an actor is killed by an exit message. C++ actors
cleanup automatically via their destructors. Up to now zig actor had to
enable trapping and cleanup on the exit message. This was a big foot gun
and cumbersome.

Now all zig actors are required to pass a deinit function to
thespian.receive. This simplifies clean up and prevents the foot gun
entirely.
2026-03-04 19:32:11 +01:00
b16a47efae
fix: ip_tcp_client_server.zig testcase 2026-03-04 18:34:42 +01:00
224342611c
WIP: start work on a ip_tcp_client_server test in zig 2026-03-04 10:49:33 +01:00
d1cb42d53c
feat: add C & Zig bindings for socket 2026-03-04 10:49:33 +01:00
e19ff271d0
feat: add C & Zig bindings for tcp connector and acceptor 2026-03-04 10:49:33 +01:00
ed91a28f5f
feat: add C & Zig bindings for unix acceptor and connector 2026-03-04 10:49:33 +01:00
628e990f6e
docs: add some basic info to readme 2026-03-04 10:49:24 +01:00
8d9117b9e7
build: switch upstream cbor branch (same commit) to stay on zig-0.15 2026-02-22 12:54:20 +01:00
7da13f44e8
build: update cbor for enum cborExtract support 2026-01-22 14:54:24 +01:00
265bc025d5
build: remove zig wrapper and replace it with cdb helper
Just use anyzig. No real need for a zig wrapper any more.
2026-01-22 14:53:43 +01:00
a2aa34cf35
build: use correct minimum zig version 0.15.2 2026-01-22 14:52:37 +01:00