pingqiuandClaude Opus 4.7 8672e63562 transport: §6.3 slice-2A — flip LegacyOutOfOrderEmit default to false
Architect ruling 2026-04-30: §6.3 normative tail-gap fail-closed
becomes the default. LegacyOutOfOrderEmit defaults to false in
DefaultWalShipperConfig; new code MUST NOT rely on log+drop-gap
behavior. The shipper does NOT silently emit input bytes for a
missing-LSN case; engine MUST escalate to rebuild.

Test migration to §6.3 fail-closed default (sequential cursor+1
LSNs, production-mirror pattern):

  - dual_lane_p2d_profile_test: P2d wire-format dispatch tests
    used arbitrary lsn=50/200 for distinctness. Changed to lsn=1
    (cursor+1 fast-path); wire-format claims (SWRP preamble vs
    frameWALEntry, kind tag) unchanged.

  - recovery_sink_adapter_test: post-EndSession context-restore
    tests used arbitrary lsn=100/9999. Changed to use
    shipper.Cursor()+1 dynamic so fast-path fires; rule-2 context-
    restore claim is independent of LSN value.

  - walshipper_resident_test (3 phase tests): cross-session
    NotifyAppends with lsn={1,2,3} mismatched cursor (StartSession
    rewinds cursor to fromLSN=0). Changed to dynamic shipper.Cursor()
    +1 per phase.

  - ship_sender_test (StaleEpoch_SilentDrop): fresh-epoch sanity
    Ship with lsn=2 → cursor=0 mismatch under §6.3. Changed to
    lsn=1.

  - wal_shipper_executor_test (AdvancesCursor): ships at lsn={10,
    20, 15} testing cursor-advances claim. Re-authored to lsn={1, 2,
    1 idempotent} — production-mirror dense sequence.

  - wal_shipper_executor_test (RegistryStableConcurrent): pre-§6.3
    used 8×25 concurrent Ships with random LSNs (header itself
    flagged "concurrent Ship is NOT production"). Re-authored per
    architect Path B ruling: sequential Ship from one goroutine
    (with lossless cursor==maxLSN assertion as the §6.3 contract
    permits) + concurrent WalShipperFor lookups (the registry-
    stability claim). Concurrency stress preserved on the part that
    survives §6.3.

5× consecutive cross-package sweep (transport / recovery /
replication / replication/component / storage / storage/memorywal /
storage/smartwal) all green. No flakes.

Production audit (cmd/blockvolume + cluster.go): both use
NewWalShipper → DefaultWalShipperConfig, now Legacy=false. Production
flow inserts NotifyAppend(lsn==cursor+1) per primary's WAL append
chain — fast-path fires, no tail-gap reachable. If a tail gap ever
surfaces under load (network drop / shipper bug), the engine sees
the error and escalates to rebuild — the explicit §6.3 contract.

Refs: architect ruling 2026-04-30 (Path B + Legacy=false default);
v3-recovery-algorithm-consensus.md §6.3 + §6.9 NEGATIVE-EQUITY.
Companion to slice-1 b3826b2.

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