cfuzz #37

Merged
zacheryasc merged 13 commits from cfuzz into master 2026-02-13 15:00:54 +00:00
Owner
No description provided.
zacheryasc added 11 commits 2026-02-13 14:17:47 +00:00
Merge Watch death-notification system into swactor-std, reducing core
surface. WatchRegistry now lives alongside MonitorRegistry in StdExtension,
with CtxWatching and RuntimeWatching extension traits for the public API.
Phase 5b removed from tick_once; notifications delivered via on_actor_death
in phase 7. Core shrinks from 2,636 to 2,440 lines (-196, -7.4%).

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
Add WorkerExtension trait (on_tick, handle_request, gc_dead) as a
per-worker counterpart to the shared RuntimeExtension. This enables
per-worker state like timer wheels to live outside core.

- TimerWheel, TimerRequest, CloneMsg → crates/std/src/timer_wheel.rs
- CtxTimers extension trait replaces Ctx::send_after_ticks/send_interval_ticks
- schedule_timer → generic post_worker_request on ContextInner
- Worker.timers → Worker.worker_ext (Option<Box<dyn WorkerExtension>>)
- StdExtension factory creates TimerWheel per worker

Core: 2440→2320 (−120). worker.rs: 696→599 (−97).
Cumulative: 2636→2320 (−316, −12.0%). worker.rs: 845→599 (−29.1%).

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
Extract route_to_pool_or_remote() helper that unifies the routing
logic (local pool → address_map → inbox_registry) used in phases
2.5 (worker extension delivery) and 7 (death notifications).

Completes P0 core debloating: 2636→2319 (−317, −12.0%).
worker.rs: 845→598 (−247, −29.2%).

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
Move HTML content from Rust raw string literals into proper .html
files, replacing each _html.rs with a 1-line include_str!() call.

- runtime-dashboard: dashboard.html (511), actors.html (739),
  distribution.html (746)
- simulation-dashboard: dashboard.html (1,436)

Enables proper HTML syntax highlighting and linting in editors.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
Split monolithic test file into domain-specific test modules:
- common/mod.rs: shared messages, actors, helpers
- runtime_lifecycle.rs (57 tests): spawn, FIFO, threading, panic safety
- runtime_mechanics.rs (10): placement, backpressure, cleanup, recovery
- runtime_hooks.rs (12): on_start/on_stop, graceful stop
- runtime_timers.rs (6): one-shot and interval timers
- runtime_registry.rs (32): naming, monitoring, groups, ask pattern
- runtime_supervision.rs (20): supervisor + router
- runtime_hasher.rs (3): identity hasher correctness

All 140 tests pass.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
Worker struct: TimerWheel → generic WorkerExtension. TickContext: registries
moved behind RuntimeExtension. Phases 2.5/5.5/7 generalized. Ctx API split
into core (6 methods) vs extension traits (swactor-std).

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
EventStore cursor semantics (streaming, overflow, future cursor), recording
pipeline (JSON roundtrip, destructive drain), StatsCollector multi-worker
aggregation, and event sequence monotonicity.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
Remove redundant AtomicUsize/Ordering/Arc re-exports from common/mod.rs
and runtime_mechanics.rs. Zero warnings now.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
fn_complexity: per-function line count, nesting depth, and unsafe detection.
loc_analysis: per-file breakdown of logic vs comment vs blank vs string lines.
Both support --json, --top N, directory recursion.

Key finding: tick_once is 196 lines (5x runner-up), core is 1,615 logic lines.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
Measures Box::new+type-erasure (2-160ns) vs full send_to (1.9-7.2us) to
identify the real send latency bottleneck. Finding: allocation is only
1-5% of total cost; the dominant overhead is RwLock address_map lookup
and HybridChannel operations.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
Extract drain_spawns() (phases 1+4, dedup) and cleanup_dead_actors()
    (phase 7, 48 lines of complex death notification + GC logic).

    tick_once: 196 → 133 lines (−32%), max nesting depth: 5 → 3.

    Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
zacheryasc force-pushed cfuzz from a24d5415eb to d9489ccac2 2026-02-13 14:49:14 +00:00 Compare
zacheryasc added 1 commit 2026-02-13 14:58:54 +00:00
zacheryasc merged commit ae6df6d6e2 into master 2026-02-13 15:00:54 +00:00
zacheryasc deleted branch cfuzz 2026-02-13 15:00:55 +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#37
No description provided.