Repository navigation
Tell the user when the helper is older than the extension - #11
Merged
Merged
Conversation
Nothing checked a change before it was merged: vet, the Go tests and the rest ran when someone remembered to. A workflow now runs them on every pull request and on main. The helper job runs on macOS, the only system the helper ships for (it builds for Linux as well, not for Windows): go vet, the tests under the race detector, staticcheck and govulncheck. Both linters are clean today, so both block. The extension job syntax-checks every script, parses the manifest and runs the new test. The workflow may read the repository and nothing else, and a newer push cancels the run it supersedes. The parsers that read bytes chosen by someone else get native fuzz targets: the HLS rewriter and the playlist scan (any web server; the DASH rewriter's target comes with its rewrite in the relay security change), the mDNS parser, the Cast frame reader, its message decoder and the check of the auth reply (any machine on the LAN), and the native-messaging reader (the browser). Each asserts only that the parser returns, without panicking, and keeps to the limits it documents. Their seeds run with go test; 20 s of fuzzing each found nothing. The native-messaging target holds every handler slot while it runs, so a well-formed request is answered BUSY and never acted on: a fuzzer must not be able to start a real scan or cast. sw.js gets its first test. node:test runs it in a vm context with a stub chrome object, plays the helper and checks what the popup is told: media reports are dated, the duration is carried forward (and 0 is a value, not a gap), a disconnect clears it, a final IDLE ends the cast, and senders other than our own pages get no answer. No dependencies, so there is still no package.json. .gitignore now covers host/host, the binary a bare `go build` leaves behind. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The extension and the helper are installed separately: one is reloaded in Chrome, the other comes from install.sh. When the extension starts to rely on something a helper built before does not do, the result was an odd failure somewhere later. The helper now answers a hello request with its protocol version. The service worker asks on every new connection to the helper and compares with what it needs. A helper from before the question existed answers "unknown request type", which counts as version 0. No answer at all (a timeout, a port that died) is a different problem and is left to the error handling that already exists. When the helper is behind, the popup says: "The helper is older than this extension. Run install.sh again to update it." Both sides start at version 1, so nothing is reported today. The number goes up with the first change that needs it. The service worker test looked for the cast request at posted[0]; the hello is sent first now, so it finds the cast by its type. Co-Authored-By: Claude Fable 5.1 <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
The extension and the helper are installed separately (reload in Chrome;
install.sh). When the extension relies on something an older helper does not do, the result was an odd failure somewhere later.hellowith{ proto: protoVersion }(host/host.go).NEED_PROTO. A helper from before the question existed answers "unknown request type": that counts as 0. No answer at all (timeout, dead port) is a different problem and is left to the existing error handling.{ type: 'helper', outdated: true }the status line says "The helper is older than this extension. Run install.sh again to update it."Both sides start at version 1, so nothing is reported today. The number goes up with the first change that needs it. #8 (
warm) and #10 (tracks) do not need a bump: an older helper fails those quietly (no pre-connect; no track list, so no pickers).Stacked on #9
This branch sits on top of
chore/ci, because it changes that pull request's service worker test: the test looked for the cast request atposted[0], and thehellois sent first now, so it finds the cast by type. Merge #9 first; until then this diff also shows #9's commit.Testing
go vet,go test -race(hellochecked inTestNativeFraming)node --test: 7 pass. New case: a current helper is not reported; "unknown request type" andproto: 0are🤖 Generated with Claude Code