Commit graph

184 commits

Author SHA1 Message Date
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
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
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
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
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
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
Claude
4c279ac305
ax(mining): replace prose comments with usage examples in config_manager.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
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>
2026-04-02 10:34:21 +01:00
Claude
f59e6f3050
ax(mining): replace prose comment on DefaultContainerConfig with usage example
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>
2026-04-02 10:32:13 +01:00
Claude
0545d43685
ax(mining): replace prose comments with usage examples in bufpool.go
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 type signature. Four prose-style doc comments converted to
concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:30:29 +01:00
Claude
5843720a49
ax(mining): replace prose comments with usage examples in simulated_miner.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
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>
2026-04-02 10:28:07 +01:00
Claude
f23f5adcf2
ax(mining): replace prose comments with usage examples in ratelimiter
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>
2026-04-02 10:25:33 +01:00
Claude
eb13ef5a21
ax(mining): rename settings_manager tests to Good/Bad/Ugly convention
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
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>
2026-04-02 10:23:40 +01:00
Claude
c34e6da043
ax(mining): replace single-letter loop variable p with profile in profile_manager.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
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>
2026-04-02 10:21:40 +01:00
Claude
5db57c38f0
ax(mining): rename mi to entry in collectMinerStats range loop (AX-1)
Some checks failed
Security Scan / security (push) Successful in 32s
Test / test (push) Has been cancelled
Short variable `mi` is ambiguous — `entry` matches the `minerInfo` struct
semantics and requires no abbreviation mapping.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:17:43 +01:00
Claude
9a95c8be54
ax(mining): rename SettingsManager receiver sm to settingsManager
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
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>
2026-04-02 10:16:10 +01:00
Claude
114dd90081
ax(mining): replace prose comments with usage examples in simulated_miner.go
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 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>
2026-04-02 10:13:57 +01:00
Claude
6b22f2b60d
ax(mining): replace prose comments with usage examples in miner_factory.go
Some checks failed
Security Scan / security (push) Successful in 29s
Test / test (push) Has been cancelled
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>
2026-04-02 10:11:37 +01:00
Claude
f70e0b9f53
ax(mining): replace signature-restating comments with usage examples
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
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>
2026-04-02 10:09:01 +01:00
Claude
a433b37de1
ax(mining): replace prose comment with usage example on GetComponentFS
Some checks failed
Security Scan / security (push) Waiting to run
Test / test (push) Has been cancelled
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 10:07:18 +01:00
Claude
f28d1c3c9c
ax(mining): replace FileRepository prose comment 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 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>
2026-04-02 10:05:33 +01:00
Claude
842508661f
ax(mining): replace prose comments with usage examples on BaseMiner hashrate methods
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>
2026-04-02 10:04:00 +01:00
Claude
3f93aa4a47
ax(mining): replace prose comment on ListAvailableMiners with usage example
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:01:59 +01:00
Claude
f32bf6f3ba
ax(mining): replace prose comment on NewTaskSupervisor with usage example
AX Principle 2: comments show HOW with real values, not WHAT the
function name already says. All other constructors in the file already
use usage-example comments; NewTaskSupervisor was the outlier.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 10:00:10 +01:00
Claude
60997f79d2
ax(mining): replace prose comments with usage examples on BaseMiner methods
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
GetPath, GetBinaryPath, and Stop had comments that restated what the
signature already said. AX Principle 2: comments show HOW with real
values, not WHAT the type signature already declares.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:58:17 +01:00
Claude
ddfd62b8ce
ax(mining): replace prose comments with usage examples in settings_manager
Three comments restated the function/type name in prose (AX principle 2
violation). Replaced with concrete call-site examples showing real usage.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:56:40 +01:00
Claude
9664de2330
ax(mining): replace prose Config comment with usage example
Some checks are pending
Test / test (push) Waiting to run
Security Scan / security (push) Successful in 30s
AX principle 2: comments must show usage with realistic values, not
restate what the type signature already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:54:19 +01:00
Claude
e4144c5f48
ax(mining): replace prose comment with usage example on FetchLatestGitHubVersion
AX Principle 2: comments must show concrete usage, not restate the signature.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:51:39 +01:00
Claude
22d67f94c2
ax(mining): replace banned errors import with package error constructors in miner.go
Stop() and WriteStdin() used errors.New() (banned import) instead of the
package's own MiningError constructors. Replaced with ErrMinerNotRunning()
and ErrTimeout() which carry structured codes, HTTP status, and retry hints.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:50:43 +01:00
Claude
61c11cc0ee
ax(mining): replace prose comments with usage examples in events.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 2 — comments show HOW with real values, not WHAT the
signature already says. Converted all exported function/method prose
descriptions to concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:49:06 +01:00
Claude
cb44a640cb
ax(mining): rename abbreviated variables b and h to randomBytes and digest in auth.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 1 — predictable names over short names. Single-letter variables
b (random byte buffer) and h (MD5 digest array) require mental mapping; full
names make intent self-evident without comments.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:46:32 +01:00
Claude
349f395cc6
ax(mining): replace banned encoding/json import in events.go with package wrapper
Some checks failed
Security Scan / security (push) Successful in 32s
Test / test (push) Has been cancelled
Add UnmarshalJSON wrapper to bufpool.go and route the json.Unmarshal
call in events.go readPump through the package-local wrapper, removing
the direct "encoding/json" import which is banned under AX RFC-025.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:44:40 +01:00
Claude
553f85ac60
ax(mining): rename ratelimiter tests to TestFilename_Function_{Good,Bad,Ugly} pattern
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 1 — predictable names over short names. Test functions must
follow TestFilename_Function_{Good,Bad,Ugly} with all three categories.
Middleware coverage split across Good/Bad/Ugly; token-refill and stop tests
receive the mandatory suffixes. Comments updated to usage-example form (AX §2).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:43:12 +01:00
Claude
271f3c2580
ax(mining): replace prose comments with usage examples on BaseMiner history/log accessors
AX Principle 2 — comments show HOW with real values, not WHAT the signature already says.
GetHighResHistoryLength, GetLowResHistoryLength, and GetLogs all had comments that
restated the function name. Replaced with concrete call-site examples showing expected
return ranges and usage patterns.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:40:10 +01:00
Claude
76fb616ba9
ax(mining): replace prose comments with usage examples in node_service.go
AX principle 2 — comments must show concrete call-site usage, not restate
the function signature in prose. Four public method comments updated to
show how callers invoke them with realistic values.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:37:23 +01:00
Claude
e3f017aa9b
ax(mining): remove banned strings import from mining.go
Some checks failed
Security Scan / security (push) Successful in 34s
Test / test (push) Has been cancelled
Replace strings.Contains in containsShellChars with a switch-on-rune
loop, matching the style of isValidAlgo already in the same file.
Also adds usage-example comments per AX principle 2.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:35:49 +01:00
Claude
822ac004ea
ax(mining): remove banned fmt import from manager.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Replace all fmt.Sprintf and fmt.Errorf calls with string concatenation
and the existing MiningError constructors (ErrMinerNotFound, ErrMinerExists,
ErrInvalidConfig, ErrInternal, ErrDatabaseError). Adds strconv for integer
formatting. No fmt import remains in the file.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:34:11 +01:00
Claude
fdc7064e09
ax(mining): replace prose comments with usage examples in container.go
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
AX Principle 2 — comments as usage examples, not prose descriptions.
NewContainer, Start, and Shutdown had comments restating the signature
("creates a new container", "begins all background services", etc.).
Replaced with concrete call examples showing how to invoke each function.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:31:10 +01:00
Claude
a862480862
ax(mining): replace prose comment on Stop with usage example
AX principle 2: comments show HOW with concrete usage, not WHAT
the signature already says. The old two-line prose comment restated
the function name verbatim; replaced with a defer call example.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:29:25 +01:00
Claude
cc8eeab231
ax(mining): replace prose comments in auth.go with usage examples
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
All comments on AuthConfig, DefaultAuthConfig, AuthConfigFromEnv,
DigestAuth, NewDigestAuth, Stop, Middleware, and all private methods
were restating the type signature in prose. Replaced with concrete
call-site examples per AX Principle 2 (comments as usage examples).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:29:03 +01:00
Claude
d6c684df4c
ax(mining): replace prose comment on StopMiner with usage example
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 2 — comments show HOW with real values, not what the
signature already says. Prose restating the method signature deleted;
concrete call examples with realistic miner names substituted.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:24:36 +01:00
Claude
865a690853
ax(mining): replace prose comment with usage example on RegisterMiner
AX Principle 2 — comments must show HOW with real values, not describe
WHAT the signature already states.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:23:12 +01:00
Claude
6010f02091
ax(mining): replace prose comments with usage examples in circuit_breaker.go
Three internal method comments restated what the function name already
expressed (AX Principle 2). Replaced with concrete call-site examples
that show how each method is used in context.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:21:25 +01:00
Claude
0e6290f703
ax(mining): replace prose comment on SetEventHub with usage example
Some checks are pending
Test / test (push) Waiting to run
Security Scan / security (push) Successful in 31s
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:19:01 +01:00
Claude
c39c9b9ff8
ax(mining): replace prose comments with usage examples on Container
Some checks failed
Security Scan / security (push) Has been cancelled
Test / test (push) Has been cancelled
AX Principle 2 — comments must show HOW with real values, not restate
what the type signature already says. The Container struct comment and
Initialize method comment both described what the code does in prose;
replaced with concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:17:40 +01:00
Claude
649f57e91e
ax(mining): replace prose comment on StartMiner 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 signature already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:15:55 +01:00
Claude
b4dc3e6948
ax(mining): replace prose comment on NewManagerForSimulation with usage example
AX Principle 2: comments must show HOW with real values, not restate what
the type signature already says. Replaced description prose with a concrete
call pattern showing ctx + Config.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:13:26 +01:00