Expand description
The signalling path’s losses, read as one thing.
docs/specs/sip-transport.md §12.1 requires every discard in the signalling path to be counted.
§12.3 says which crates that path is, and why the atomics behind those counts are still two sets
while the reading of them is one.
§Why a joined reading rather than joined storage
sipx-transport cannot depend on sipx-call — the dependency runs the other way and reversing
it would put the dialog layer underneath the socket. So the counters themselves stay where the
events happen: the transport’s in sipx_transport::Counters, the dispatcher’s in
DispatchCounts. That much is forced.
What was not forced, and what X-54 is about, is that an operator had to know the crate
boundary to ask. Handle::counters and Calls::counts were two snapshots that nothing outside
each crate’s own tests ever read, so M12’s clause — every discard counted and exportable next
to a capture — was two features that existed separately. SignallingCounts is the one
reading, and sipx --counters (crates/sipx-cli) is the export beside --capture.
§The join embeds, it does not recount
SignallingCounts::transport is exactly what sipx_transport::Handle::counters returns,
copied and not re-derived, for the reason sipx_transport::Counters::shed already states about
itself: two tallies of one event eventually disagree, and then neither can be trusted. The same
rule is why this type has no arithmetic of its own beyond SignallingCounts::any_loss, which
is a disjunction of the two halves’ own answers rather than a third opinion.
§Why dispatch is an Option and not a zeroed struct
An endpoint with no dispatcher running has not dispatched nothing — it has not been asked. Those
are different claims and a zero cannot tell them apart, which is the failure X-18 deleted
DiscardCounts::adopted_late over: a counter structurally stuck at zero tells an operator “this
never happens”, and that is worse than silence.
Structs§
- Signalling
Counts - Every loss in the signalling path, from both crates that own one (§12.3).