Commit graph

231 commits

Author SHA1 Message Date
Claude
db80ce6dde
ax(mining): rename wg to waitGroup in circuit breaker concurrency test
AX Principle 1: predictable names over short names. wg requires
mental mapping to WaitGroup; waitGroup is self-documenting.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:27:05 +01:00
Claude
b62c757ed7
ax(mining): replace prose comment on Uninstall with usage example
AX principle #2: comments must show HOW (concrete call), not describe
WHAT (which the signature already says).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:24:34 +01:00
Claude
908f3f795b
ax(mining): replace prose comment on Service type with usage example
AX Principle 2: comments show HOW with real values, not WHAT the type is.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:20:46 +01:00
Claude
876d818216
ax(mining): replace prose comment with usage example on WriteStdin
AX Principle 2: comments show HOW with real values, not what the
signature already says. Replace description with call example.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:17:30 +01:00
Claude
5de656ff04
ax(mining): replace prose type comments with usage examples in mining_profile.go
RawConfig and MiningProfile had description-style comments restating what
the types are rather than showing how to use them (AX Principle 2 violation).
Replaced with concrete call-site examples demonstrating real usage patterns.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:15:17 +01:00
Claude
dc68334162
ax(mining): replace prose comment with usage example on NewXMRigMiner
AX Principle 2 — comments show HOW with real values, not WHAT the
function does. The prose description restated the signature; replaced
with a concrete call sequence.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:12:24 +01:00
Claude
182a40d219
ax(mining): replace prose struct comments with usage examples
Four type comments in mining.go restated the type name in prose
("represents a ...", "provides ..."), violating AX Principle 2.
Replaced with concrete usage examples showing realistic field values.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:11:10 +01:00
Claude
9f0df5e86e
ax(mining): replace prose struct comments with usage examples in metrics.go
AX principle 2: comments show HOW with real values, not WHAT the type
signature already states. Metrics and LatencyHistogram had prose
descriptions; replaced with concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:08:54 +01:00
Claude
8247d62ab3
ax(mining): replace prose comment with usage example on isValidAlgo
AX Principle 2: comments must show HOW with real values, not restate what
the type signature already says. "checks if an algorithm name contains only
valid characters" is a prose description — replaced with concrete call examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:06:48 +01:00
Claude
cc9cc33511
ax(mining): rename cfg to authConfig in auth_test.go
AX Principle 1 — predictable names over short names.
cfg abbreviates AuthConfig, requiring a mapping; authConfig
is self-describing.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:05:33 +01:00
Claude
fedb0317bc
ax(mining): replace restatement comments on settings structs with usage examples
AX Principle 2 — comments must show HOW with real values, not restate WHAT
the type already says. WindowState, MinerDefaults and AppSettings all had
prose descriptions ("stores…") replaced with concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:02:37 +01:00
Claude
8e63d4d0bd
ax(mining): replace prose comments with usage examples in manager.go
Four internal methods had comments that restated prose descriptions
(e.g. "saves the autostart and last-used config for a miner") instead
of showing a concrete call site — violating AX Principle 2.

Replaced with usage-example comments showing realistic invocations with
argument values.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 13:00:23 +01:00
Claude
ddb24545b9
ax(mining): replace prose comment with usage example on bufferPool
AX Principle 2: comments show HOW via concrete call, not WHAT via prose.
The previous comment described the variable's purpose in prose — replaced
with a direct usage example showing the Get/Reset/Put pattern.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:58:24 +01:00
Claude
95712b5ad9
ax(mining): replace prose comment with usage example on XMRigMiner.Start
AX Principle 2: comments must show a concrete call, not restate the signature.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:56:05 +01:00
Claude
bbbe474610
ax(mining): replace prose comment on NewService with usage example
AX Principle 2 — comments show HOW with real values, not WHAT the
signature already says. "NewService creates a new mining service"
restates the name; the usage example teaches call-site shape.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:53:21 +01:00
Claude
511066b844
ax(mining): replace prose-description comments with usage examples in lethean.go
AX principle 2: comments show HOW with real values, not WHAT the signature says.
Removed five prose headers ("returns a mining config for...") that restated type
signatures. Retained concrete usage-example lines already present.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:49:24 +01:00
Claude
d7df78af1f
ax(mining): remove banned fmt import from stats_collector
Replace fmt.Errorf/Sprintf with package-native ErrInternal constructors
and strconv.Itoa for URL assembly in FetchJSONStats.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:47:06 +01:00
Claude
ee69484f5f
ax(mining): replace prose comments with usage examples in version.go
Comments on GitHubRelease and fetchGitHubVersionDirect restated what
the type names already said. Replaced with concrete call examples
per AX Principle 2 (comments as usage examples).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:43:09 +01:00
Claude
e656a12da7
ax(mining): remove prose comment that restates the ErrCircuitOpen declaration
AX Principle 2: comments must show usage examples, not restate what the
type signature already says. The line "ErrCircuitOpen is returned when
the circuit is open" adds zero information over the var declaration
itself. The usage example below it is kept.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:30:31 +01:00
Claude
4f3141beb8
ax(mining): replace prose comment with usage example on autostartMiners
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 function name already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:22:53 +01:00
Claude
99f37ed1bc
ax(mining): rename circuit_breaker_test.go to TestFilename_Function_{Good,Bad,Ugly} convention
All test functions in circuit_breaker_test.go now follow the AX-required
naming pattern. Added missing _Bad and _Ugly variants and usage-example
comments on each test function.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:20:58 +01:00
Claude
cd1ca73885
ax(mining): replace prose comments with usage examples in events.go
Some checks failed
Security Scan / security (push) Successful in 32s
Test / test (push) Has been cancelled
Nine comments restated type/function names (AX Principle 2 violation).
Replaced with concrete call-site examples showing realistic usage.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:17:24 +01:00
Claude
15f45b9fbc
ax(mining): replace prose comments with usage examples in manager.go
initDatabase and startDBCleanup had comments that restated the function
name in prose — violating AX Principle 2 (comments as usage examples).
Replaced with concrete call-site examples showing caller context.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:11:56 +01:00
Claude
bde60612f1
ax(mining): rename CircuitBreaker.mu to mutex for AX Principle 1 compliance
`mu` is an abbreviation requiring context to interpret; `mutex` is
self-describing and matches the AX rule that names must not require
a comment to explain.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:04:26 +01:00
Claude
b53e5f2b19
ax(mining): rename RateLimiter.mu to mutex; fix prose comment to usage example
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 1 (predictable names): `mu` abbreviates `mutex` — rename to `mutex`.
AX Principle 2 (comments as usage examples): struct doc was prose ("provides token
bucket rate limiting per IP address") — replace with concrete call examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 12:02:14 +01:00
Claude
ccc9450e6a
ax(mining): replace prose comment on CheckInstallation with usage example
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
AX principle 2: comments show HOW with real values, not WHAT the
function name already says. "verifies if the miner is installed
correctly" restated the signature; replaced with a concrete call site.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:53:44 +01:00
Claude
e5cf3410f0
ax(mining): rename mining_test.go functions to TestFilename_Function_{Good,Bad,Ugly} convention
Some checks failed
Security Scan / security (push) Successful in 34s
Test / test (push) Has been cancelled
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:49:07 +01:00
Claude
57253c4d7f
ax(mining): replace prose comment on InstallFromURL with usage example
AX Principle 2: comments show HOW with real values, not what the
signature already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:46:38 +01:00
Claude
383c24d120
ax(mining): rename service_test.go functions to TestFilename_Function_Good convention
Some checks failed
Security Scan / security (push) Successful in 31s
Test / test (push) Has been cancelled
All 7 handler tests in service_test.go were missing the required
TestFilename_Function_{Good,Bad,Ugly} suffix mandated by AX Principle §Test Naming.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:44:00 +01:00
Claude
8ac3a08bf2
ax(mining): rename ProfileManager.mu to mutex for AX Principle 1 compliance
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Short name `mu` requires knowledge of Go convention to decode; `mutex`
is unambiguous and self-describing per predictable-names-over-short-names.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:41:45 +01:00
Claude
c486e1fecb
ax(mining): rename MinerFactory.mu to mutex for AX principle 1 compliance
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
`mu` requires context to understand — `mutex` is self-describing at a glance.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:36:19 +01:00
Claude
109b9e190f
ax(mining): rename MinerFactory receiver f → factory for AX Principle 1
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Single-letter receiver `f` on *MinerFactory violates AX-025 § "Predictable
Names Over Short Names". Renamed to `factory` across all methods so the
receiver is self-describing at every call site.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:34:08 +01:00
Claude
86eff8dfc2
ax(mining): replace prose comments with usage examples on CircuitState
AX Principle 2: comments must show HOW with real values, not restate
what the type signature already says. The four prose comments on
CircuitState and its constants are replaced with a single usage-example
block that shows all three states in context.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:31:32 +01:00
Claude
02a68cc275
ax(mining): rename auth_test.go functions to TestAuth_Function_{Good,Bad,Ugly} convention
Some checks failed
Security Scan / security (push) Has been cancelled
Test / test (push) Has been cancelled
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:29:21 +01:00
Claude
5d2917269b
ax(mining): replace prose comment with usage example on ContainerConfig
AX Principle 2: comments must show concrete usage, not restate the type name.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:26:24 +01:00
Claude
194c45a98b
ax(mining): replace prose struct comment with usage example
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
MiningError had "is a structured error type" — restates the declaration.
AX principle 2: comments show HOW with real values, not WHAT the signature says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:24:33 +01:00
Claude
ab7ccdda8a
ax(mining): replace prose comments with usage examples in profile_manager
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
loadProfiles and saveProfiles had comments that restated their function
names in prose form. AX Principle 2 requires comments to show concrete
usage examples, not descriptions. Replace both with call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:21:28 +01:00
Claude
6f235183ff
ax(mining): replace prose comment with usage example on emitEvent
Some checks are pending
Test / test (push) Waiting to run
Security Scan / security (push) Successful in 30s
AX Principle 2: comments show HOW with real values, not WHAT in prose.
The emitEvent comment restated the function name rather than demonstrating
a concrete call.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 11:20:04 +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
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
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
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
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
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
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
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
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
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