Skip to content

ci(build): set file encoding to utf-8 for logging#1

Merged
RaphDal merged 3 commits intomainfrom
rd_ci
Jan 28, 2026
Merged

ci(build): set file encoding to utf-8 for logging#1
RaphDal merged 3 commits intomainfrom
rd_ci

Conversation

@RaphDal
Copy link
Copy Markdown
Contributor

@RaphDal RaphDal commented Jan 28, 2026

No description provided.

@RaphDal RaphDal changed the title ci: set file encoding to utf-8 for logging ci(build): set file encoding to utf-8 for logging Jan 28, 2026
@RaphDal RaphDal merged commit e71df4a into main Jan 28, 2026
8 checks passed
@RaphDal RaphDal deleted the rd_ci branch January 28, 2026 10:27
bluestreak01 added a commit that referenced this pull request Apr 27, 2026
The cursor I/O loop previously treated any wire failure as terminal —
first disconnect = sender broken, every subsequent batch threw. Now,
when the sender wires a ReconnectFactory + ReconnectListener, a wire
failure triggers:

  1. WARN log
  2. Build a fresh WebSocketClient via the factory (same auth/TLS/host)
  3. Reset wire state: nextWireSeq=0, fsnAtZero = engine.ackedFsn() + 1
  4. Reposition the cursor at the first unacked FSN (replay)
  5. Notify the listener → producer's connectionGeneration bumps so
     the next encode emits full schema definitions, not refs the new
     server has never seen
  6. Outer ioLoop continues — nextWireSeq=0 starts on the new wire,
     trySendOne picks up at the repositioned cursor and replays every
     unacked frame, then continues with whatever the producer publishes
     next

Added in main:
  * CursorWebSocketSendLoop.ReconnectFactory + .ReconnectListener
    interfaces (both functional, both null-able for legacy "fail-fast"
    semantics)
  * positionCursorAt(fsn) — walks frames inside the segment containing
    fsn to find the byte offset
  * SegmentRing.findSegmentContaining(fsn) + CursorSendEngine
    pass-through — used by the cursor reposition
  * QwpWebSocketSender extracts buildAndConnect() to use both for the
    initial connect and as the reconnect factory; onWireReconnect()
    is the listener that bumps connectionGeneration

This commit covers the *mechanics* (one attempt, succeed-or-fail).
The follow-up commit adds policy: exponential backoff with jitter,
per-outage time cap (reconnect_max_duration_millis, default 300s
per spec decision #2), and auth-failure detection (401/403/non-101
treated as terminal so the retry budget isn't wasted on errors that
won't fix themselves).

Two integration tests:
  * testReconnectAfterServerInducedDisconnect — server ACKs then
    closes; sender reconnects, second batch lands on the new wire
  * testReplayResendsUnackedFramesAcrossReconnect — server receives
    the first frame WITHOUT ACKing then closes; sender reconnects
    and replays the unacked frame on the new connection

Spec decisions #5 (encode-mid-reconnect race) and the core of
#1/#2 (reconnect mechanics) land here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant