pingqiuandClaude Opus 4.7 616583fc38 recovery: P2c-A — sink mandatory; remove legacy Run() else branch
Slice A (mechanical, dead-code removal):
  - NewSenderWithSink panics on nil sink (was: silent promote to legacy)
  - NewSender → private newSender (only used by sink-installing
    constructors as builder)
  - Run() drops the `if s.sink != nil { ... } else { legacy }` split;
    sink path is unconditional. INV-NO-DOUBLE-LIVE at recovery layer
    is now a structural guarantee (one emit path, not a runtime check)
  - TryAdvanceToSteadyLive call site removed (kickoff Q3 collapsed
    Phase enum to {Idle, Active}; barrier-ack is the completion
    signal)

Kept for slice B per architect framing:
  - Close, drainAndSeal, liveQueue, sealed, closeCh, queueMu, walItem
  - PushLiveWrite (still feeds session-lane tails until live writes
    route through WalShipper.NotifyAppend)
  - streamBacklog (called by senderBacklogSink.DrainBacklog)

Tests:
  + TestNewSenderWithSink_NilSinkPanics — locks sink-mandatory contract
  - TestSender_NoSink_FallsBackToLegacyBehavior — replaced by panic test

go test ./core/recovery/ ./core/transport/ — all PASS.

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