Commit graph

391 commits

Author SHA1 Message Date
Claude
cb02cdb6b8
ax(node): replace prose comment with usage example on handleWSUpgrade
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
The comment "handleWSUpgrade handles incoming WebSocket connections" restated
the function signature without adding information. Replaced with a concrete
call-site example showing how the method is wired in via Start().

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:18:29 +01:00
Claude
9e4bb376e8
ax(mining): replace prose struct-field comments with usage examples
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
DatabaseConfig field comments restated the type signature in prose
(AX §2 violation). Replaced with concrete assignment examples showing
real values and edge-case behaviour (0 → defaults to 30).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:17:57 +01:00
Claude
b8d3dbf0c9
ax(ueps): use concrete value 0x09 in writeTLV usage-example comment
Some checks are pending
Test / test (push) Waiting to run
Security Scan / security (push) Successful in 41s
AX Principle 2: comments show HOW with real values, not variable
references. Replace builder.Header.Version with the concrete 0x09
literal so the comment matches what the output annotation shows.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:16:00 +01:00
Claude
ceab3960bc
ax(mining): replace prose comment on NewTTMiner with usage example
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
AX Principle 2: comments must show concrete usage, not restate the signature.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:14:13 +01:00
Claude
fd1aed63fe
ax(node): replace prose comment on NewErrorMessage with usage example
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX principle 2: comments must show HOW with real values, not restate
what the type signature already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:13:41 +01:00
Claude
10241f5803
ax(node): rename Caps to Capabilities on PoolGateway struct
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
AX Principle 1 — predictable names over short names.
`Caps` is an abbreviation that requires context to understand;
`Capabilities` is self-documenting.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:11:41 +01:00
Claude
14aab01af9
ax(mining): replace prose comment with usage example on syncMinersConfig
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX principle #2: comments that restate the function name add zero information.
Replace with a concrete call example showing what the method does at runtime.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:11:07 +01:00
Claude
b846e1f895
ax(ueps): rename tlvError to packetError for AX Principle 1 compliance
tlvError used an abbreviated subsystem name (tlv = Type-Length-Value),
requiring domain knowledge to decode. packetError is self-describing
from the path alone, matching the AX rule: predictable names over short names.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:10:44 +01:00
Claude
e0893bd299
ax(node): replace prose comment on NewTransport with usage example
Some checks failed
Security Scan / security (push) Successful in 34s
Test / test (push) Has been cancelled
AX Principle 2: comments must show how to call the function with real
values, not restate what the type signature already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:08:21 +01:00
Claude
00bf5a8446
ax(mining): replace prose comment on Record with usage example
RFC-025 §2: comments show HOW with real values, not restate the signature.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:08:16 +01:00
Claude
5ff08bfbd8
ax(ueps): align verifyError variable name with idiomatic err convention
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Comment on line 126 showed `err` but implementation used `verifyError`,
violating AX Principle 2 (comment must match usage example) and Principle 1
(err is the RFC-sanctioned idiomatic name for local error variables).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:06:48 +01:00
Claude
58e5968b5f
ax(mining): replace prose comment on ManagerInterface with usage example
AX Principle 2 — comments show HOW with real values, not restate what the type name already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:06:14 +01:00
Claude
a8e962a4df
ax(node): replace prose Worker comment with usage example
Principle 2: comments show HOW with real values, not WHAT the type is.
The old comment restated the struct name; the new block demonstrates the
full setup sequence an agent needs to wire a Worker.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:06:08 +01:00
Claude
f15498756d
ax(mining): fix banned import in ListAvailableMiners usage example
Some checks failed
Security Scan / security (push) Successful in 44s
Test / test (push) Has been cancelled
Comment example used log.Println (banned import) as a usage pattern.
Replaced with logging.Info to align with AX Principle 2 (comments
as valid usage examples that match ecosystem conventions).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:03:57 +01:00
Claude
6d77de500d
ax(node): rename dedup field to deduplicator in Transport struct
AX Principle 1: predictable names over short names. The abbreviated
struct field `dedup` requires a reader to mentally expand it; the
full name `deduplicator` is self-describing.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:03:44 +01:00
Claude
8d9606c2d8
ax(ueps): replace prose comment with usage example in ReadAndVerify default case
Per AX Principle 2, comments must show concrete usage, not describe intent.
The `default:` branch comment now demonstrates the write calls rather than
explaining what they protect against.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:03:35 +01:00
Claude
51595300a2
ax(node): rename abbreviated dn to dataNode in CreateMinerBundle
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
AX Principle 1 — predictable names over short names. `dn` is an
opaque abbreviation for a *datanode.DataNode; `dataNode` conveys
the type at a glance without requiring context lookup.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:02:28 +01:00
Claude
cf4d52a3b7
ax(mining): rename errors_test.go functions to TestErrors_Function_{Good,Bad,Ugly}
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Test names lacked the AX-required suffix pattern (RFC-025 §10 test naming).
Renamed all 8 functions to TestErrors_* with _Good, _Bad, and _Ugly suffixes.
Also renamed loop variables from tt to c (predictable name, AX principle 1).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:01:30 +01:00
Claude
5188cb617c
ax(ueps): remove redundant inline comment that restates the pre-function docstring
Some checks failed
Test / test (push) Has been cancelled
Security Scan / security (push) Has been cancelled
AX Principle 2: comments that restate what the surrounding code already
says are noise. The inline comment inside TestReader_ReadAndVerify_Ugly
duplicated the usage example already present in the function docstring.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:01:18 +01:00
Claude
b64ce31f69
ax(ueps): replace code-restatement comment with semantic explanation
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
The default switch-case comment in ReadAndVerify restated the three
lines immediately following it verbatim, violating AX Principle 2
(comments as usage examples, not code descriptions). Replaced with a
single line explaining the security intent of the behaviour.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:58:52 +01:00
Claude
2a5a3d6393
ax(node): add missing Bad and Ugly test variants for HandlePing
AX Principle 10 requires all three categories (Good, Bad, Ugly) for
every test function. TestWorker_HandlePing had only Good; add Bad
(invalid payload) and Ugly (zero SentAt edge case).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:58:46 +01:00
Claude
4ff92dec1a
ax(mining): expand abbreviated db variable names to full predictable names
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
dbCtx→databaseContext, dbCancel→databaseCancel, dbPoint→databasePoint
in collectSingleMinerStats per AX principle 1 (predictable names over short names).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:58:14 +01:00
Claude
8519413e22
ax(mining): replace prose comments with usage examples on supervisor types
Some checks failed
Security Scan / security (push) Successful in 30s
Test / test (push) Has been cancelled
AX Principle 2 — comments must show concrete usage, not restate the
type name. TaskFunc, SupervisedTask, TaskSupervisor, and TaskStatus
all had prose descriptions that added zero information over the
signature. Replaced with call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:56:11 +01:00
Claude
813cf2d632
ax(ueps): rename tagByte to tagType for semantic clarity
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
tagByte described the storage type (a byte), not the purpose. All
constants in the package use Tag* naming (TagVersion, TagPayload, etc.)
so the loop variable should match: tagType aligns with the domain
vocabulary and satisfies AX Principle 1 (predictable names over short
names).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:55:02 +01:00
Claude
871e6dd985
ax(node): replace prose comment on DefaultTransportConfig with usage example
AX Principle 2: comments must show HOW with real values, not restate what
the type signature already says. "returns sensible defaults" adds zero
information — the concrete call pattern teaches agents exactly how to use it.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:55:02 +01:00
Claude
dd981edea9
ax(ueps): remove prose inline comments that restate code intent
AX Principle 2: comments must be usage examples, not prose descriptions.
"Corrupt the last byte of the payload/frame" restates what the adjacent
code does rather than demonstrating a call with concrete values.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:55:00 +01:00
Claude
27f10dd252
ax(mining): replace prose comments with usage examples in StatsCollector
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 2: comments must show concrete usage, not restate the type
signature in prose. StatsCollector and HTTPStatsConfig had three lines of
descriptive prose that added no information an agent couldn't infer from
the names alone.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:53:15 +01:00
Claude
e69816f978
ax(node): rename n to connectionCount in ConnectedPeers usage example
AX Principle 1: predictable names over short names. The comment example
used `n` which requires context to understand; `connectionCount` is
self-documenting.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:53:09 +01:00
Claude
a8b2dad8ec
ax(ueps): rename tagByte to tagType in writeTLV for semantic clarity
tagByte described the storage representation; tagType names the semantic
role (the T in TLV = Type-Length-Value), matching AX Principle 1.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:52:23 +01:00
Claude
ba9da9444c
ax(node): replace banned strings import with bytes in lethean.go
Some checks are pending
Test / test (push) Waiting to run
Security Scan / security (push) Successful in 41s
strings is a banned import per AX conventions. Replace strings.NewReader,
strings.Contains, strings.Split, and strings.IndexByte with bytes equivalents.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:52:06 +01:00
Claude
ecd417ac0e
ax(mining): replace prose description on Miner interface with usage examples
AX Principle 2: comments show HOW with real values, not WHAT the type signature already says.
The 12-line prose block restated what the interface methods communicate directly.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:52:05 +01:00
Claude
d5c892ae8c
ax(mining): replace prose comments on Lethean constants with usage examples
Some checks failed
Security Scan / security (push) Successful in 35s
Test / test (push) Has been cancelled
AX principle 2: comments that restate what the name already says add zero
information. LetheanMainnetPool, LetheanSoloTestnet and LetheanSoloMainnet
had "X is the Y for Z" comments replaced with concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:48:21 +01:00
Claude
ed4a8637cd
ax(node): rename NodeManager receiver from n to manager
Some checks failed
Test / test (push) Has been cancelled
Security Scan / security (push) Has been cancelled
AX Principle 1 — predictable names over short names. The receiver `n`
for *NodeManager is a non-standard abbreviation; only `i`, `_`, `t`,
and `c` are permitted single-letter receivers per RFC-CORE-008.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:47:48 +01:00
Claude
d067eda037
ax(ueps): replace prose comment with usage example on ThreatScore default
AX Principle 2: comments must show concrete usage, not prose rationale.
"Assumed innocent until proven guilty" explains intent but shows no usage.
Replaced with a concrete mutation example per the RFC convention.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:47:18 +01:00
Claude
b28d0bd12f
ax(mining): replace prose comment on PerformanceMetrics with usage example
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
AX-2 violation: comment restated the type name rather than showing a
concrete usage example. Replaced with a call site example showing how
to call GetStats and access the Hashrate field.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:46:42 +01:00
Claude
28345a7d87
ax(mining): replace prose comments with usage examples on CheckInstallation
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 2: comments must show HOW to call with realistic values,
not restate what the type signature already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:45:30 +01:00
Claude
3153a44a4b
ax(ueps): rename writeTLV params tag→tagByte, value→tagValue
AX Principle 1: predictable names over short names. Parameters named
`tag` and `value` lack context; `tagByte` and `tagValue` are
self-documenting and consistent with the naming used in reader.go.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:45:25 +01:00
Claude
5b6a607018
ax(node): enforce TestFilename_Function_{Good,Bad,Ugly} naming in peer_test.go
All peer registry test functions lacked the mandatory category suffix
required by AX-10 (CLI tests as artifact validation / test naming
convention). Renamed every test to carry _Good, _Bad, or _Ugly and
split the former monolithic AddPeer test into three focused cases.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:44:20 +01:00
Claude
7b50431043
ax(ueps): replace prose comment with usage example in ReadAndVerify Ugly test
Some checks failed
Security Scan / security (push) Successful in 32s
Test / test (push) Has been cancelled
AX Principle 2: comments must be usage examples, not prose descriptions.
The inline comment restated intent in English rather than showing a concrete call.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:43:42 +01:00
Claude
bc5aa094dc
ax(mining): replace prose comment with usage example on findMinerBinary
AX Principle 2: comments must show HOW with real values, not restate
what the type signature already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:43:06 +01:00
Claude
ab83727e47
ax(node): rename abbreviated tar variables to predictable full names
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Replace `tw`, `tr`, `buf`, `hdr` with `tarWriter`, `tarReader`,
`buffer`, `header` in createTarball and extractTarball per AX
Principle 1 (predictable names over short names).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:42:02 +01:00
Claude
80b8b20507
ax(ueps): fix inaccurate usage example in ReadAndVerify default case
The comment omitted tagValueLength from the signedData write sequence,
making it an incorrect usage example (AX Principle 2).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:41:54 +01:00
Claude
2a43c0a39f
ax(mining): replace prose comment on UninstallMiner with usage examples
AX Principle 2: comments show HOW with real values, not WHAT the function does.
"stops, uninstalls, and removes" restates the signature — replaced with
concrete call examples showing both miner types.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:41:49 +01:00
Claude
0e31a6e99a
ax(mining): replace Manager prose comment with usage example
Some checks failed
Security Scan / security (push) Successful in 33s
Test / test (push) Has been cancelled
AX Principle 2: comments must show HOW with real values, not restate
what the type signature already says. Replaced the prose description
on Manager with a concrete call sequence.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:39:59 +01:00
Claude
0ab8c0fe7d
ax(ueps): remove redundant err shadow in ReadAndVerify payload branch
The inner scope re-declared `var err error` immediately before assigning
from `io.ReadAll`, unnecessarily shadowing the `err` already in scope from
`reader.ReadByte()`.  Removing the shadow simplifies the control flow and
eliminates the redundant declaration (AX Principle 1 — names should not
introduce unnecessary cognitive overhead).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:39:30 +01:00
Claude
22a74415f3
ax(node): rename d to deduplicator in NewMessageDeduplicator (AX-1)
Some checks failed
Security Scan / security (push) Successful in 32s
Test / test (push) Has been cancelled
Single-letter variable `d` requires a reader to infer its type from
context. Rename to `deduplicator` — predictable names over short names
(RFC-CORE-008 §1).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:38:29 +01:00
Claude
b59fcc18a8
ax(mining): replace prose comment on ServeWs with usage example
AX §2 — comments show HOW with real values, not prose descriptions.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:38:21 +01:00
Claude
08089ffcd1
ax(ueps): replace abstract variable names in PacketBuilder comment with concrete values
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 2 — comments must show concrete usage with realistic values,
not abstract placeholder names. The struct-level comment for PacketBuilder
used `intentID` and `payload` (undefined in context); replaced with 0x01
and []byte("ping") so an agent reading it sees an exact working call.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:36:36 +01:00
Claude
6aea40d90c
ax(node): replace GoDoc prose+code-block comments with AX usage examples in lethean.go
RFC-CORE-008 Principle 2: comments show HOW with real values, not WHAT the
function does in prose. Removed GoDoc-style blank-line indented blocks and
replaced with inline concrete call examples on every type and function.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:36:31 +01:00
Claude
3902917bc8
ax(mining): replace prose comment with usage example on UpdateMinersConfig
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 2 — comments must show HOW with real values, not restate the
signature in prose. The description line was redundant with the signature;
only the usage example is kept.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:35:49 +01:00