📝 docs: WS session expiry settled — stream survives, handshake-only enforcement #205

Merged
mat merged 1 commit from docs/ws-expiry-settled into main 2026-10-29 07:14:33 +00:00
Owner

Summary

 websocket-realtime.md → "Session expiry and the stream"
-  established stream through the expiry instant: unobserved (host suspended; rerun pending)
+  the established stream SURVIVES the expiry — +118 frames accrued through the
+    instant, steady cadence, no cut over the full 2h01 run
+  server authenticates once, at the handshake; never re-checks mid-stream

The sleep-inhibited rerun settled the question #189 left open. The stream received frames continuously across the boundary (2631 at expiry−4 min → 2749 at expiry+1 min, same ~100–118 frames/300 s cadence, 2761 frames over 2 h 01 m; wall/monotonic clocks matched to ~1 s — no suspend this time). Meanwhile the expired cookie is rejected at every new presentation: REST → 401, fresh WS handshake → HTTP 401.

Consequence recorded: expiry cannot kill a running stream — only a re-handshake (reconnect) needs a fresh cookie. The client's layered design (proactive pre-handshake refresh + reactive 401 fallback) is validated; no mid-stream session keep-alive is needed.

Evidence

  • Before (#189, merged): boundary crossing unobserved — host suspended mid-probe.
  • After: the definitive 2 h observation with the inhibitor verified held across the run (checked at launch + 27/55/82/109 min); docs-only — pytest = 242 passed, mypy clean.

Merge Danger

Door: two-way — documentation only.

Blast Radius: none — no code change; closes the observation deferred by #158/#161.

## Summary ```diff websocket-realtime.md → "Session expiry and the stream" - established stream through the expiry instant: unobserved (host suspended; rerun pending) + the established stream SURVIVES the expiry — +118 frames accrued through the + instant, steady cadence, no cut over the full 2h01 run + server authenticates once, at the handshake; never re-checks mid-stream ``` The sleep-inhibited rerun settled the question #189 left open. The stream received frames continuously across the boundary (2631 at expiry−4 min → 2749 at expiry+1 min, same ~100–118 frames/300 s cadence, 2761 frames over 2 h 01 m; wall/monotonic clocks matched to ~1 s — no suspend this time). Meanwhile the expired cookie is rejected at every new presentation: REST → 401, fresh WS handshake → HTTP 401. Consequence recorded: expiry cannot kill a running stream — only a re-handshake (reconnect) needs a fresh cookie. The client's layered design (proactive pre-handshake refresh + reactive 401 fallback) is validated; no mid-stream session keep-alive is needed. ## Evidence - **Before (#189, merged):** boundary crossing unobserved — host suspended mid-probe. - **After:** the definitive 2 h observation with the inhibitor verified held across the run (checked at launch + 27/55/82/109 min); docs-only — `pytest` = 242 passed, `mypy` clean. ## Merge Danger **Door:** two-way — documentation only. **Blast Radius:** none — no code change; closes the observation deferred by #158/#161.
📝 docs: WS session expiry settled — stream survives, handshake-only enforcement
All checks were successful
Tests / forgejo-pytest (pull_request) Successful in 45s
Tests / forgejo-pytest (push) Successful in 45s
b2b4c8f44a
mat changed title from WIP: 📝 docs: WS session expiry settled — stream survives, handshake-only enforcement to 📝 docs: WS session expiry settled — stream survives, handshake-only enforcement 2026-10-29 07:14:29 +00:00
mat merged commit 1e8085e6ae into main 2026-10-29 07:14:33 +00:00
mat deleted branch docs/ws-expiry-settled 2026-10-29 07:14:33 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mat/python-comwatt-client!205
No description provided.