No description
Find a file
Zachery Aaron Shores-Chmielewski ed1d5fe21e refactor(process): process-manager cleanup
Replace the driver/session/action/event abstraction with a single OS-process supervisor thread and a minimal lifecycle-only public API.

- supervisor: add a dedicated swactor-process-supervisor thread that owns the child, runs it with null stdio, wakes via an eventfd plus poll(2), reaps with waitpid(WNOHANG), and escalates SIGTERM to SIGKILL after a deadline, reporting only lifecycle ThreadEvents over a SegQueue plus wake channel
- actor: collapse ProcessActor<D> into a non-generic state machine (Spawning/Running/Stopping/Done) that owns the supervisor handle, drains events on SupervisorWake, forwards lifecycle as ProcessOutput, and triggers shutdown_now in on_stop
- lifecycle: add ProcessOutputConfig (Disabled/DatastreamMirror) with a JSON proc.<label>.lifecycle mirror (schema swactor_process.lifecycle.v1), command-basename label derivation/sanitization, and an RAII reservation registry preventing duplicate channels
- message/types/spawn/lib: trim the API — ProcessCommand is now only Stop { kill_after }, ProcessOutput covers Started/SpawnFailed/Exited/Error, ProcessSpec keeps command/args/env/working_dir/label; re-export spawn_local_process/send_process_command and drop the custom-driver spawn_process
- removed: delete the action/event/local/mock/session modules and the ProcessDriver/ProcessWaker/EventQueue/PtySize/ProcessMode types plus the old test suite (actor_scenarios, e2e_process, local_driver, proptest_session, session_scenarios); add public_api_stage1/2 tests and the SWACTOR_MANAGED_PROCESS_SPEC.md
- swactor core: demote ProcessOutputObserver to a legacy/custom adapter (no longer auto-attached), remove Runtime::set_process_output_observer and Ctx::process_output_observer, and add the datastream dependency to the process crate for the mirror

Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-07-18 15:21:34 +04:00
.cargo feat(mvp-system): expand one-node mvp binaries and provisioning 2026-07-05 13:59:51 +04:00
apps/mvp-node feat: rework datastream into catalog events, add gguf metadata 2026-07-12 10:14:34 +04:00
crates refactor(process): process-manager cleanup 2026-07-18 15:21:34 +04:00
src refactor(process): process-manager cleanup 2026-07-18 15:21:34 +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(mvp-system): rewrite mvp_chat bin, add chat/orchestrator specs 2026-07-15 12:49:56 +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(process): process-manager cleanup 2026-07-18 15:21:34 +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