Applies gofmt to the 18 files that were already unformatted at HEAD (pre-existing debt — 122 insertions / 122 deletions, whitespace plus import-block reorderings only; `git diff -w` confirms no semantic changes).
Kept on its own branch so the functional change set (see the review-hardening PR) stays reviewable without formatting noise.
Verified: go build, go vet, go test ./... pass on this branch; a merge simulation with the functional branch produces a clean 3-way merge with all tests green.
Reviewed-on: #4
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
Refs #2
- /metrics served on a dedicated port (KNOX_METRICS_ADDR, default
localhost:8932) via prometheus/client_golang, with Go runtime +
process collectors
- DB-derived gauges refreshed per scrape: observations by source,
last-24h observations, entries, projects, sessions, pending
reflections, threads by status, peers, observations by origin node,
knowledge vector (max hcl per node)
- live gossip counters (pulls/pushes, observations pulled/pushed,
errors) incremented during the anti-entropy sweep; Run accepts an
optional metrics handle (nil for one-shot CLI)
- knox_node_info{node_id,name} for scrape identification
- internal/metrics package + db MetricsSnapshot; tests for snapshot,
scrape output, and counter increments
Refs #1
- /v1/diff endpoint returns each node's fingerprint set + tombstoned
auto-thread status
- knox gossip diff <peer-url>: shows peer-only/local-only fingerprints
(pull/keep preview) and tombstone divergence (resolved-on-peer vs
would-resurrect)
- knox gossip sync: one-shot anti-entropy sweep + reconcile
- gossip server starts before initial seed so peers can reach a booting
node; KNOX_PEER_ADDR alone now serves without KNOX_PEERS
- integration tests for diff + tombstone reporting
- e2e verified: two live daemons, diff previewed 1655 peer-only fps,
sync converged second node to 1655 observations