Commit graph

165 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
b74975d2eb
fix: make timer_.on_expired survive (not crash) if the timer as been destroyed 2026-04-17 22:47:23 +02:00
35600d6029
refactor: add remote exit test 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
1c4ae46a83
refactor: make all tests write to a test trace file when TRACE=true 2026-04-17 22:47:22 +02:00
06bb99354b
fix: cpp tests hanging when traces are enabled 2026-04-17 22:47:22 +02:00
5c17f1b1d2
refactor: make remote tests write trace files on TRACE=true 2026-04-17 22:47:22 +02:00
15d95fd4c0
refactor: trace actor instance IDs instead of pointer values 2026-04-17 22:47:22 +02:00
4f1fe3e4ef
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-17 22:47:22 +02:00
ac9a448933
refactor: make instance_id a incrementing integer instead of a point value 2026-04-17 22:47:22 +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
be7aeefd21
refactor: export trace_to_json_file in zip api 2026-04-17 22:47:22 +02:00
d384c624f5
feat: add instance_id actor primative 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
a1745659d2
feat: add unlinked-spawn to the C and Zig APIs 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
0705447e3b
WIP: refactor: add remote_roundtrip_test 2026-04-17 22:47:22 +02:00
9c99f93828
WIP refactor: add remote_poc_test 2026-04-17 22:47:18 +02:00
822b8f3a87
WIPWIP: docs/remoting-poc-test.md 2026-04-17 22:46:22 +02:00
7a855d4ec8
docs: add remoting design document 2026-04-17 22:46:22 +02:00
f35818fb56
fix(zig-0.16): update subprocess modules to zig-0.16 2026-04-17 22:45:21 +02:00
a0fa97cdde
fix: enable endpoint_unx on all posix targets 2026-04-15 13:05:08 +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