|
1 | | -# httpware 0.7.0 — Middleware extension guide (docs-only) |
| 1 | +# httpware 0.7.0 — First-cut user docs (docs-only) |
2 | 2 |
|
3 | 3 | **0.7.0 is a docs-only release. No API changes.** Code written against 0.6.0 continues to work unchanged. |
4 | 4 |
|
5 | | -This release ships the final piece of Epic 3 — a user-facing guide to writing custom middleware against `httpware`'s Middleware protocol. With it, Epic 3 (Resilience) closes. |
| 5 | +This release ships the first-cut user-facing documentation surface — every shipped feature through 0.6 now has a user-facing reference page, and the two highest-friction adoption recipes (test-mocking and OpenTelemetry wiring) are concrete. Epic 3 (Resilience) closes with this release. |
6 | 6 |
|
7 | 7 | ## What's new |
8 | 8 |
|
9 | | -- **[`docs/middleware.md`](../../docs/middleware.md)** — a new top-level docs page covering: |
10 | | - - The `Middleware` Protocol and `Next` type alias, both exported from `httpware.middleware`. |
11 | | - - The three phase decorators (`@before_request`, `@after_response`, `@on_error`) as ergonomic shortcuts for the common cases. |
12 | | - - A worked `RequestIdMiddleware` example — assign a per-call UUID, propagate via `X-Request-Id`, log it alongside the response status. Placed outside `Retry` so all attempts of one call share one ID, and correlates naturally with the 0.6.0 observability events' `url` attribute. |
13 | | - - A "when NOT to write a middleware" section pointing redaction at `logging.Filter`, URL/header validation at `httpx2`, per-call behavior at `request.extensions=`, and HTTP-level tracing at `opentelemetry-instrumentation-httpx`. |
| 9 | +Four new docs deliverables on the docs site: |
14 | 10 |
|
15 | | -Plus small touchups so the guide is discoverable: a nav entry in `mkdocs.yml`, a one-sentence pointer in the README, and a "Where to go next" bullet in `docs/index.md`. |
| 11 | +- **[`docs/middleware.md`](../../docs/middleware.md)** — write your own middleware against `httpware.middleware.Middleware` and `Next`. Covers the protocol, the phase decorators (`@before_request`, `@after_response`, `@on_error`), a worked `RequestIdMiddleware` example, a "when NOT to write a middleware" section, **and an "OpenTelemetry wiring" section** with a minimal SDK + `opentelemetry-instrumentation-httpx` setup that makes the 0.6.0 Retry/Bulkhead observability events visible as span events. |
| 12 | +- **[`docs/resilience.md`](../../docs/resilience.md)** — deep-dive reference for `Retry`, `RetryBudget`, and `Bulkhead`: every parameter with its default and effect, the retry-rule matrix (status codes × methods), Retry-After parsing, streaming-body refusal contract, the token-bucket formula, why the floor matters, budget/bulkhead sharing across clients, and composition guidance. |
| 13 | +- **[`docs/errors.md`](../../docs/errors.md)** — the full `StatusError` hierarchy as an ASCII tree, the status-to-exception mapping table, practical catching strategies (specific status → `StatusError` → `NetworkError` → resilience errors → `ClientError` catch-all), the `exc.response.*` access pattern with the userinfo-stripping security note, and the payloads on `RetryBudgetExhaustedError` / `BulkheadFullError` for caller-side logging. |
| 14 | +- **[`docs/testing.md`](../../docs/testing.md)** — the `httpx2.MockTransport` injection pattern via `AsyncClient(httpx2_client=...)`. Recording/stateful handlers, testing custom middleware end-to-end, brief "why not respx" note pointing at the private-internals risk. |
| 15 | + |
| 16 | +Plus discovery: three new mkdocs nav entries (Resilience, Errors, Testing), four new bullets in `docs/index.md` "Where to go next", and engineering notes updated. |
16 | 17 |
|
17 | 18 | ## What's not in this release |
18 | 19 |
|
19 | | -- No source code changes. The `Middleware` protocol, `Next` type, and phase decorators all already existed (shipped pre-0.4 via Epic 2); this release documents them. |
20 | | -- No new built-in middleware (no CircuitBreaker, no RateLimiter, no metrics counter). The deliberate non-resilience worked-example choice keeps the guide focused on teaching the protocol rather than shipping a half-baked toy that gets cargo-culted. |
21 | | -- No mkdocs publish workflow / docs-site infra. That's Epic 6 story `6-2`; this release just makes the strict build green. |
| 20 | +- **No source code changes.** The Middleware protocol, phase decorators, resilience primitives, exception tree, and test-transport seam all already existed; this release documents them. |
| 21 | +- **No new built-in middleware.** No CircuitBreaker, no RateLimiter, no auth helpers. |
| 22 | +- **No API autodoc** (e.g., mkdocstrings). Hand-written user docs only. |
| 23 | +- **No benchmarks page, no migration guide, no speculative cookbook recipes.** Reference pages for shipped features + concrete adoption recipes only. |
| 24 | +- **No mkdocs publish workflow / docs-site infrastructure.** That's Epic 6 (story `6-2`); this release just keeps `mkdocs build --strict` green. |
22 | 25 |
|
23 | 26 | ## Epic 3 closed |
24 | 27 |
|
25 | 28 | Epic 3 (Resilience) has shipped end-to-end: |
26 | 29 | - v0.4 slice 1 — `Retry` + `RetryBudget` + `attempt_timeout=` |
27 | 30 | - v0.4 slice 2 — `Bulkhead` |
28 | | -- v0.7 — extension-slot docs |
| 31 | +- v0.7 — `3-6` extension-slot docs + the rest of the first-cut user-docs surface |
29 | 32 |
|
30 | | -Remaining roadmap is Epic 6 (ship v1.0): `6-2` docs site infrastructure, `6-3` benchmarks, `6-5` release flow (Trusted Publishers + Sigstore). |
| 33 | +Remaining roadmap is Epic 6 (ship v1.0): `6-2` docs site infrastructure (mkdocs publishing, hand-written content only — no autodoc), and `6-5` release flow (Trusted Publishers + Sigstore). |
31 | 34 |
|
32 | 35 | ## References |
33 | 36 |
|
34 | | -- Spec: [`planning/specs/2026-06-05-extension-slot-docs-design.md`](../specs/2026-06-05-extension-slot-docs-design.md) |
35 | | -- Plan: [`planning/plans/2026-06-05-extension-slot-docs-plan.md`](../plans/2026-06-05-extension-slot-docs-plan.md) |
| 37 | +- Middleware spec: [`planning/specs/2026-06-05-extension-slot-docs-design.md`](../specs/2026-06-05-extension-slot-docs-design.md) |
| 38 | +- Docs-expansion spec: [`planning/specs/2026-06-05-v0.7-docs-expansion-design.md`](../specs/2026-06-05-v0.7-docs-expansion-design.md) |
| 39 | +- Middleware plan: [`planning/plans/2026-06-05-extension-slot-docs-plan.md`](../plans/2026-06-05-extension-slot-docs-plan.md) |
| 40 | +- Docs-expansion plan: [`planning/plans/2026-06-05-v0.7-docs-expansion-plan.md`](../plans/2026-06-05-v0.7-docs-expansion-plan.md) |
36 | 41 | - Roadmap: [`planning/engineering.md`](../engineering.md) §8 |
0 commit comments