Commit d241d87
Document deliberate opt-out from wire skip_message recovery affordance
The wire layer's MessageDecoder.skip_message + ReadBuffer's
deferred-discard machinery is documented as a recovery affordance
for oversize-message rejections (read_message raises DecodeError
without poisoning so a caller can drain the over-large frame and
resume on the same connection). DqliteProtocol never invokes it —
every wire-level ProtocolError is wrapped to a client-level
ProtocolError and routed through _invalidate to drop the connection.
The opt-out is deliberate (a 64 MiB cap is high enough that hitting
it almost always indicates an attacker, a misbehaving server, or a
deeply-nested wire bug — none safe to resume from on the same
socket; the pool's re-acquire path is the right recovery), but it
was undocumented. A reader of the wire docstring would expect
skip_message to be invoked somewhere, and a future contributor might
quietly add it without re-evaluating the security posture.
Document the rationale at the wire-DecodeError wrap site in
_read_response, name skip_message explicitly so grep finds it, and
pin the opt-out (no skip_message / is_skipping calls anywhere in the
client module) against accidental re-introduction.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4c31cf0 commit d241d87
2 files changed
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
864 | 883 | | |
865 | 884 | | |
866 | 885 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments