Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
exhaustion; body-transparent (drops a superseded response, releasing its `Guarded`
permit). Adds the `Retryable` marker + `RetryConfig` schedule; jitter via an internal
seeded `SplitMix64` — no new dependency. (ADR-0031 §2, ADR-0034.)
- `oath-adapter-net-http-api` `CircuitBreaker` resilience layer (Slice 1 PR 4) — the
`CircuitBreaker<S, T>` service + `CircuitBreakerLayer<T>` factory (`net-api::Layer`):
the reactive backstop to `RateLimit`. Trips Open after `failure_threshold` consecutive
`Connection`/`Timeout`/`5xx` failures, or immediately on a `Throttled`/429 with the long
`throttle_cooldown`; fast-rejects with a new non-retryable `HttpError::CircuitOpen`
(mapped to a new `ErrorKind::CircuitOpen`) without touching the inner stack; admits
bounded Half-Open probes after cooldown (reached-host closes, failure re-opens). Pure
clock-injected `Breaker` state machine (Closed/Open/Half-Open) behind a thin
`Arc<Mutex<Breaker>>` + `Timer` shell; single per-host breaker; `now()`-only (no sleep,
no new dependency). 4-class outcome partition so `4xx`/`Auth`/unclassified errors neither
trip nor mask an outage. (ADR-0031 §5, ADR-0034.)
- net-http construction-surface design refinements (ADR-0034 append-only
Amendments 2026-07-04, spec updated) — an absent `RateLimit<K>` directive now
**fails closed** (not "defaults to `Global`"), closing the last silent
Expand Down
6 changes: 6 additions & 0 deletions crates/adapter/net/api/src/error_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ pub enum ErrorKind {

/// The error does not fit any other category.
Unknown,

/// A circuit breaker rejected the request without sending it — the breaker is
/// Open after prior failures (or a throttle) and is failing fast until its
/// cooldown elapses. A deliberate local decision, not a transport outcome;
/// non-retryable.
CircuitOpen,
}

/// Implemented by error types that can be classified as an [`ErrorKind`].
Expand Down
Loading