fix: host-abort gates — Dropdown/Tabs rove on arch(wasm32), BrowserNavigator fails loud at construction#259
Merged
Merged
Conversation
…vigator fails loud at construction
canImport(JavaScriptKit) is true on host, and JavaScriptKit's host stub
aborts with no message on the first JSObject.global access. Three
consequences fixed:
- Dropdown/Tabs keyboard-rove blocks claimed '(a no-op on host)' but
compiled their JS crossing into host builds — any host keydown test
died in a messageless SIGABRT. The crossing is now arch(wasm32)-keyed;
the pure roving decision and Tabs' selection move stay host-side, now
covered by a live harness suite (previously impossible to write).
- BrowserNavigator's accessor fatalErrors ('host tests must inject a
Navigator') could never print on host — the abort fired first. The
named failure now happens at construction, where it still reaches the
terminal.
- TaskDiffTests held _swiflowDiagnosticOverride across an await,
racing the LIFO restore against parallel suites (the lock guarding
this is target-local to SwiflowQueryTests). The diagnostic fires
synchronously, so the restore moves before the await.
Whole-package swift test: 1906 green. SwiflowUIDemo + MiniRouter wasm
builds verified locally.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📦 Bundle size
✅ Within budget (≤5% growth allowed). Baseline: Swift 6.3, WASM SDK 6.3-RELEASE, measured 2026-06-18. |
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.
Audit backlog B5 + B6 (Part-3/Part-6 Mediums).
Ground truth:
canImport(JavaScriptKit)is true on host, and JavaScriptKit's host stub is a bareabort()— the firstJSObject.globalaccess dies with no message.arch(wasm32)-keyed; the pure decision + Tabs' selection move stay host-side. NewTabsRovingTestsdrives the full keydown path in the harness (ArrowRight/Left wrap, Home/End, non-roving keys) — a suite that could not exist before the gate.fatalErrors promise "host tests must inject a Navigator" but can never print on host (the abort fires inside the swjs stub first). The named failure moves toinitunder#if !arch(wasm32), so constructingRouterRootvia its public inits on host now says why it died._swiflowDiagnosticOverrideacrossawait drain()with no cross-target lock — restore moved before the await (the diagnostic fires synchronously), closing the parallel-suite LIFO-restore race.Whole-package
swift test: 1906 tests, 353 suites, green. SwiflowUIDemo + MiniRouter wasm builds pass locally (CI skips examples).🤖 Generated with Claude Code