Repository navigation
worker: proto, serve and the js/wasm Web Worker - #1
Merged
Merged
Conversation
proto: the request/response protocol (standard library only), the clamp of a request's limits (a request can only lower them), a bounded request decoder. serve: Server.Handle with go-avkit's container reader and H.264 decoder (poster, probe), the box and element pre-scan, the two-file cache, each held file re-checked against every request's limits. cmd/avkit-worker: the Web Worker main. The wire format is that of go-slides' current client (the limits' field names are those of its video.Limits). Refs go-avkit/avkit#89 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t/http 1.27.4) Refs go-avkit/avkit#89 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…dary; fuzz all nine limits The pre-scan counted elements, not the frames a laced SimpleBlock/Block holds, which the reader unlaces up front (7 bytes, 256 frames; go-avkit/avkit#120): refuse above MaxTrackSamples per track and twice that in total (video.limit). Handle and the wasm answer recover a panic into video.syntax; the JS message types are checked. The decode-limit refusal text no longer names MaxSamples for the other limits. FuzzHandle covers every limit; README Security section. Refs go-avkit/avkit#89 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…r the cap Refs go-avkit/avkit#89 Co-Authored-By: Claude Sonnet 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.
Refs go-avkit/avkit#89
First content of the repository.
mainholds only the LICENSE and README thatghnewcreated through GitHub; this pull request adds everything else.What
proto: the video worker protocol (standard library only, nosyscall/js),Clamp, a boundedDecodeRequest.serve:Server.Handle(poster, probe) over go-avkit's container reader and go-avkit/decode; box/element pre-scan; the last 2 files held by key.cmd/avkit-worker: the js/wasm Web Worker main.Moved from the
video-workerbranch of go-slides/go-slides.github.io (playground/videoproto,videoproto/serve,cmd/playground-video), read-only. The clientvideoproto/remotestays in go-slides. The wire format is unchanged: the limits' field names are those of go-slides'video.Limits, so its switch is a dependency change.Differences from the source
protohas its ownLimits, codes andError;servecarries the pre-scan and the poster conversion that lived in go-slides'videoandvideo/avkit.Clampandservenow have tests: a request only lowers limits (table over the 9 fields at MaxInt, 2^40, 0, -1; 0 and negative mean "use the default"), a fuzz property field by field, a refusal test per code, bomb tests asserting a refusal and a small allocation.video.syntax; a request header is bounded and a refused header is answered with its id.video.unavailableis never produced by aServer; it is the client's code for an unreachable worker.Size
Go 1.27.4,
-trimpath -ldflags="-s -w": 12,881,038 bytes raw, 3,297,044 gzip -9.Not done here
Listing in the docs site and the org landing is a separate pull request.
🤖 Generated with Claude Code