test(unraid): complete contract coverage and retain WS samples

This commit is contained in:
Codex
2026-08-15 10:35:09 -07:00
parent d308dbcb76
commit 5e408e9c24
5 changed files with 45 additions and 6 deletions
@@ -1,6 +1,7 @@
from __future__ import annotations
import asyncio
import hmac
import math
import queue
import threading
@@ -10,6 +11,10 @@ from typing import Any
import numpy as np
def valid_bearer(header: str | None, token: str) -> bool:
return bool(header and header.startswith("Bearer ") and hmac.compare_digest(header[7:], token))
def finite01(value: float) -> float:
value = float(value)
return min(1.0, max(0.0, value)) if math.isfinite(value) else 0.0
@@ -88,4 +93,3 @@ class Frame:
pixels: np.ndarray
received_ns: int
decode_ms: float