fix(wire): transient-5xx handshake, encrypted-session rotation retry, throttle-aware timeout, since encoding#7
Merged
Conversation
|
…tion retry, throttle-aware timeout, since encoding
- ws-client: only emit upgrade_rejected for terminal (4xx) handshake
rejections. A transient 5xx is reconnected by the wrapper, but still drove
the engine's permanent-rejection handler ('restart the daemon'),
contradicting the self-healing reconnect.
- ws-client: integer-coerce and percent-encode the since cursor in the dial
URL, matching the bundleId treatment.
- http-client: on HTTP 400 encrypted-payload-rejected (server key rotation /
stale cached pubkey), rebuild the encrypted session and retry once, as the
401 session paths already do.
- http-client: scale the transfer idle timeout when a bandwidth throttle is
configured so a slow-but-progressing throttled transfer isn't aborted by
the fixed 30s socket-inactivity window.
663b2eb to
66a52e6
Compare
|
🎉 Linting finished with no errors or warnings 🎉
|
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.
Four wire-layer robustness fixes (ws-client + http-client):
upgrade_rejectedfor all statuses, but the wrapper only treats 4xx as terminal — a 5xx reconnects. The engine treats a non-4xxupgrade_rejectedas PERMANENT ('restart the daemon'), so a transient 502/503 (e.g. a reverse proxy during a deploy) logged a false 'permanently closed' alarm while the socket self-healed. Now only terminal (4xx) rejections emitupgrade_rejected.sinceencoding. The dial URL interpolatedsinceraw whilebundleIdwas percent-encoded; nowsinceis integer-coerced andencodeURIComponent'd.encrypted-payload-rejected(the server rotated its api-encrypt keypair and the cached pubkey is stale), rebuild the encrypted session and retry once — mirroring the existing 401 session-recovery branches.