pingqiuandClaude Opus 4.7 aa05cff2df test(transport): pillar 2 C — deterministic faulty-store failure (was wire-abort race)
§6.10 BASE bypass (commit 055fd46) made base lane fast enough that
the original Pillar 2 C wire-abort test became race-prone:
sometimes the entire session — base + WAL + barrier round-trip —
completed before the test's "close every accepted conn" code path
fired, leading to Success=true when the test expected Success=false.
Reproduced as ~3/20 fail rate after the §6.10 change.

Switch the failure mechanism from "close conn mid-session" (timing-
dependent) to faulty-read substrate (deterministic): the same
faultyReadStorePillar2 used by Pillar 2 A. Read fails after 4
successful base-block reads → streamBase returns Substrate failure →
bridge onClose → OnSessionClose with Success=false. No wire timing
involved.

The semantic claim of the test is unchanged: prove that a session
which fails on the failure path triggers rule-2 emit-context restore.
Pre-session SnapshotEmitContext returns (nil, zero, SteadyMsgShip)
on a fresh replica; post-session snapshot must equal pre-session.
That assertion is preserved.

What's no longer in scope here:
  - Mid-session network drop / replica crash specifically — this
    test no longer claims to exercise that path. Future "real
    network drop" coverage would need a controllable wire-fault
    listener (test-infra follow-up); slice-1 deferred wire-tap
    helper covers the same cost-of-test-infra slice.

Stability: 20 consecutive runs of TestPillar2C alone, 5 consecutive
full-transport-suite runs, all green post-fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 13:47:02 -07:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%