Skip to content

v1.0.1 - Recovery Fixes

Choose a tag to compare

@jamesgober jamesgober released this 08 Oct 08:32
· 14 commits to main since this release

error-forge v1.0.1 - Recovery Fixes

Date: 2026-10-08
Compare: v1.0.0...v1.0.1

Headline

A patch release for error-forge and error-forge-derive (both
1.0.1). Bug fixes and documentation corrections only: no public
item was added, removed or renamed (cargo semver-checks against
1.0.0: 222 checks pass). Upgrading needs no code changes.

Fixed

Recovery

  • CircuitBreaker panic. execute panicked with "overflow when
    subtracting duration from instant" when failure_window_ms reached
    back past the start of the monotonic clock (for example u64::MAX).
  • Half-open probing. CircuitBreaker now admits a single probe
    call once the reset timeout elapses, as documented; concurrent calls
    fail fast until the probe resolves. A panicking probe reopens the
    circuit instead of leaving it stuck half-open.
  • CircuitBreaker::state reports HalfOpen once the reset timeout
    has elapsed (it kept reporting Open until the next execute).
  • LinearBackoff::next_delay saturates at max_delay instead of
    overflowing on large values.
  • ExponentialBackoff::next_delay clamps very large attempts
    instead of returning a zero delay, caps the first attempt at
    max_delay, applies jitter to the first attempt, and never lets
    jitter exceed max_delay.

Macros

  • define_errors! now works when invoked by path
    (error_forge::define_errors! { ... }) without importing it.
  • #[derive(ModError)] now compiles variants with fields that have
    no #[error_display], or whose display string does not use every
    field, and reports a compile_error! on unions instead of panicking
    inside the macro (error-forge-derive 1.0.1).

Console and docs

  • NO_COLOR handling follows the no-color.org spec: colour is disabled
    only when the variable is present and non-empty.
  • The group! rustdoc, README, docs/API.md and docs/migration.md no
    longer claim define_errors! implements ForgeError; they show the
    delegating impl instead.
  • docs/API.md had about 800 stale lines documenting APIs that do not
    exist. They are replaced with working examples, compiled as doctests
    in CI.
  • ErrorLogger::log_panic docs state it is a helper you call from your
    own panic hook; the crate never calls it.

Maintenance

  • CI: actions/checkout@v7 (Node 24), prebuilt cargo-audit, clippy
    on all targets, and tests with --all-features (the async, log,
    tracing and jitter paths previously never ran in CI).
  • Clippy 1.99 compatibility (double_must_use on code generated by
    async_trait).
  • Cargo.lock refreshed (Dependabot PRs #12 and #15).

Installation

[dependencies]
error-forge = "1.0.1"

MSRV: Rust 1.81 (unchanged).