Commit graph

144 commits

Author SHA1 Message Date
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
Claude
301a5428b0
ax(mining): replace prose comment with usage example on findAvailablePort
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 09:11:24 +01:00
Claude
8e9f18ac3e
ax(mining): replace prose struct comment with usage example on CircuitBreaker
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
type already says in its name.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:08:29 +01:00
Claude
cc829d1bc8
ax(mining): rename wg to waitGroup in collectMinerStats
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. `wg` requires
domain knowledge to decode; `waitGroup` is self-documenting.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 09:06:48 +01:00
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