ax(ueps): replace prose ThreatScore comment with usage example
Some checks failed
Security Scan / security (push) Successful in 31s
Test / test (push) Has been cancelled

AX Principle 2: comments must show usage with concrete values, not
restate what the type signature already says. All other UEPSHeader
field comments used assignment examples; ThreatScore was the outlier.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 10:32:35 +01:00
parent f59e6f3050
commit 1e24f8ef86
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -34,7 +34,7 @@ type UEPSHeader struct {
CurrentLayer uint8 // header.CurrentLayer = 5 // Application; 3 = Network, 4 = Transport
TargetLayer uint8 // header.TargetLayer = 3 // Network; 5 = Application (loopback)
IntentID uint8 // header.IntentID = 0x01 (ping), 0x02 (data), 0x03 (auth)
ThreatScore uint16 // 065535; elevated by integrity violations
ThreatScore uint16 // header.ThreatScore = 100 // elevated on HMAC mismatch; 0 = clean, 65535 = maximum threat
}
// builder := ueps.NewPacketBuilder(intentID, payload); frame, _ := builder.MarshalAndSign(secret)