Skip to content

fix(pong)!: change gauges value type from int64 to uint64#42

Open
VasilevNStas wants to merge 1 commit into
APN-Network:masterfrom
VasilevNStas:10-fix/gauges-uint64
Open

fix(pong)!: change gauges value type from int64 to uint64#42
VasilevNStas wants to merge 1 commit into
APN-Network:masterfrom
VasilevNStas:10-fix/gauges-uint64

Conversation

@VasilevNStas

@VasilevNStas VasilevNStas commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Description

Changes the gauges value type from int64 to uint64 — all documented gauge values are non-negative.

Problem

map<string, int64> admits negative values that have no defined meaning for any documented key:

  • SLA (load average × 100), clients, version, brothers, stalls, rtt, PPM, MEM — all ≥ 0
  • version is documented as mirroring Welcome.minor (uint32), yet the wire type allowed -1

Fix

map<string, uint64> — rules out semantically impossible negative values at the type level.

Migration

Breaking only for negative integers, which are never produced by the Node and carry no semantics. All real values (≥ 0) are compatible without changes.

Closes #10

@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@davvd plz review

@davvd

davvd commented Jul 4, 2026

Copy link
Copy Markdown
Member

@VasilevNStas we have merge conflicts here, please resolve them and we'll merge

All documented gauge values (SLA, clients, version, brothers,
stalls, rtt, PPM, MEM) are inherently non-negative. Using int64
admits negative values that have no defined protocol meaning and
no consumer can interpret. The sharpest inconsistency is the
'version' gauge, documented to mirror Welcome.minor (uint32),
yet the wire type allowed -1.

Change map<string, int64> to map<string, uint64>. This is a
breaking wire change only for negative integers, which carry no
semantic value and are never produced by the Node.
@VasilevNStas
VasilevNStas force-pushed the 10-fix/gauges-uint64 branch from 5ed3d41 to 8a88975 Compare July 4, 2026 18:04
@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@davvd conflicts resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pong.gauges value type is int64 but all documented gauge values are non-negative

2 participants