Skip to content

Remove vestigial client-sessions middleware - #603

Open
jcheng5 wants to merge 2 commits into
masterfrom
remove-client-sessions
Open

jcheng5 wants to merge 2 commits into
masterfrom
remove-client-sessions

Conversation

@jcheng5

@jcheng5 jcheng5 commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Removes the client-sessions middleware from lib/server-init.js, along with its dependency (package.json, npm-shrinkwrap.json) and license entry (NOTICE.md)
  • Nothing in lib/, test/, R/, or assets/ ever read req.session_state, and because the lazy Session.content getter was never touched, no session_state cookie was ever actually emitted
  • The middleware also broke the WebSocket upgrade path by being invoked with res=null, which made client-sessions throw internally and silently swallow the error — upgrades worked, but one tick late. Removed outright rather than fixed, since it was vestigial
  • Updates memory-bank/proxyLayer.md, memory-bank/requestLifecycle.md, and memory-bank/techContext.md to reflect the removal

Test plan

  • npm run build && npm test
  • Manually verify /r-hello/ and a SockJS/WebSocket-backed app still work end to end (no session_state cookie expected before or after)

🤖 Generated with Claude Code

jcheng5 and others added 2 commits September 2, 2026 11:57
Nothing in lib/, test/, R/, or assets/ ever read req.session_state, and
because the lazy Session.content getter was never touched, no
session_state cookie was ever actually emitted. It also broke the
WebSocket upgrade path by calling the middleware with res=null, which
made client-sessions throw and swallow the error. Dropping it outright
rather than fixing the upgrade-path bug.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant