pingqiuandClaude Opus 4.7 bb36a601b8 transport: RecoverySink — review-feedback doc tightening
Three doc-only follow-ups from architect code review of 845c810
(non-blocking; no logic changes):

  1. NewRecoverySink — explicit caller obligations:
     - Defer EndSession at the StartSession call site so a
       StartSession error path still restores steady context
       (recovery.Sender.Run already does this; production callers
       using NewRecoverySink directly must too).
     - nil sessionConn = programmer error (Realtime emits would have
       nowhere to go). nil steadyConn = honest only when no steady
       ship was in flight; next steady emit fails closed at EmitFunc.

  2. installRecordingShipper (test helper) — TEST-ONLY /
     single-goroutine note. The entry.shipper assignment bypasses
     walShipperMu deliberately; production paths take that mutex.
     Don't lift the pattern into production or concurrent tests
     without re-introducing the lock.

Test suite unchanged; go test ./core/transport/ -run TestRecoverySink
still PASS (6/6).

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