Commit faccba8
docs(decoders): document the can_decode no-raise obligation
Closes the final delta-audit Nit (planning/audit/2026-06-12-delta-audit.md):
the ResponseDecoder protocol was silent on the fact that can_decode runs in
_dispatch_decoder, outside the DecodeError wrap — so a third-party decoder
whose can_decode raises would escape the ClientError contract.
Documents the obligation (return False to decline, never raise) on the
ResponseDecoder.can_decode docstring and engineering.md Seam B, rather than
adding an enforced guard: it is unreachable with the bundled decoders (both
treat any probe failure as False), so the proportionate fix is the written
contract, not defensive branches for a path nothing currently hits.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 5377bdd commit faccba8
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
0 commit comments