pingqiu 14a0d32d40 docs: §6.8 review-derived invariants — DisableTimerDrain + lock order
Architect review of C1+C2+C3 (offline against §6.8 / §IV / §V) flagged
two doc gaps that should be inline in the code, not just PR descriptions:

1. DisableTimerDrain (wal_shipper.go WalShipperConfig):
   - PRODUCTION MUST leave false. §6.8 #4 is MUST: "primary-idle
     starvation forbidden". Setting true in production violates
     architect contract.
   - Test-only invariant: shipper MUST NOT linger in cursor < head
     without alternative drain source. Today's only users are R2
     saturation tests (scope-bounded).

2. Lock hierarchy (executor.go walShipperEntry.writeMu):
   - shipMu → writeMu (always; reversal risks deadlock).
   - WalShipper holds shipMu; calls EmitFunc under it; EmitFunc
     acquires writeMu.
   - recovery.Sender.writeFrame acquires only writeMu (does not
     hold shipMu). Order is consistent: shipMu outermost when both
     in play.

No code logic change; documentation tightening so future readers
can verify §6.8 mechanical SINGLE-SERIALIZER without re-deriving
from grep.

go test all four packages — PASS.
2026-04-30 08:56:49 -07:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%