Commit graph

161 commits

Author SHA1 Message Date
077d47f8b2
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-03-12 22:21:27 +01:00
916ecfa9dd
build: update cbor to v1.1.0 2026-03-12 22:17:14 +01:00
367c497a38
fix: make timer_.on_expired survive (not crash) if the timer as been destroyed 2026-03-11 21:07:11 +01:00
bbcc800964
refactor: add remote exit test 2026-03-10 23:02:29 +01:00
981ab22c5c
feat: implement endpoint link and exit handling 2026-03-10 23:01:59 +01:00
9a7cc8faed
refactor: implement transport_error 2026-03-10 15:46:02 +01:00
bf45b592ac
refactor: remove proxy_id concept entirely
Not really needed and just adds extra fluff.
2026-03-10 15:25:20 +01:00
e32dc6e9b8
refactor: make all tests write to a test trace file when TRACE=true 2026-03-10 15:15:42 +01:00
c33802f559
fix: cpp tests hanging when traces are enabled 2026-03-10 15:09:51 +01:00
0c66093726
refactor: make remote tests write trace files on TRACE=true 2026-03-10 15:09:10 +01:00
e430b209eb
refactor: trace actor instance IDs instead of pointer values 2026-03-10 13:35:15 +01:00
5994549daf
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-03-10 13:33:43 +01:00
e1eefa2ca9
refactor: make instance_id a incrementing integer instead of a point value 2026-03-10 13:08:34 +01:00
e75eb2d6cd
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-03-10 12:59:13 +01:00
734bb6c784
refactor: export trace_to_json_file in zip api 2026-03-10 12:56:59 +01:00
fff2c268c2
feat: add instance_id actor primative 2026-03-10 12:55:54 +01:00
685710c45b
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-03-07 17:53:07 +01:00
dfb377ab6e
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-03-07 17:42:08 +01:00
e90009074a
feat: add unlinked-spawn to the C and Zig APIs 2026-03-07 17:40:24 +01:00
87c4a6f32c
WIP: implement proxy 2026-03-07 15:08:52 +01:00
cb37b9b82b
WIP: add remaining message types 2026-03-07 14:51:25 +01:00
0e804fc61f
WIP: add remote_endpoint_test 2026-03-07 14:46:18 +01:00
b580d9da36
WIP: refactor: add remote_roundtrip_test 2026-03-06 21:32:14 +01:00
47f4202b94
WIP refactor: add remote_poc_test 2026-03-06 21:24:08 +01:00
ddc06d67d6
fix: update subprocess to new Receiver interface 2026-03-06 21:16:37 +01:00
367173d30d
WIPWIP: docs/remoting-poc-test.md 2026-03-06 20:27:10 +01:00
c2c6c1c187
docs: add remoting design document 2026-03-05 15:01:54 +01: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
6eadc0fe29
fix: port subprocess_windows.zig to zig-0.15 2025-10-01 16:55:40 +02:00
fb9207d225
fix: subprocess drain should write buffered data too 2025-09-29 22:27:39 +02:00
ad6f40b456
fix: don't use noopFlush in subprocess writer 2025-09-29 22:04:14 +02:00