Commit graph

131 commits

Author SHA1 Message Date
Claude
1ad014e71c
ax(mining): replace prose comments with usage examples in repository.go
Three comments on Path, Exists, and Delete restated what the signatures
already convey. Replaced with concrete call examples per AX Principle 2.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:04:34 +01:00
Claude
599603e2f4
ax(mining): replace prose comment with usage example on FetchJSONStats
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. The old comment restated the function's
prose description; replaced with a concrete call site example.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:03:17 +01:00
Claude
7d7dfce6ea
ax(mining): replace prose comment with usage example on instanceNameRegex
AX Principle 2: comments show HOW with real values, not WHAT the name
already says. The old comment restated the variable name; the new comment
shows a concrete ReplaceAllString call with input and expected output.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:01:20 +01:00
Claude
5610491832
ax(mining): replace prose field comments on CircuitBreakerConfig with usage example
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled
RFC-CORE-008 §2: comments that restate type signatures add zero information.
Replace the five prose comments (type-level + three field-level) with a single
concrete construction example showing real values.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:59:01 +01:00
Claude
0c6c84d4c6
ax(mining): replace prose comment with usage example on startTask
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. "startTask starts a single supervised task."
adds zero information — replaced with a concrete call site example.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:57:18 +01:00
Claude
2b2b89f158
ax(mining): replace NewManager prose comment 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. Replace "creates a new miner manager" prose
with a concrete call-site example showing manager lifecycle.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:56:15 +01:00
Claude
0c7546650a
ax(mining): replace prose comment with usage example on ListMiners
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 08:54:33 +01:00
Claude
6ec5639265
ax(mining): replace banned fmt import with ErrInvalidConfig in Config.Validate
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Remove the banned `fmt` import from mining.go; all fmt.Errorf calls in
Config.Validate replaced with the existing ErrInvalidConfig helper which
returns a structured *MiningError — consistent with the package error model.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:52:52 +01:00
Claude
6c0534a325
ax(mining): rename l to listener in findAvailablePort
Single-letter variable `l` violates AX Principle 1 (predictable names
over short names) — renamed to `listener` to match the semantic intent.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:50:23 +01:00
Claude
11a3af4b1b
ax(mining): replace prose comment with usage example on GetMiner
RFC-CORE-008 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 08:48:13 +01:00
Claude
caa887325d
ax(mining): rename cfg to configuration in circuit_breaker_test.go
AX Principle 1 — predictable names over short names. `cfg` requires
context to decode; `configuration` is self-describing.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:47:09 +01:00
Claude
ae80737a41
ax(mining): replace prose comments with usage examples on LoadMinersConfig/SaveMinersConfig
Some checks failed
Security Scan / security (push) Successful in 30s
Test / test (push) Has been cancelled
AX Principle 2: comments as usage examples. Both functions had prose descriptions
that restated the signature ("loads the miners configuration from the file system").
Replace with concrete call-site examples that show how to use the return value.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:45:14 +01:00
Claude
565dae709d
ax(mining): replace banned errors import with ErrInternal in mining_profile.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
RawConfig.UnmarshalJSON used errors.New() (banned import) despite the
package already providing ErrInternal() for exactly this purpose.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:42:39 +01:00
Claude
03d326a97e
ax(mining): remove banned fmt import from errors.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Replace fmt.Sprintf calls with string concatenation throughout
all MiningError constructors and the Error() method.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:40:59 +01:00
Claude
afbccd42f4
ax(mining): replace prose comment with usage example on Config.Validate
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. The previous comment restated the return
type contract; replaced with a concrete call-site example.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:38:01 +01:00
Claude
66bb37326b
ax(mining): replace prose comments with usage examples on GetType/GetName
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. "GetType returns the miner type identifier" restates the
signature — replace with concrete call examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:35:47 +01:00
Claude
ed76d53b85
ax(mining): replace prose comment with usage example on LogBuffer.Clear
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 signature.
"Clear clears the log buffer." adds zero information beyond the name.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:34:13 +01:00
Claude
58e1c23f0c
ax(ueps): replace prose threat comment with error-handling usage example
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:33:58 +01:00
Claude
0432d23a63
ax(mining): rename cfg to configuration in circuit breaker usage comment
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. The usage example
comment used the banned abbreviation `cfg` — replaced with `configuration`.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:32:21 +01:00
Claude
50548447fd
ax(mining): replace prose comment with usage example on recordSuccess
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 08:31:04 +01:00
Claude
d122682387
ax(mining): replace signature-restating comments with usage examples in version.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
GetVersion/GetCommit/GetBuildDate comments restated the signature verbatim.
Replaced with concrete call examples showing realistic return values per AX-2.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:30:02 +01:00
Claude
588e6447bb
ax(mining): replace prose Execute comment 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.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:28:45 +01:00
Claude
6704ac781c
ax(mining): replace prose comments with usage examples in settings_manager.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Seven setter/getter comments restated the function signature rather than
showing a concrete call (AX Principle 2). Replaced all with real invocation
examples so agents know exactly how to call each method.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:26:55 +01:00
Claude
f9ecce2e86
ax(mining): rename opts/opt to options/option in NewFileRepository
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.
`opts` and `opt` are abbreviations — `options` and `option` are unambiguous.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:25:14 +01:00
Claude
654a3e43c6
ax(mining): replace prose comments with usage examples in supervisor
Four exported methods on TaskSupervisor had comments restating the
signature (AX §2 violation). Replaced with concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:24:13 +01:00
Claude
7396ef0253
ax(mining): replace prose comments with usage examples in circuit_breaker.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 2 — comments as usage examples, not prose descriptions.
DefaultCircuitBreakerConfig, NewCircuitBreaker, State, Reset, GetCached
all had comments that restated the signature; replaced with concrete call examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:21:34 +01:00
Claude
7232010b1f
ax(mining): rename cfg to configuration in UpdateMinersConfig closures
Closure parameters in UninstallMiner and updateMinerConfig used the
abbreviated name cfg instead of configuration, violating AX Principle 1
(predictable names over short names).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:20:07 +01:00
Claude
6bc7812514
ax(mining): replace prose comments with usage examples in ratelimiter.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
All four exported function comments in ratelimiter.go were prose
descriptions that restate the signature (AX Principle 2 violation).
Replaced with concrete usage examples showing realistic call sites.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:18:40 +01:00
Claude
bd4f47cbba
ax(mining): replace prose accessor comments with usage examples in SimulatedMiner
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
AX Principle 2: comments that restate the type signature add zero information.
Nine accessor methods converted from "Foo returns the bar" to concrete call examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:16:54 +01:00
Claude
8d89df10cc
ax(mining): rename fn to modifier in UpdateMinersConfig
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
`fn` is a single-letter abbreviation — AX principle 1 requires predictable
names over short names. `modifier` describes the parameter's role clearly.
Comment updated to a usage example per principle 2.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:14:35 +01:00
Claude
aa9f0dd707
ax(mining): replace prose comments with usage examples in profile_manager.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
All public API comments on ProfileManager restated the type signature in
prose — violating AX principle 2 (comments as usage examples). Replaced
with concrete call examples showing realistic values.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:12:59 +01:00
Claude
6bcd0494af
ax(mining): replace prose comment on WithDefaults 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.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:11:16 +01:00
Claude
743b819b99
ax(mining): replace prose comments with usage examples on Load and Save
SettingsManager.Load and Save had comments that restated the function
signature ("reads settings from disk", "writes settings to disk") rather
than showing a concrete call site. Replaced with usage examples per
AX Principle 2 (Comments as Usage Examples).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:07:52 +01:00
Claude
95d62c11cf
ax(mining): rename enc to encoder in MarshalJSON for AX Principle 1
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:06:07 +01:00
Claude
9f510aea98
ax(mining): replace prose descriptions with usage examples in repository.go
AX-2 (Comments as Usage Examples): Load, Save, and Update on
Repository[T] and FileRepository[T] had comments that restated
the signature in prose. Replaced with concrete call examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:06:06 +01:00
Claude
97b8b66241
ax(mining): replace prose comments with usage examples on RawConfig methods
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:03:04 +01:00
Claude
7cf7e13b51
ax(mining): replace prose comments in errors.go with usage examples
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. All 14 error constructor comments
converted from "ErrX creates a Y error" to concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 08:01:02 +01:00
Claude
edcee49435
ax(mining): replace prose RegisterTask comment with usage example
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:58:45 +01:00
Claude
daf3c2fff9
ax(mining): rename cfg to minersConfiguration in manager.go (AX Principle 1)
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:57:18 +01:00
Claude
a08f3e3d31
ax(mining): replace banned errors import with NewMiningError in circuit_breaker.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
ErrCircuitOpen used errors.New (banned import). Replaced with
NewMiningError using the package's own error infrastructure.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:55:17 +01:00
Claude
27fd294ca7
ax(mining): rename wg to waitGroup in TaskSupervisor (AX Principle 1)
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:53:29 +01:00
Claude
64d11df462
ax(mining): rename mgr to concreteManager (AX Principle 1)
mgr is an abbreviated variable name. AX Principle 1 requires predictable
names over short names — names should not require a comment to explain.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:52:05 +01:00
Claude
79a48a3a18
ax(mining): replace copy builtin shadow with settingsCopy, comment as usage example
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: variable `copy` shadows
the Go builtin and carries no semantic meaning. Renamed to `settingsCopy`.
AX Principle 2 — comments as usage examples: replaced prose description on
SettingsManager.Get with a concrete call showing how the return value is used.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:50:36 +01:00
Claude
a3d697b45e
ax(mining): replace prose getter comments with usage examples in container.go
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:48:45 +01:00
Claude
ba198731c2
ax(mining): replace banned fmt import with ErrUnsupportedMiner in miner_factory
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
fmt is a banned import (AX §banned-imports). miner_factory.go used
fmt.Errorf for the unsupported-miner error path; the package already
provides ErrUnsupportedMiner() in errors.go, so use that instead and
drop the fmt import entirely.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:47:18 +01:00
Claude
1ebe43fd55
ax(mining): replace prose comments with usage examples in metrics.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
All 12 exported functions in metrics.go had comments that restated their
signatures in prose (e.g. "records a miner start event") instead of
showing concrete call examples. Replaced with AX-compliant usage examples
per RFC-025 principle 2 (Comments as Usage Examples).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:45:40 +01:00
Claude
c2ff1bd08e
ax(mining): rename cl→client and c→client in ratelimiter.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.
cl abbreviates rateLimitClient; rename to client throughout Middleware
and cleanup for semantic clarity.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:42:57 +01:00
Claude
1e814bdc80
ax(mining): replace prose comments with usage examples in miner_factory.go
All public function comments restated the signature (AX-2 violation).
Replace each with a concrete call example showing real values.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:40:51 +01:00
Claude
cb27f33e57
ax(mining): replace prose method comments with usage example in errors.go
Seven MiningError method comments restated the function signature verbatim
(AX principle 2 violation). Deleted all seven and replaced NewMiningError's
comment with a concrete call-site example per the RFC rule: if a comment
restates what the type signature already says, delete it.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 07:38:00 +01:00
Claude
5a6da79311
ax(mining): rename minerCfg loop variable to autostartEntry
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
`minerCfg` is an abbreviated name for `MinerAutostartConfig` loop
variables. Renamed to `autostartEntry` across three range loops in
manager.go for AX Principle 1 compliance (predictable names over
short names).

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