Part of the core-rebuild epic — follows the shared rigor contract there.
Component
src/supervision.rs, src/links.rs (~2,588 LOC). Link graph, death-watch, SupervisionStrategy, restart. The gnarliest, most concurrency-heavy part — and the source of the current flaky-test pain (#100-class settle races).
Learning & discussion
Erlang/OTP-style supervision. Death detection and restart policy are distinct — Zenoh liveliness will later supply detection across nodes, but the policy state machine stays ours. Restart storms and link/unlink/die interleavings are where correctness lives.
Existing crates
parking_lot for the link graph locking (#52); consider petgraph for the graph structure.
Research — best algorithm/approach
OTP supervision trees; restart strategies (one-for-one / all-for-one / rest-for-one); escalation; restart-intensity/max-restarts limits (limit hit = Result, not panic).
Testing — hard as fuck
Sequence (link → die → notify ordering), lifecycle, linearizability (restart storms; concurrent link/unlink/die), and the heaviest DST burden of any card — deterministically reproduce the #100-class flakes instead of settling-with-timeouts. loom on the link graph. Mutation: cargo-mutants, zero survivors.
Absorbs
#52 (parking_lot for the supervision link graph).
Part of the core-rebuild epic — follows the shared rigor contract there.
Component
src/supervision.rs,src/links.rs(~2,588 LOC). Link graph, death-watch,SupervisionStrategy, restart. The gnarliest, most concurrency-heavy part — and the source of the current flaky-test pain (#100-class settle races).Learning & discussion
Erlang/OTP-style supervision. Death detection and restart policy are distinct — Zenoh liveliness will later supply detection across nodes, but the policy state machine stays ours. Restart storms and link/unlink/die interleavings are where correctness lives.
Existing crates
parking_lotfor the link graph locking (#52); considerpetgraphfor the graph structure.Research — best algorithm/approach
OTP supervision trees; restart strategies (one-for-one / all-for-one / rest-for-one); escalation; restart-intensity/max-restarts limits (limit hit =
Result, not panic).Testing — hard as fuck
Sequence (link → die → notify ordering), lifecycle, linearizability (restart storms; concurrent link/unlink/die), and the heaviest DST burden of any card — deterministically reproduce the #100-class flakes instead of settling-with-timeouts. loom on the link graph. Mutation:
cargo-mutants, zero survivors.Absorbs
#52 (parking_lot for the supervision link graph).