You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor: Use WriteAndClearBuffer helper to prevent stale content
Addresses review feedback from HuaHuaY: Instead of clearing the buffer
in TranslateMinimalBatch for empty batches, use a WriteAndClearBuffer()
helper that writes and clears the buffer in all write paths.
This is cleaner because:
- Every write follows the same pattern (write -> clear)
- Easier to reason about for future write stages
- The invariant is explicit: buffer is always clean after flush
0 commit comments