Skip to content

Commit 7111f02

Browse files
authored
Merge pull request #46 from modern-python/docs/seam-b-multi-decoder-claudemd
docs(claude): update Seam B summary for 0.9.0 multi-decoder routing
2 parents 5ecb929 + bfacfe0 commit 7111f02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ src/httpware/
8181
Three documented internal boundaries. AI agents must respect them — never cross a seam except through its documented protocol.
8282

8383
1. **Seam A** — `Client`/`AsyncClient` ↔ `Middleware`/`AsyncMiddleware` — middleware chain composed at `Client.__init__` and `AsyncClient.__init__`, frozen for the client's lifetime. Internal terminal calls `httpx2.Client.send` or `httpx2.AsyncClient.send`, maps exceptions, raises `StatusError` on 4xx/5xx. Sync and async surfaces are kept at parity.
84-
2. **Seam B** — `Client`/`AsyncClient` ↔ `ResponseDecoder` — called when `response_model` is provided. Signature: `decode(content: bytes, model: type[T]) -> T`. Implementations of both `send` methods call the decoder identically.
84+
2. **Seam B** — `Client`/`AsyncClient` ↔ `ResponseDecoder` list — both clients take `decoders: Sequence[ResponseDecoder] | None` (a *list*, not a single decoder; `None` resolves against installed extras, pydantic-first). When `response_model` is provided, `send`/`send_with_response` (sync and async alike) walk the list and the first decoder whose `can_decode(model: type) -> bool` returns True runs `decode(content: bytes, model: type[T]) -> T`; if no decoder claims the model, `MissingDecoderError` is raised *before* the HTTP call. Decoder exceptions are wrapped as `DecodeError` at the seam. Full contract: [`engineering.md`](planning/engineering.md) §Seam B.
8585
3. **Seam C** — `httpware` ↔ optional extras — each opt-in dependency imported only inside its dedicated module.
8686

8787
## Testing

0 commit comments

Comments
 (0)