Repository navigation
fix: follow-ups from the review of #187-#193 - #194
Merged
Merged
Conversation
- /mcp chunked bodies: the raw body is bounded too (the decoded 1 MB plus 64 KB of framing; endless trailer lines or long chunk extensions got 413 instead of growing for a minute), read in 64 KB pieces (about 16 decoding passes for 1 MB instead of 256), and a broken chunk gets 400 instead of a closed connection - /mcp answers: 1xx, 204 and 304 are never sent chunked (they have no body, RFC 9112 6.3) - MjpegStream errors are in the page's language (the stream ran outside the request's language scope) - the scoped-task foreground check matches `Route` like the other dispatch sites - a page's native video connection that closes while it waits for the next media stream (an unlock holds the device for seconds) no longer opens the stream again for nobody - the viewer lets its port go before stopping the agents - media.rs's comment and the changelog no longer say unwatched frames aren't assembled: they are depacketized and scanned, only not copied or queued - CONTRIBUTING's per-package fmt list includes ictl-ax, as CI does - the Unreleased changelog: PR numbers on every line, the iOS 17-18 disk image fix (#186), sections and wording per CONTRIBUTING Not changed: a TTL in front of the token file's stat (microseconds per request; a revoked token would keep working for the TTL). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
11 tasks done
Derrors
added a commit
that referenced
this pull request
Nov 25, 2026
…ay (#195) #194 raced the whole of reopen_feed against the page closing. Once it holds the device lock, reopen_feed opens the HID session (Tunnel::hid), which must not stop halfway: a media stream started and never stopped. Now only the wait (the pause, then the device lock) races the page; a page that goes away while an unlock holds the device still gets nothing opened for it, and once the lock is taken nothing is cancelled. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Follow-ups from a review of #187–#193:
/mcpchunked bodies. The decoded body was limited to 1 MB but the raw bytes weren't: endless short trailer lines, or long chunk extensions on tiny chunks, could grow the buffer for the whole 60 s body timeout. The raw body is now limited to 1 MB plus 64 KB of framing (413 past that). It is read in 64 KB pieces, so a 1 MB body takes about 16 decoding passes instead of 256. A broken chunk gets 400 instead of a closed connection./mcpanswers: 1xx, 204 and 304 are never sent chunked; they have no body (RFC 9112 6.3).MjpegStreamerrors follow the request's language (the stream ran outside the language scope, unlikeScreenStream).Routelike the other dispatch sites.media.rs's comment and the changelog said more than that.cargo fmtlist includesictl-ax, as CI does.Not changed: a TTL in front of the viewer's token-file
stat(microseconds per request; a revoked token would keep working for the TTL).Tests
1. Unit tests
cargo test --workspace --all-features --locked: 553 passed; clippy with-D warnings;cargo fmt --checkfor all 11 packages;node --test tests/viewer/*.test.mjs: 36 passed;tests/check_regression_cases.py: 0 missingmcp_over_http_takes_a_chunked_body, a broken chunk gets 400 and endless trailer lines get 413 (through the real request path); instreams_are_chunked, 202 without a length is chunked and 204/304 aren't2. Real-device regression
tests/device/run.py: 2 rounds, 32 calls, 0 failedtests/device/scenarios.py --lock tools typing batch lock: 37/373. Regression cases
scenarios.pyas above/mcp), feat(release): prebuilt binaries for Intel Macs #182 (native video across HID closes) and release: 0.2.14 #183 (MJPEG through the daemon)4. Real-device proof of the fix or feature
/video?src=deviceconnections, one closed after 8 s, then lock and an action that unlocks first (10.2 s). The open one never ended, got about a frame a second while locked, none during the unlock, then resumed from a keyframe; the closed one ended normally. The exact moment item 5 is about (a page closing while its connection waits for the reopened stream) couldn't be timed by hand and rests on reviewmjpeg_streamfor another device than the controlled one, sent straight to the daemon:The controlled device changedwithlang: en,正在控制的设备变了withlang: zhChecklist
🤖 Generated with Claude Code