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>
`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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
dbCtx→databaseContext, dbCancel→databaseCancel, dbPoint→databasePoint
in collectSingleMinerStats per AX principle 1 (predictable names over short names).
Co-Authored-By: Charon <charon@lethean.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
AX Principle 2 — comments must show usage, not restate the type signature.
Type and function comments on MinerAutostartConfig, DatabaseConfig,
defaultDatabaseConfig, MinersConfig, and getMinersConfigPath all violated
this by using "represents", "holds", and "returns" prose descriptions.
Replaced with concrete usage examples showing realistic values.
Co-Authored-By: Charon <charon@lethean.io>
AX principle 2: comments show HOW with real values, not what the
signature already says. The old comment restated the function name.
Co-Authored-By: Charon <charon@lethean.io>
AX Principle 2: comments must show HOW with real values, not restate
the type signature. Four prose-style doc comments converted to
concrete call-site examples.
Co-Authored-By: Charon <charon@lethean.io>
AX Principle 2 — comments that restate what the type signature says
add zero information. Deleted five internal-method comments that merely
described function intent, and replaced three exported-method comments
with concrete call-site examples so agents see how to use them.
Co-Authored-By: Charon <charon@lethean.io>
AX Principle 2: comments show HOW with real values, not prose descriptions.
cleanupLoop and cleanup had restatement comments; converted to call-site examples
matching the pattern used throughout the file.
Co-Authored-By: Charon <charon@lethean.io>
All test functions in settings_manager_test.go now follow
TestFilename_Function_{Good,Bad,Ugly} per AX RFC-025 §Test Naming.
Added _Bad (load from missing path) and _Ugly (concurrent access) cases
where only descriptive suffixes existed before.
Co-Authored-By: Charon <charon@lethean.io>
AX Principle 1 (Predictable Names Over Short Names): `p` is not an
allowed single-letter variable. Only `i`, `_`, `t`, and `c` are
permitted. Replace all three `p` loop variables with `profile`.
Co-Authored-By: Charon <charon@lethean.io>
Short variable `mi` is ambiguous — `entry` matches the `minerInfo` struct
semantics and requires no abbreviation mapping.
Co-Authored-By: Charon <charon@lethean.io>
AX-1 violation: receiver name `sm` is an abbreviation that requires
context to decode. Renamed to `settingsManager` throughout, matching
the predictable-names-over-short-names principle from RFC-CORE-008.
Also corrects a comment that referenced the banned `log.Fatal` call.
Co-Authored-By: Charon <charon@lethean.io>
AX Principle 2: comments must show concrete usage, not restate the signature.
Four functions (NewSimulatedMiner, Stop, GetStats, SimulatedMinerPresets) had
"X does Y" prose descriptions replaced with call-site examples.
Co-Authored-By: Charon <charon@lethean.io>
AX Principle 2 — comments must show usage, not restate the signature.
MinerConstructor, MinerFactory, and NewMinerFactory had prose descriptions
that added no information beyond what the type already states.
Co-Authored-By: Charon <charon@lethean.io>
Five comments in Manager were restating what the function signature
already showed ("returns X for Y"). Replace with concrete call
examples per AX principle 2 (Comments as Usage Examples).
Co-Authored-By: Charon <charon@lethean.io>
AX Principle 2: comments show HOW with real values, not WHAT the type does.
The FileRepository struct comment described implementation details instead
of demonstrating how to construct and use the type.
Co-Authored-By: Charon <charon@lethean.io>
GetHashrateHistory and AddHashratePoint had comments that restated the
function name in different words (AX principle 2 violation). Replaced
with concrete call-site examples showing realistic values and return
shape.
Co-Authored-By: Charon <charon@lethean.io>