Commit graph

5 commits

Author SHA1 Message Date
Claude
840418c33e
ax(ueps): rename NewBuilder to NewPacketBuilder for AX Principle 1 compliance
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Ambiguous constructor name required reading the return type to know what
it builds. NewPacketBuilder is self-documenting without context.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:45:23 +01:00
Claude
21b7eb9a93
ax(ueps): test errMissingHMAC path in ReadAndVerify Ugly case
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
TestReader_ReadAndVerify_Ugly previously tested wrong-secret (errIntegrityViolation),
duplicating the Bad case. Replaced with a hand-crafted frame that omits the HMAC TLV,
exercising the errMissingHMAC sentinel that was entirely untested.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:41:48 +01:00
Claude
0c4cf1f7c3
ax(ueps): strip 11 prose test comments that restate function names
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Test names encode intent — prose descriptions add zero information.
Per AX-2: if comment restates the signature, delete it.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:48:01 +01:00
Claude
9dbde075b2
ax(ueps): remove prose description from TestReader_ReadAndVerify_Good comment
AX Principle 2 — comments must be usage examples, not prose descriptions.
The leading "verifies a well-formed signed frame" line restated the test
name without adding information; the usage example below it was sufficient.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:30:33 +01:00
Claude
72d85986c6
ax(ueps): add reader_test.go with Good/Bad/Ugly coverage for ReadAndVerify
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
One test file per source file is mandatory per AX conventions. reader.go
had no corresponding test file — this adds the three required test cases
covering valid round-trip, tampered frame rejection, and wrong-secret rejection.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:11:05 +01:00