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>
This commit is contained in:
Claude 2026-04-02 08:31:04 +01:00
parent 9a50e472b5
commit 50548447fd
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -177,7 +177,7 @@ func (cb *CircuitBreaker) recordFailure() {
}
}
// recordSuccess records a successful request
// cb.recordSuccess(stats) // caches result, resets failures; in HalfOpen closes the circuit after SuccessThreshold
func (cb *CircuitBreaker) recordSuccess(result interface{}) {
cb.mu.Lock()
defer cb.mu.Unlock()