feat: session resumption and connection migration - #267
Merged
Conversation
Add encrypted session state persistence so clients can resume sessions across gateway restarts or reconnections without losing room membership. SessionManager handles AES-256-GCM encrypted storage with key rotation, debounced saves, and optional Redis or in-memory backends. Closes RiftCore00#258, Closes RiftCore00#175, Closes RiftCore00#251, Closes RiftCore00#254
levibliz
self-requested a review
August 17, 2026 23:41
levibliz
approved these changes
Aug 17, 2026
RajeshRk18
pushed a commit
to RajeshRk18/Real-Time-Spatial-Tracking-Gateway
that referenced
this pull request
Aug 18, 2026
…nto feat/session-resumption-228 Resolves conflicts with the independently merged session-resumption implementation (RiftCore00#267) and the co-located HTTP server / backpressure work (RiftCore00#203, RiftCore00#217, RiftCore00#218): - src/session-manager.js: keep this branch's encrypted manager (AES-256-GCM + HKDF, Redis/in-memory store, debounced saves, metrics) over the add/add conflicting upstream variant. - src/server.js: keep this branch's session wiring and admin migration endpoint; integrate upstream's /healthz, /readyz and Prometheus /metrics endpoints, gateway metrics counters, event-loop lag sampling and markShuttingDown. Session resumption counters are now exported in the Prometheus exposition instead of a JSON /metrics body. - src/index.js: keep session-aware graceful shutdown; call markShuttingDown() on SIGTERM/SIGINT so health probes flip to 503. - src/room-manager.js: keep ring-buffer replay/dedup/limits; restore the backpressure-aware broadcast wiring (constructor options, client state tracking and cleanup) that upstream's copy referenced but never initialized. - tests: keep this branch's session-manager and resumption integration suites; update /metrics assertions to the Prometheus format. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012uUSA8xm8WNue2Cw1mj1zM
RajeshRk18
added a commit
to RajeshRk18/Real-Time-Spatial-Tracking-Gateway
that referenced
this pull request
Aug 18, 2026
…nto feat/session-resumption-228 Resolves conflicts with the independently merged session-resumption implementation (RiftCore00#267) and the co-located HTTP server / backpressure work (RiftCore00#203, RiftCore00#217, RiftCore00#218): - src/session-manager.js: keep this branch's encrypted manager (AES-256-GCM + HKDF, Redis/in-memory store, debounced saves, metrics) over the add/add conflicting upstream variant. - src/server.js: keep this branch's session wiring and admin migration endpoint; integrate upstream's /healthz, /readyz and Prometheus /metrics endpoints, gateway metrics counters, event-loop lag sampling and markShuttingDown. Session resumption counters are now exported in the Prometheus exposition instead of a JSON /metrics body. - src/index.js: keep session-aware graceful shutdown; call markShuttingDown() on SIGTERM/SIGINT so health probes flip to 503. - src/room-manager.js: keep ring-buffer replay/dedup/limits; restore the backpressure-aware broadcast wiring (constructor options, client state tracking and cleanup) that upstream's copy referenced but never initialized. - tests: keep this branch's session-manager and resumption integration suites; update /metrics assertions to the Prometheus format.
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
Add encrypted session state persistence so clients can resume sessions across gateway restarts or reconnections without losing room membership.
What's included
Constraints respected
Closes #258