Commit graph

11 commits

Author SHA1 Message Date
Developer
8782638193 feat: actor monitoring with Down message notifications (Cycle 13)
Add MonitorRegistry for death watch subscriptions. Actors subscribe via
ctx.monitor(target) and receive a Down { addr, reason } message when the
target dies (stop or panic). Supports stacking, demonitor, and automatic
cleanup of dead watcher subscriptions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 13:16:38 +00:00
Developer
66a8523473 feat: named actor registry with auto-cleanup on death (Cycle 12)
Add NameRegistry (String → ActorAddress) to delivery.rs with forward and
reverse maps for O(1) lookup and cleanup. Actors can be spawned with names
via rt.spawn_named() / ctx.spawn_named(), looked up via where_is(), and
names are automatically freed when actors stop or panic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 13:06:25 +00:00
Developer
d58a999db0 feat: per-worker tick-counting timers with one-shot and interval support
Adds deterministic tick-based timer scheduling to the actor runtime.
Timers are per-worker (no cross-thread sync) and tick-counted (not
wall-clock), making them suitable for simulation and testing.

API: ctx.send_after_ticks() for one-shot, ctx.send_interval_ticks()
for repeating timers. Timer messages route through the full delivery
system (local pool, cross-worker transfer, and external inboxes).

Fixes over-aggressive interval timer GC that incorrectly removed
timers targeting inboxes and cross-worker actors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 12:43:11 +00:00
Developer
0213938964 fix: dead actor cleanup prevents AddressMap and ActorPool memory leak
Poisoned actors are now removed from ActorPool and AddressMap after
tick_all (phase 7). Previously they leaked indefinitely. Sends to
cleaned-up actors return Err instead of silently discarding — callers
learn the actor is gone.

Known bug class in Akka (#22990), C++ Actor Framework (#420).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 12:11:58 +00:00
Developer
7d00e65a0a feat: load-aware actor placement + work stealing research
Replace blind round-robin placement with load-aware strategy that reads
per-worker stats (actor count + mailbox depth) and biases toward lighter
workers. Falls back to round-robin when stats are equal (initial burst).

Deep research on work stealing across Tokio (steal-half, LIFO slot),
Go (M:N scheduler), BEAM (proactive migration), and ForkJoinPool.
Full actor migration is feasible but deferred due to message-loss window.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:46:53 +00:00
Developer
acacc1b758 feat: thread parking for instant worker wakeup
Replace thread::sleep with thread::park_timeout in worker backoff loop.
Workers register their thread handle via OnceLock<Thread> on startup.
When send_to or spawn routes work to a worker, Thread::unpark() wakes
it instantly instead of waiting for the sleep timer to expire.

Inspired by tokio's parker state machine and Linux NO_HZ adaptive ticks.

Implementation:
- Runtime stores Vec<OnceLock<Thread>> for worker thread handles
- Workers call OnceLock::set(thread::current()) on startup
- Runtime::send_any, spawn_any, and WorkerContext cross-worker sends
  call notify_worker() → Thread::unpark() on the target worker
- TickContext carries worker_threads reference for cross-worker notification
- Zero new dependencies (std::sync::OnceLock + std:🧵:park_timeout)

Benefits:
- Parked workers wake instantly when work arrives (vs up to 1ms sleep delay)
- No overhead on hot path — unpark() is no-op if thread isn't parked
- Single-threaded tick() mode unaffected (OnceLock never set)

All 58 tests pass (52 runtime_api + 5 transport + 1 doctest).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:31:34 +00:00
076f1194bf feat: tui, agent interface, stats hook (#29)
Runtime dashboard now features a TUI option and an interface for LLM tool use. Removed some bloat from stats collecting and replaced with a hook function to dump runtime stats into.
2026-02-11 15:23:26 +00:00
2da9198ee9 fix: stats datatypes and refactor channel signature (#28) 2026-02-10 07:35:58 +00:00
ef08d3e7a5 feat: transport protocol (#27)
Address actors via ID, send messages over transport (TCP, QUIC, etc)
2026-02-09 19:05:37 +00:00
282fcc3d01 refactor: better tests (#18)
Still unsatisfied, but these are better than before.
2026-02-07 17:29:01 +00:00
08a655d88a refactor: graph-optimization (#17)
Use spectral analysis tool to find spurious edges in the code DAG, refactoring to prune.
2026-02-07 16:51:40 +00:00
Renamed from src/address_map.rs (Browse further)