Merge branch 'rfc010-cluster': RFC 010 clustering (c1–c16 + Phase 6) onto the v0.7.0 + perf-audit tree

Both lines branched from ca1c983 (v0.6.1 + try_spawn). master carried
graceful shutdown, gen_server/gen_statem lifetime, v0.7.0 and the 16
perf-audit commits; rfc010-cluster carried clustering behind
`--features cluster`. Two resolutions beyond the automatic merge:

- tests/channel.rs: both sides deflaked the spawn-then-monitor race in
  channel_ops_interleaved_with_monitor_churn_multi_thread. Kept master's
  `spawn_monitor` (monitor registered before publish) over the cluster
  side's `go`-gated spawn; same intent, API-level fix.
- src/cluster/envelope.rs: master added `DownReason::Shutdown`, which
  made the `Frame::Down` reason codec non-exhaustive. New wire tag
  DR_SHUTDOWN = 6, encoded and decoded symmetrically. `Shutdown` never
  rides in a `Down` by contract (a target that honours the request
  exits normally); the tag exists so the codec stays total. Tags 1–5
  unchanged.

Gates on the merged tree (rustc 1.98.1): default 405/0, cluster 492/0
(0 ignored beyond the 11 pre-existing `ignore` doctests), clippy --lib
-D warnings on both configs, doctests. cluster_disconnect still ~1.8s
(SMARM_FAST_TIMING plumbing intact).
This commit is contained in:
claude-asm-audit
2026-09-12 05:25:50 +00:00
45 changed files with 10384 additions and 310 deletions
+11
View File
@@ -33,6 +33,11 @@ budget-accounting = []
# and unflagged; only the optional gen_server transport sits behind this, so a
# release build pays nothing for an observer it never starts.
observer = []
# RFC 010 c1: clustering. Off by default — the default build stays libc-only,
# byte-for-byte (gate checked per phase). serde is the payload contract,
# postcard the payload codec; both minimal (no default features). Everything
# cluster-shaped lives behind this flag.
cluster = ["dep:serde", "dep:postcard"]
# Run-queue selection: exactly one, compile-time (see src/run_queue.rs).
# Non-default variants need --no-default-features (features are additive).
rq-mutex = []
@@ -44,12 +49,18 @@ cc = "1"
[dependencies]
libc = "0.2"
# RFC 010 §2 — only compiled under `--features cluster`.
serde = { version = "1", default-features = false, optional = true }
# `alloc` (not `std`): the seam serializes to Vec; postcard stays no_std-aligned.
postcard = { version = "1", default-features = false, features = ["alloc"], optional = true }
[target.'cfg(loom)'.dependencies]
loom = "0.7"
[dev-dependencies]
libc = "0.2"
# derive + std for cluster envelope tests only; the lib itself never needs them
serde = { version = "1", features = ["derive"] }
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "sync", "time"] }
[profile.dev]