Repository navigation
feat(BROWSER-01): add compiled worker host and browser example - #33
Merged
Merged
Conversation
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.
Compile client entrypoints through an explicit JavaScript.browser namespace and run their computation in a module worker. The main-thread adapter owns named text controls, click subscriptions and native GET text Fetch through the versioned host protocol, with source errors, deadlines, bounded messages/output, callback ownership, cancellation and stop/restart. Artifacts record the full local host/worker/helper closure and hashes.
A runnable text_metrics example uses the approved shared source corpus and serves as static files. It runs our emitted JavaScript without a Python interpreter or server execution of client logic. PWA assembly/offline reload remains WEB-03; new-source parsing remains the separate independent interpreter milestone. The manifest identity must come from verified assembly; echoing it during initialization does not authenticate assets.
Validation: all 76 compiler/compatibility tests passed; focused browser bridge/protocol tests passed after final validation changes. Real Chrome 152 checks CPython/client metrics parity, computation offline after loading, Fetch status/credentials/grants/CORS/redirect/size/timeout, pending-Fetch cancellation, missing capabilities, source locations, forty callback allocation/release cycles, repeated restart, busy-worker termination and the runnable example under a URL subdirectory. Built wheel/source artifacts contain the local browser assets; the pinned Playwright group is test-only and existing runtime dependency versions are retained.
Closes #24.