Repository navigation
fix(javascript): support explicit browser host grants - #132
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.
HowlBoard could pass its backend tests while its browser never sent an API request: generated fetch grants read Node process.env, and bootstrap error handling called process.exit in browsers. The JavaScript helper now supports an explicit host browser grant while keeping the Node environment authoritative. Missing, invalid, empty, and unrelated grants still deny before fetch; browser bootstrap preserves the original error.
Verification: five browser-context cases failed before repair. The JavaScript suite passes, including real Node precedence and original-error identity regressions; full go test ./..., go vet ./..., go build ./..., formatting, SEO, and the eight benchmark harness tests pass. Claude independently reviewed security/correctness and returned CLEAN; its suggested Node precedence/error identity coverage and documentation clarifications were added. Actual HowlBoard browser tests pass at desktop 1280px and mobile 390px with the paired consumer changes. No VM, interpreter, filesystem, or process policy was weakened.
Test impact: retain existing Node fetch/host-capability coverage; add generated-code browser denial and allowed-request contracts plus Node authority and error identity invariants. Browser grants are live page configuration, not an OS sandbox or deployment authority.