From 90f5ab146c5123cc9356ab9a132661d93f67cd0f Mon Sep 17 00:00:00 2001 From: Adrian Hilber Date: Thu, 5 Nov 2026 03:09:45 +0100 Subject: [PATCH 1/5] 1.3.4: interaction preview sends every new picture, stuck closes logged and counted The WebSocket preview waited 20 ms for a new preview and otherwise resent the previous JPEG (about 2 new pictures a second on a busy page). It now waits like preview.jpg (up to 100 ms) and never sends a session the same picture twice. Stuck closes log websocket_stuck_close and count websocket_stuck_closes_total{reason}. WebSockets keep at most 64 KiB unsent (TCP_NOTSENT_LOWAT). Release 1.3.4: version, image tags, CHANGELOG. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017ybuzgBaGxuB5UiaE8dRa4 --- .github/workflows/container-codecs.yaml | 2 +- CHANGELOG.md | 12 ++++++++- CMakeLists.txt | 2 +- SPEC.md | 5 ++-- deploy/mxl-browser-source-gpu.yaml | 2 +- deploy/mxl-browser-source.yaml | 2 +- docker/docker-compose.demo.yaml | 2 +- docker/docker-compose.host.yaml | 2 +- docs/api.md | 2 +- src/app/api.cpp | 1 + src/app/application.cpp | 13 ++++++++-- src/ops/counters.cpp | 1 + src/ops/httpserver.cpp | 25 ++++++++++++++---- src/ops/httpserver.hpp | 11 ++++++-- tests/integration/interact_test.py | 34 ++++++++++++++++++++++--- tests/integration/metrics_test.py | 1 + tests/unit/test_counters.cpp | 2 +- tests/unit/test_httpserver.cpp | 15 +++++++++++ 18 files changed, 111 insertions(+), 23 deletions(-) diff --git a/.github/workflows/container-codecs.yaml b/.github/workflows/container-codecs.yaml index 00763c3..04c65b8 100644 --- a/.github/workflows/container-codecs.yaml +++ b/.github/workflows/container-codecs.yaml @@ -1,7 +1,7 @@ name: Container (H.264/H.265) # The image variant with a CEF build that plays H.264 and H.265 (docs/proprietary-codecs.md). -# A tag codecs- (for example codecs-1.3.3) builds that commit and pushes +# A tag codecs- (for example codecs-1.3.4) builds that commit and pushes # -codecs. Normal releases (v*.*.*) are not touched. on: push: diff --git a/CHANGELOG.md b/CHANGELOG.md index 82435af..1ef7832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Changelog -## Image variant 1.3.3-codecs +## 1.3.4 (2026-11-05) + +- **Interaction preview shows every new picture** (SPEC §7.3). The WebSocket preview waited only 20 ms for a new preview and otherwise sent the previous JPEG again: on a busy page (YouTube on test-all-gfx) about 2 of 9 frames per second were new, so the preview stood still for seconds. It now waits for the preview like `preview.jpg` (up to 100 ms), and a session never gets the same picture twice. + - Tests: `tests/integration/interact_test.py` (a moving page: no frame repeats the previous picture). +- **Stuck closes are logged and counted** (SPEC §7.3, §12). A WebSocket closed because its client did not read (which ends interaction control) logs `websocket_stuck_close` with the client and reason and counts `websocket_stuck_closes_total{reason}` (`outbox_size`, `outbox_age`, `preview_not_taken`; at 0 from the start). + - Tests: `tests/unit/test_httpserver.cpp` (each reason reported once), `tests/unit/test_counters.cpp`, `tests/integration/metrics_test.py`, `interact_test.py`. +- **Previews do not pile up in the kernel** (SPEC §7.3). WebSockets keep at most 64 KiB unsent (`TCP_NOTSENT_LOWAT`); on a slow path the server drops previews early instead of holding seconds of them in the send buffer, so the preview latency no longer grows and shrinks. + +## Image variant 1.3.3.2-codecs (2026-11-05) + +First image with H.264/H.265, built from 1.3.3; from 1.3.4 on every release also has `-codecs`. - **H.264 and H.265 (proprietary codecs).** A second image, `-codecs`, uses a CEF build of the same version with H.264 (`