pingqiu 4f6d5c22e4 docs: drainOpportunity comment matches §13 dual-mode contract
Architect code-review caught comment/code mismatch: docstring above
drainOpportunity still said "Realtime mode: if cursor < head, scan
to fill the gap" — but the implementation correctly returns early
when mode != ModeBacklog (matches consensus §13 E-WALSHIPPER-DUAL-
MODE / mini-plan §11.2a / T4a no-replay carve-out).

Risk this doc-debt prevented: future contributor reads the stale
comment, "fixes" the function to scan in Realtime, re-introduces
the silent-divergence bug C2 closed (Realtime substrate scan would
replay dead-window writes when peer comes back online).

Comment now states the dual-mode contract explicitly with a
DO-NOT-ADD-A-REALTIME-BRANCH warning citing §13 / T4a / CHK-
WALSHIPPER-TIMER-DRAIN's ModeBacklog scope.

No code logic change.

go test all four packages — PASS.
2026-04-30 09:47:15 -07:00
Languages
Go 84.7%
Rust 7.7%
Shell 2.7%
templ 1.5%
Java 1%
Other 2.1%