pingqiuandClaude Opus 4.7 ceac3bfc84 test(transport): pillar 2 — fault-injection on the assembled stack (A+B+C)
Mini-plan §11.7 pillar 2: same fault dimensions as C3 fault-injection,
but on the manager-assembled stack (BlockExecutor + PrimaryBridge +
real RecoverySink + recovery.Sender + resident WalShipper +
PeerShipCoordinator under unified replicaID). C3 used a spy
WalShipperSink and net.Pipe; this slice exercises the same robustness
through TCP + real receiver.

Three sibling tests in core/transport/pillar2_assembled_test.go:

  A — TestPillar2A_BaseError_AssembledStack_FailReason
      faultyReadStorePillar2 wraps the primary; Read fails after 4
      successful base-block reads. Asserts: OnSessionClose Success=false
      with FailReason wrapping the synthetic error; coord.Phase back to
      Idle (EndSession defer ran); replica.R < primary.H (recovered
      frontier never reached the target — barrier never fired).

  B — TestPillar2B_LiveWrites_HighPressure_BarrierIntegrity
      Sibling to TestDualLane_LiveWritesDuringSession_AtomicSeal with
      different focus: larger backlog (300 entries) + more pushers
      (16 × 8 = 128 attempts) for genuine writeMu contention; stricter
      convergence (replica.H == primary.H exactly post-barrier — not
      asserted by AtomicSeal). Frame integrity is asserted transitively
      through Success=true: any torn frame would fail receiver decode.
      Documents wire-tap as a future test-infra follow-up.

  C — TestPillar2C_WireAbortMidSession_AssembledStack_RestoresEmitContext
      Production-equivalent abort: peer drops connection mid-session
      (network failure / replica crash) — startRebuildDualLane uses
      context.Background, so wire close is the closest analog to C3's
      ctx-cancel test. Snapshots the resident WalShipper's pre-session
      emit context, aborts mid-session, asserts post-session snapshot
      equals pre (rule-2 restore). Plus: OnSessionClose with FailReason,
      coord.Phase=Idle.

What's intentionally out of scope:
  - Wire-level frame tap with explicit decode + LSN-monotonicity
    (current tests prove integrity transitively).
  - Pillar 3 (receiver convergence with live writes during session,
    bitmap/barrier interaction, T2 hardware soak).
  - streamBase ctx-awareness (C3 #2B variant — separate follow-up).

Refs: v3-recovery-wal-shipper-mini-plan.md §11.7 pillar 2; architect
sign-off "A+B+C 一个 commit"; Phase 0 unified replicaID (11392ba).

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