Skip to content

Commit bfacfe0

Browse files
lesnik512claude
andcommitted
docs(claude): update Seam B summary for 0.9.0 multi-decoder routing
CLAUDE.md's Seam B bullet still described the pre-0.9.0 single-decoder contract (a single ResponseDecoder, decode(content, model) only) with no can_decode dispatch, decoders=[...] list, or MissingDecoderError pre-flight. An agent implementing a decoder from it ships an interface that AttributeErrors at dispatch. Rewritten to match the live contract and engineering.md §Seam B. Closes the High finding in planning/audit/2026-06-12-delta-audit.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 5ecb929 commit bfacfe0

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)