Repository navigation
Description
Follow-up to #127 — the I/O chaos foundation (EvilPeer, the io/ topic, transport×logic crossing, the chaos event log, the _FUZZ CI build) landed in #128. Remaining work tracked here.
1. Write-path / backpressure coverage
The harness currently exercises only the client read path (downloads from peer). The write path is untested:
never-readEvilPeer toxic — the peer accepts the connection and never reads.- a client
uploadstep — fillsSO_SNDBUF, sofwrite()blocks waiting for the socket to become writable. - exercises the reactor's writable-wait and partial-write handling.
2. Real RST (in-process, no external tool)
EvilPeer currently closes with a graceful FIN. Add a true RST via ext/sockets — socket_set_option(SO_LINGER, {l_onoff:1, l_linger:0}) then close. Lets the suite cover the ECONNRESET path, which is distinct reactor code from a clean EOF.
3. Forked-peer mode
A ... as forked peer step that runs the EvilPeer in a separate process (real OS boundary, real TCP stack) instead of an in-process coroutine. The harness was designed for both modes (coroutine default + forked via a dedicated step).
4. cancel-during-download
A killer coroutine cancels the client mid-I/O — cancellation racing live reads/writes is exactly where reactor use-after-free / leak bugs live. Adds a logic-axis alternative to combined_chaos.feature.
5. Turn-key failure freeze
Make a chaos failure reproducible as a deterministic, non-chaos regression test ("every found bug becomes a fixed scenario"):
- log
TRUE_ASYNC_SCHED+CHAOS_GEN_SEEDin the chaos event log; - emit a machine-readable replay descriptor on failure (feature, scenario, mutation combo, seeds);
- a
_harness/freeze.phpgenerator that turns a descriptor into a frozen.phpt— mutation flattened to the failing combo, seeds pinned via the phpt--ENV--section.
6. Optional external-tool layer (stretch)
Toxiproxy in front of the EvilPeer for transport toxics PHP cannot do precisely (bandwidth throttling, runtime-controlled toxics); tc netem for packet loss/reorder/duplication. Opt-in / nightly only — they break per-test determinism and need external setup, so they must not gate per-PR CI.
Reference
FUZZ_TESTING.md Layers 2–4. Related: #127, #128, #125, #102.
Activity
#129 io-chaos: write-path back-pressure + fix writer hang on peer reset
#129 io-chaos: SO_LINGER hard-reset toxic — found a concurrent-write …
#129 io-chaos: forked-peer mode — EvilPeer in a separate OS process
#129 io-chaos: cancel-during-transfer coverage
#129 io-chaos: freeze.php — pin a failing chaos run into a determinis…
#129 io-chaos: Toxiproxy external transport-fault layer (item 6)
Merge pull request #131 from true-async/129-io-chaos-follow-up-write-…
#129 io: serialize concurrent file writes to one handle
Merge pull request #133 from true-async/129-io-chaos-follow-up-write-…
#129 io: skip 046-write_wakes_on_peer_reset on Windows
Merge pull request #135 from true-async/129-io-chaos-follow-up-write-…
docs: move #136 fuzzy-tests entries out of main CHANGELOG.md
#138 fuzzy-tests: concurrent shared-file writes (php_stdiop_write bac…