Skip to content

Commit d48e199

Browse files
lesnik512claude
andcommitted
docs(planning): drop count-based-window from CircuitBreaker v2 deferred
Time-based + minimum_calls covers the fixed-sample rationale, and count-based adds a staleness downside for HTTP health detection. Move it to "decided against"; manual control + read-only state is the one remaining open axis. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2087b68 commit d48e199

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎planning/deferred.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ As of 0.7.0, all planned epics (3, 4, 5, 6) are closed — see the [change Index
88

99
### Resilience
1010

11-
- **CircuitBreaker v2 — remaining axes** (`src/httpware/middleware/resilience/circuit_breaker.py`) — 0.13.0 shipped axis **(a)**, the opt-in **time-based** failure-rate trip mode (`failure_rate_threshold` + `window_seconds` + `minimum_calls`; classic stays default). Still open, each independent and demand-gated:
12-
13-
- **Count-based window variant** — a `window_type="count"` selector (ring buffer of the last N outcomes) alongside the shipped time-based window. Resilience4j offers both; we chose time-based first as the better HTTP-service fit. Additive: a new window-type knob, time-based remaining the default. Build if someone needs volume-relative (not time-relative) windows.
14-
- **(b) Manual control + read-only `state`** — `force_open`/`force_closed` and a `state` introspection property (Resilience4j's registry, Polly's `StateProvider`/`ManualControl`). Parked as YAGNI in the 0.10.0 audit (decision 4: events-only control surface). Independent of the trip mode.
15-
- **(c) Slow-call-rate dimension** — *don't*: Resilience4j-only, and redundant with `AsyncTimeout`. Recorded here only so a future reader doesn't re-propose it.
11+
- **CircuitBreaker v2 — manual control + read-only `state`** (`src/httpware/middleware/resilience/circuit_breaker.py`) — 0.13.0 shipped the opt-in **time-based** failure-rate trip mode (`failure_rate_threshold` + `window_seconds` + `minimum_calls`; classic stays default). The one remaining real axis is `force_open`/`force_closed` and a `state` introspection property (Resilience4j's registry, Polly's `StateProvider`/`ManualControl`). Parked as YAGNI in the 0.10.0 audit (decision 4: events-only control surface). Demand-gated; independent of the trip mode.
1612

1713
**Don't regress:** httpware's HTTP-native failure classification (429/4xx = success out of the box) is already ahead of the generic-predicate breakers — preserve it in any v2 work.
1814

15+
**Decided against (don't re-propose):**
16+
17+
- **Count-based window variant** (`window_type="count"`) — time-based + `minimum_calls` already covers the fixed-sample-size rationale, and count-based adds a real staleness downside for HTTP health detection (a low-traffic "last N calls" window can reflect outcomes from minutes ago). Polly v8 *removed* count-based; Hystrix and Envoy are time-based. For a spiky low-volume backend, a longer `window_seconds` + `minimum_calls` is the better tool. Revisit only on concrete Resilience4j-parity demand.
18+
- **Slow-call-rate dimension** — Resilience4j-only, and redundant with `AsyncTimeout`.
19+
1920
### Documentation
2021

2122
- **Non-streaming hard response-body cap** (2026-06-14 deep audit, Medium) — for a non-streaming `send()`, httpx2 buffers the whole body before httpware reaches the decode seam, so a true cap needs a streaming-with-capped-accumulator rework of the Seam-A terminal. The current `max_error_body_bytes` guard only applies at `stream()` entry and only when `Content-Length` is declared. Revisit trigger: the Seam-A terminal is next reworked, or a concrete large-response abuse is reported. (`src/httpware/client.py`)

0 commit comments

Comments
 (0)