os-research #32

Merged
zacheryasc merged 5 commits from os-research into master 2026-02-13 07:42:45 +00:00
Owner
No description provided.
zacheryasc added 5 commits 2026-02-13 07:42:07 +00:00
Adds `crates/wasm-actor/` (swactor-wasm-actor), which embeds wasmtime-sandboxed
Wasm instances inside regular swactor actors. Messages flow as raw bytes through
the guest ↔ host contract (alloc/handle exports, swactor.send import). The host
drains an outbox after each handle call and routes messages via ctx.send().

Includes 3 no_std guest modules (echo, double, silent) and 7 integration tests
covering roundtrip delivery, binary fidelity, multi-send, error cases, engine
sharing, and native↔wasm interop.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
Add watch/unwatch API to the actor system so actors can monitor each
other's liveness. When a watched actor dies (panic or stop), watchers
receive an ActorExited notification via on_actor_exit().

- ExitReason enum (Stopped, Panicked, NodeDown) and ActorExited struct
- ContextInner::watch()/unwatch() + Ctx typed wrappers
- ActorInterface::on_actor_exit() default method (system message fallback)
- WatchRegistry in worker with bidirectional tracking
- Death notification dispatch as phase 5b in tick_once
- Runtime-level watch for external callers
- 10 behavioral tests in tests/watch_api.rs
- Design documents for OS features in docs/os-design/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add swactor-command crate that decouples command dispatch from the
dashboard, enabling the same commands from REPL, REST, TUI, or any
future frontend.

- CommandRouter with dispatch(), CommandHandler trait, CommandMeta
- CommandRequest/CommandResponse (serde-serializable JSON protocol)
- CommandContext with Arc<Runtime> + optional StatsEnricher trait
- 9 built-in commands extracted from investigate.rs:
  help, overview, workers, worker, actors, actor, hot, phases, diff,
  shutdown
- REPL line parser (parse_line) with positional arg mapping
- REST adapter (from_query_params) for HTTP query parameters
- Dashboard integration: StatsEnricher impl for StatsCollector,
  investigate.rs refactored to thin CommandRouter wrapper,
  server.rs updated to share CommandRouter across handler threads
- 18 behavioral tests in crates/command/tests/command_api.rs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a ClusterRegistry that maps human-readable names to (ActorAddress, NodeId)
pairs, replicated across the cluster via SWIM gossip piggyback. Uses
last-writer-wins semantics with timestamp > generation > node_id tie-breaking,
and tombstone-based unregistration with configurable GC.

Key design: DistributedNode intercepts piggyback bytes on all outgoing/incoming
SWIM messages, wrapping them in a PiggybackPayload that carries both membership
updates and registry entries. SwimNode and DisseminationQueue remain untouched.

- New: crates/distribution/src/registry.rs (ClusterRegistry, pack/unpack helpers)
- Modified: node.rs (register_name/unregister_name/resolve_name API, piggyback
  interception, node death tombstoning)
- Modified: snapshot.rs (RegistryEntryInfo in DistributionNodeSnapshot)
- 12 behavioral tests in crates/distribution/tests/registry.rs
- Remove CLAUDE/ from git tracking, add to .gitignore

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
zacheryasc merged commit 78cbd80803 into master 2026-02-13 07:42:45 +00:00
zacheryasc deleted branch os-research 2026-02-13 07:42:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: zacheryasc/swactor#32
No description provided.