fix(deps): update module github.com/cep21/circuit/v4 to v4.1.0 - #21
Merged
Merged
Conversation
cep21
approved these changes
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v4.0.0→v4.1.0Release Notes
cep21/circuit (github.com/cep21/circuit/v4)
v4.1.0Compare Source
Bug-fix release: 24 bugs fixed across the circuit state machine, rolling metrics, and configuration factories. No breaking API changes (verified with
gorelease). Requires Go 1.21+.Bug fixes
Panics (crash → safe return)
SortedDurations.Percentile(NaN)panicked with index-out-of-range (#152)RollingCounter.GetBucketspanicked on zero-value counter — divide by zero (#151)RollingCounter.UnmarshalJSONpanicked on incomplete JSON; now errors (#151)RollingCounter.UnmarshalJSONaccepted inconsistent JSON (NumBuckets≠len(Buckets)), laterGetBucketspanicked; now errors at unmarshal (#152)Opener.SetConfigNotThreadSafepanicked on nilNowfunc (#151)RollingBuckets.Advancepanicked on zeroBucketWidth(#150)RollingPercentile.AddDurationpanicked on times beforeStartTime(#150)Data races (fixed under
-race)ConsecutiveErrOpenerFactory: closure captured config by reference — concurrent factory calls mutated shared state (#151)hystrix.OpenerFactoryandCloserFactory: same closure-capture bug (#150)RollingBuckets.Advance: concurrent callers could clear the same bucket multiple times or skip clears (#150)Incorrect behavior
Opened()/Closed()metric callbacks multiple times per transition. Now uses CAS to guarantee exactly-once (#151)MaxConcurrentRequeststwice; a config change between reads could produce inconsistent gating (#151)Circuit.OpenCircuitusedtime.Now()instead of the configuredTimeKeeper(#150)now()calls at the timeout boundary could mark an on-time completion as a spurious timeout (#150)SortedDurations.Varreported percentiles with wrong scaling (#150)MockClock.AfterFuncwith negative duration never fired — realtime.AfterFuncfires immediately (#151)IsBadRequestdid not unwrap wrapped errors — now useserrors.As(#150)Dead code / cleanup (#150)
Testing
testing/quick+MockClock+ reference model) verifies the exactly-onceRunMetricscontract andOpened/Closedalternation under all interleavings (#152)RollingCounter,RollingBuckets,SortedDurations.Percentile(#152)Tooling
Makefilerestored:make(fast loop),make ci(pre-PR gate),make fuzz,make bench,make cover(#152)Full changelog: cep21/circuit@v4.0.0...v4.1.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.