Follow-up to #125 (section 4 — roadmap layers). The chaos suite now covers scheduler-interleaving and 100% of the API surface, but I/O edge cases remain untested: partial reads, EAGAIN storms, mid-stream RST, backpressure, slow FIN, malformed/garbage payloads, a peer that accepts then never reads.
Approach
In-process EvilPeer rather than Toxiproxy — to avoid adding an external dev/CI dependency. A small PHP peer under fuzzy-tests/io_chaos/ driven by a seeded fault table. Toxiproxy may be layered on later as an optional extra.
Scope
- new
fuzzy-tests/io_chaos/ directory + harness (separate from the scenario harness)
- fault toxics:
latency (with jitter)
slicer — chop the TCP stream into random small chunks (exposes partial-read bugs)
reset_peer — RST after N ms / N bytes
bandwidth / limit_data — backpressure scenarios
slow_close — delayed FIN
timeout — stall after N bytes
- malformed / garbage payloads
- target topics:
stream, socket, curl
- invariants for every interleaving: no lost wakeups, no double
uv_close, partial reads reassembled correctly, cancellation-during-read cleans up handles, no refcount leaks
Reference
FUZZ_TESTING.md — Layer 2 (I/O chaos) describes the full strategy, including the Toxiproxy toxics list and the EvilPeer fallback rationale.
Related: #125 (sections 1–3 done), #102 (original fuzzing infrastructure).
Follow-up to #125 (section 4 — roadmap layers). The chaos suite now covers scheduler-interleaving and 100% of the API surface, but I/O edge cases remain untested: partial reads,
EAGAINstorms, mid-streamRST, backpressure, slowFIN, malformed/garbage payloads, a peer that accepts then never reads.Approach
In-process EvilPeer rather than Toxiproxy — to avoid adding an external dev/CI dependency. A small PHP peer under
fuzzy-tests/io_chaos/driven by a seeded fault table. Toxiproxy may be layered on later as an optional extra.Scope
fuzzy-tests/io_chaos/directory + harness (separate from the scenario harness)latency(with jitter)slicer— chop the TCP stream into random small chunks (exposes partial-read bugs)reset_peer—RSTafter N ms / N bytesbandwidth/limit_data— backpressure scenariosslow_close— delayedFINtimeout— stall after N bytesstream,socket,curluv_close, partial reads reassembled correctly, cancellation-during-read cleans up handles, no refcount leaksReference
FUZZ_TESTING.md— Layer 2 (I/O chaos) describes the full strategy, including the Toxiproxy toxics list and the EvilPeer fallback rationale.Related: #125 (sections 1–3 done), #102 (original fuzzing infrastructure).