fix(server): reject empty patrol batch; survive broadcast lag#157
Open
tieguy wants to merge 1 commit into
Open
fix(server): reject empty patrol batch; survive broadcast lag#157tieguy wants to merge 1 commit into
tieguy wants to merge 1 commit into
Conversation
Two independent robustness fixes on the localhost server: - A patrol request with an explicit empty batch_rev_ids ([]) reached rev_ids[0] on an empty Vec and panicked the handler (the None fallback only fires on a missing batch, and validation never rejected an empty one). validate_action_request now rejects a present-but-empty batch with 400, and the executor uses split_first so the index panic is unreachable even if validation is bypassed. - The coordination WebSocket fan-out task treated broadcast RecvError::Lagged as loop termination, so a slow operator panel that fell more than the room's 128-message buffer behind silently stopped receiving all further updates on an otherwise-open socket. It now logs the skip and resyncs to live, only exiting on Closed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tieguy
force-pushed
the
fix-server-empty-batch-and-lag
branch
from
July 16, 2026 19:47
0b1cffe to
62a2d7e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two edges on the patrol/WS path:
batch_rev_idspanicked onrev_ids[0]. Now validated up front and rejected withinvalid_payload.Laggedbroadcast error killed the WS forwarding task instead of skipping the missed events. Now logs a warning and continues.🤖 Generated with Claude Code