Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent e5c99a5eee
commit 6ee6502010
2050 changed files with 538359 additions and 57745 deletions
@@ -0,0 +1,23 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def test_missing_stream_checks_are_coalesced_and_negatively_cached():
source = (ROOT / "static/js/sessions.js").read_text(encoding="utf-8")
assert "const _serverStreamChecksInFlight = new Set();" in source
assert "const _serverStreamAbsentUntil = new Map();" in source
assert "_serverStreamChecksInFlight.has(sessionId)" in source
assert "res.status === 404" in source
assert "Date.now() + SERVER_STREAM_ABSENT_TTL_MS" in source
assert "_serverStreamChecksInFlight.delete(sessionId);" in source
def test_starting_a_stream_invalidates_the_negative_cache():
source = (ROOT / "static/js/sessions.js").read_text(encoding="utf-8")
start = source.index("export function markStreaming(sessionId)")
body = source[start : start + 300]
assert "_serverStreamAbsentUntil.delete(sessionId);" in body