No description
Find a file
Zachery Aaron Shores-Chmielewski 7627ef3e18 feat: actor direct control via runtime admin
Add a RuntimeAdmin control plane for out-of-band inspection and mutation of live actors, bypassing their normal message handlers.

- src/admin.rs: add RuntimeAdmin + Admin<T> reply handle, the AdminCommand enum (ListActors, InspectActor, GetActorState, ReplaceActorState, StopActor, SuspendActor, ResumeActor), typed result types (ActorSummary/ActorStatus/ActorStateSnapshot/ListActorsResponse), and AdminError (ActorNotFound/AddressMismatch/TypeMismatch/Timeout)
- src/actor.rs: expose type-erased accessors on AnyActor — metadata() returning ActorTypeMetadata plus as_any()/as_any_mut() for downcasting — and Actor::inner()/replace_inner() so admin can snapshot or swap concrete actor state
- src/runtime.rs: wire a per-worker admin channel (admin_txs), expose Runtime::admin(), and implement the RuntimeAdmin ops that resolve an address to its owning worker, send the command, notify that worker, and return an Admin<T> handle; Admin::recv_ticking drives ticks and collects the reply
- src/worker.rs: add an admin_rx receiver and a drain_admin tick phase run before actor handlers, plus ActorPool helpers (actor_summary, get_actor_erased[_mut], suspend/resume/stop_actor_admin) that apply commands on the worker thread; fold admin_rx into the fast-idle has_work/tick_once checks
- tests/runtime_admin.rs: add 608 lines of end-to-end coverage for list/inspect/get/replace/stop/suspend/resume and the type-mismatch and not-found error paths

Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-07-08 19:23:03 +04:00
.cargo feat(mvp-system): expand one-node mvp binaries and provisioning 2026-07-05 13:59:51 +04:00
apps/mvp-node refactor ssh bootstrap logic 2026-07-08 18:06:00 +04:00
crates refactor ssh bootstrap logic 2026-07-08 18:06:00 +04:00
src feat: actor direct control via runtime admin 2026-07-08 19:23:03 +04:00
tests feat: actor direct control via runtime admin 2026-07-08 19:23:03 +04:00
tools/vastai refactor: retire old pipeline-parallel app, restructure mvp-system 2026-07-07 14:40:02 +04:00
xtask refactor: retire old pipeline-parallel app, restructure mvp-system 2026-07-07 14:40:02 +04:00
.dockerignore refactor: retire old pipeline-parallel app, restructure mvp-system 2026-07-07 14:40:02 +04:00
.gitignore refactor: retire old pipeline-parallel app, restructure mvp-system 2026-07-07 14:40:02 +04:00
Cargo.lock refactor: retire old pipeline-parallel app, restructure mvp-system 2026-07-07 14:40:02 +04:00
Cargo.toml feat: add mvp provisioning subsystem and datastream transport 2026-06-25 16:30:18 +04:00
README.md feat: add mvp provisioning subsystem and datastream transport 2026-06-25 16:30:18 +04:00

swactor

Minimal actor runtime for Rust. One trait, one message type. Single-threaded (tick()) or multi-threaded (run()).

Description

Core runtime is src/. Actors implement ActorInterface (in actor.rs), interact through Ctx (in runtime.rs), and run on worker threads (worker.rs).

crates/ builds upward: std adds OTP patterns (supervision, monitoring, groups), distribution adds clustering, everything else composes from there.

Dev commands

cargo xtask --help for the basic test command.

Testing

cargo check --workspace
cargo xtask test