feat(remote)!: make remote serve WebSocket-only and refuse older clients with CLIENT_OUTDATED

This commit is contained in:
imSp4rky
2026-12-05 09:47:22 -07:00
parent 641623590d
commit 00ad15527c
62 changed files with 657 additions and 2098 deletions
@@ -567,7 +567,7 @@ async def test_session_delete_returns_nested_cache_keys(tmp_path, monkeypatch) -
session = session_entry(service_tag="TESTSVC", cache_tag=cache_tag, client_auth=True)
async def fake_validated(session_id, request):
async def fake_validated(session_id, request, needs_channel):
return session
monkeypatch.setattr(handlers, "get_validated_session", fake_validated)
@@ -657,6 +657,7 @@ def test_write_client_cache_refuses_a_bad_map_before_it_writes_a_file(tmp_path,
def test_a_session_create_that_fails_after_the_cache_write_leaves_no_cache_dir(tmp_path, monkeypatch, stop_at) -> None:
import asyncio
import logging
import uuid
from types import SimpleNamespace
from unshackle.core.api import handlers
@@ -692,7 +693,7 @@ def test_a_session_create_that_fails_after_the_cache_write_leaves_no_cache_dir(t
store = RefusingStore()
monkeypatch.setattr("unshackle.core.api.session_store.get_session_store", lambda: store)
data = {"service": "TESTSVC", "title_id": "t", "cache": {"token": blob('"t"')}}
data = {"service": "TESTSVC", "title_id": "t", "session_id": str(uuid.uuid4()), "cache": {"token": blob('"t"')}}
response = asyncio.run(handlers.session_create_handler(data))
assert response.status == 422
assert written == ["token.json"]