pingqiuandClaude Opus 4.7 cf232f2866 test(transport): pillar 3 slice-1 — same-LBA arbitration on transport stack
Mini-plan §11.7 pillar 3 (receiver-side convergence): when the same
LBA is touched by both the backlog (WAL ≤ targetLSN) AND a live
write during the session (WAL > targetLSN flushed at seal), the
replica's final state matches the higher-LSN write. AtomicSeal and
Pillar 2 B both use disjoint LBA ranges (push window > base window),
so neither asserts the arbitration claim.

Single subtest in core/transport/pillar3_convergence_test.go:

  TestPillar3Slice1_ReceiverConvergence_LiveOverwritesBacklog_SameLBAs
    - Seed primary with 12 LBAs (LBA 0..11, pattern A_i). Sync,
      primaryH=12.
    - StartRebuild with frozenTarget=12.
    - After OnSessionStart: live-overwrite LBA {3, 5, 7} with pattern
      B_i (LSN 13/14/15 > frozenTarget → SessionLive path).
    - After barrier: untouched LBAs (0,1,2,4,6,8,9,10,11) → seed A;
      overwritten LBAs (3,5,7) → live B.

The discriminating assertion is on the overwritten LBAs: a receiver
without proper wire-ordering or apply-order arbitration could leave
those LBAs at A. Convergence to B for all three captures the
INV-PILLAR3-SAMELBA-CONVERGENCE invariant. Verified deterministic
across 10 consecutive runs.

In-scope (slice-1):
  - Transport stack only (NewBlockExecutorWithDualLane + real
    RecoverySink + runDualLaneListener + real receiver).
  - Single arbitration assertion across multi-LBA seed + overwrites.

Out of scope (deferred):
  - Full engine/cluster path (component.Cluster.DriveAssignment +
    DriveProbeResult) — slice-2 territory.
  - §IV T2 (architect-open at consensus §IV) — this slice asserts
    barrier semantics under a frozen target only.
  - RF > 1, long-duration soak.
  - Wire-level frame tap with explicit LSN-monotonicity proof —
    convergence here is asserted via post-barrier replica reads;
    frame integrity remains transitive (any torn frame → receiver
    decode fail → session.Success = false).

Refs: v3-recovery-wal-shipper-mini-plan.md §11.7 pillar 3 (receiver
convergence). Companion to 11392ba / eb4071e / cc457c0 / ceac3bf.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 11:45:10 -07:00
Languages
Go 84.7%
Rust 7.7%
Shell 2.7%
templ 1.5%
Java 1%
Other 2.1%