fix: harden runtime lifecycle and input handling#96
Merged
Conversation
Merge the read-modify-write of the session key pair under a single write lock so a re-register and a key rotation cannot read the same base snapshot and clobber each other. Rename UpdateKeyPairFieldsAndPushCtrl to UpdateKeyPair (the old full-replacement method is now unused). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Close waited indefinitely on startState.done while con.Listen ignores cancellation, so a stuck console link could wedge listener shutdown. Cap the wait at remStartCloseTimeout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Stop the accept loop before restoring the seam so a late retry cannot call the default Accept on a nil console and crash the whole package; widen the timing windows to remove flakiness. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Explain that an Important event dropped on a full broker queue is also absent from replay history, and document the eventSlots one-slot-per-in-flight-entry invariant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
h3zh1
marked this pull request as ready for review
July 14, 2026 09:33
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.
Summary
replacement and bounded REM shutdown
and concurrent close failures
bounded initial and payload reads
subscription barrier
RequestAndWaitpath and wait for Forward Listener shutdownmetadata, and default path handling
Validation