Raft snapshots actually happen, and the log finally truncates.
fix(cluster): apply every raft tuning value, and stop the log growing forever
The production node had not snapshotted since 2026-08-23. Every restart
restored a two-week-old snapshot, rebuilt derived indexes for the state as of
that date, and warned for each message whose blob had since been collected --
warnings that accumulate permanently, one per delete-then-GC cycle. It also
feeds the accepted first-delivery stall (B12), which scales with log size.
Three causes, only one of them tuning.
snapshot_interval was parsed, defaulted, documented and set in the production
config, and never assigned to raft.Config. A settable key with no destination
is invisible: nothing downstream changes, so no behavioural test can see it.
TrailingLogs was not configurable, and raft's own default of 10240 exceeds
this project's snapshot_threshold default of 8192. Neither number is wrong
alone, but together the threshold is inert -- a snapshot fires and then
retains more entries than triggered it, so the log never truncates. It is now
configurable, and an inverted pairing is refused at startup with the reason in
the error. A node on the defaults is warned rather than refused, because
changing those defaults would alter behaviour for existing deployments.
The threshold was also far too high for a node delivering roughly five
messages a day. Code defaults are unchanged; only the production config is
tuned, to 256 with 128 trailing.
Adds "bongo-go cluster snapshot" to force one on the leader, since a stale
snapshot cannot otherwise be cleared without waiting for the threshold.
Known issue, not fixed here: "bongo-go cluster status" cannot authenticate
against a node with web.session_secret set. It calls http.Get unsigned against
an endpoint behind RequireInternalAuth and returns 401.