Preserve preview harness, editor, email and task improvements

Snapshot current maintainer-preview application changes and regression fixtures for integration into lab. Excludes local runtime data, evaluation outputs and source backups. Focused Python regression selection: 140 passed; full suite not certified.
This commit is contained in:
pewdiepie-archdaemon
2026-10-01 01:34:26 +00:00
parent 86f376ac3a
commit 2e8413a54a
170 changed files with 11010 additions and 1094 deletions
+18
View File
@@ -1912,6 +1912,24 @@ def test_background_refresh_deduplicates_same_base_url(monkeypatch):
assert json.loads(ep2.cached_models) == ["live-model"]
def test_picker_refresh_waits_for_discovered_models(monkeypatch):
ep = _route_ep("local", "http://127.0.0.1:8000/v1", endpoint_kind="local")
db = _RouteDb([ep])
router = model_routes.setup_model_routes(model_discovery=None)
monkeypatch.setattr(model_routes, "ModelEndpoint", _RouteModelEndpoint)
monkeypatch.setattr(model_routes, "SessionLocal", lambda: db)
monkeypatch.setattr(model_routes, "_auth_disabled", lambda: True)
monkeypatch.setattr(model_routes, "build_chat_url", lambda base: f"{base}/chat/completions")
monkeypatch.setattr(model_routes, "_probe_endpoint", lambda *a, **k: ["new-model"])
result = _route_endpoint(router, "/api/models")(
_route_request(), refresh=True, wait_refresh=True
)
assert result["items"][0]["models"] == ["new-model"]
def test_background_refresh_failure_keeps_existing_cached_models(monkeypatch):
ep = _route_ep(
"local",