Served with isolation headers; start-screen capability notices; tests on the real GPU (t88 phase 1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 19:11:42 -04:00
co-authored by Claude Opus 5.5
parent 9781aa3ee1
commit b2c9ad9533
22 changed files with 376 additions and 91 deletions
+5 -4
View File
@@ -1,5 +1,6 @@
"""Serve dist/ with isolation headers; isolated_server() owns a free-port background server."""
from contextlib import contextmanager
from functools import partial
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from threading import Thread
@@ -8,8 +9,8 @@ DIST = Path(__file__).resolve().parent.parent / 'dist'
class Handler(SimpleHTTPRequestHandler):
def __init__(self, *args, **kwargs):
super().__init__(*args, directory=str(DIST), **kwargs)
def __init__(self, *args, directory=DIST, **kwargs):
super().__init__(*args, directory=str(directory), **kwargs)
def end_headers(self):
self.send_header('Cache-Control', 'no-store')
@@ -22,8 +23,8 @@ class Handler(SimpleHTTPRequestHandler):
@contextmanager
def isolated_server():
with ThreadingHTTPServer(('127.0.0.1', 0), Handler) as server:
def isolated_server(directory=DIST):
with ThreadingHTTPServer(('127.0.0.1', 0), partial(Handler, directory=directory)) as server:
thread = Thread(target=server.serve_forever, daemon=True)
thread.start()
try: