dumpFormationState

A one-line, grep-able snapshot of every in-flight formation: what this peer advertises, what it can see, what it has stopped dialling and why, what it is still dialling and how hard, which links exist, and what the radio says (#2420).

Why this exists

This fabric's failure mode is silence. A redialer parked on a wrongly-settled endpoint emits nothing for the seam's whole lifetime, so a wedged device and an idle one produce identical logs — which is what made #2416 a two-device forensic exercise (pull both phones' stores, decode, correlate by hand) rather than a one-line read. This is the fabric-side equivalent of the Raft/warp sim harnesses' dumpState(): a hang that names its own state.

The loom calls it on a bounded geometric schedule while a formation is stuck (see MAX_FORMATION_DUMP_INTERVAL) and once on the weave timeout path, logging the result at WARN under nw.loom.formation-stuck. It is public so a consumer can also pull it on demand — from a "still connecting…" UI timeout, a crash reporter, or an integration harness — and it is safe to call at any time: it takes no lock it does not already need and changes no decision.

The returned body carries no event tag; the loom's own emission prefixes nw.loom.formation-stuck. A caller logging it itself should include an equivalent marker, or the line is unfindable in a capture.