From 50548447fdd30330ec54d631692b41f29cd6ada2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 08:31:04 +0100 Subject: [PATCH] ax(mining): replace prose comment with usage example on recordSuccess AX Principle 2: comments must show HOW with real values, not restate what the function name already says. Co-Authored-By: Charon --- pkg/mining/circuit_breaker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/mining/circuit_breaker.go b/pkg/mining/circuit_breaker.go index 2dd3ba7..2035954 100644 --- a/pkg/mining/circuit_breaker.go +++ b/pkg/mining/circuit_breaker.go @@ -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()