feat(browser): provide packaged engine startup defaults - #432
Conversation
Dedicated Astra medium review — SDK #428FAIL at Findings
Independently passing evidence
Code inspection confirms independent injected function/URL selection, raw document treatment, retained source refusal/context retry/quantum ordering, suspension before default host construction, and host-before-context idempotent close including dispose rejection. The approved esbuild development-only bundling change keeps the public Worker import-complete without changing generated artifacts. No Rust rebuild, artifact repin, browser matrix, or product/spec changes were made during this review. The successful packed path is real evidence; it does not waive the two failed frozen requirements. A bounded revision to typed scratch failure transport and the existing focused resource fixture is required before PASS. This verdict makes no npm publication or downstream adapter/app integration claim. |
Dedicated Astra medium review — SDK #428 attempt 2: PASSReviewed clean pushed Both reported blockers are corrected. No release-blocking defect found in this bounded revision. Typed refusal preservationThe actual Worker entry now identifies supported engine/usage failures explicitly. Engine replies carry phase, code, numeric result and diagnostics; the client reconstructs the actual SDK error class and restores the existing message without parsing or formatting it twice. Usage replies reconstruct I independently reran the previous real-Wasm reproduction with the approved module and document The committed focused regression executes the actual Resource discriminatorThe new compact fixture tracks live timers and AbortSignal subscriptions, retains the actual removed Worker/abort/timer callbacks, and invokes them after success, abort and error settlement. It asserts zero surviving timers/listeners, one request, one observed settlement and one termination. Historical ready/result/error/messageerror callbacks are now actually invoked; they are not emitted through empty active listener sets. I compared the isolated timer mutant at Independent gates
The prior accepted default-host/context/override scope was not broadened or reimplemented. This PASS qualifies the final package-owned SDK boot slice; root still owns the upstream issue-state synchronization and downstream adapter/app integration. It does not claim npm publication or a broader browser/device matrix. |
Browser consumers can call createEngine({ document }) using the SDK’s packaged scratch Worker, host and AudioContext defaults. Existing factory and URL overrides remain supported, and injected contexts retain their actual TypeScript capabilities. Scratch jobs terminate on completion or failure; running native contexts suspend before host startup.
The scratch Worker ships as a standalone browser module. Strict packed DOM consumers, focused lifecycle tests, headless tests and real packed Vite/Chromium startup pass for default and forwarding Worker factories. The six generated engine artifacts and PCM feed bytes are unchanged. Dedicated Astra medium review PASS after the typed-refusal correction; issue #428 is closed.
Stacked on #398. Adapter consumption is tracked separately in engine-web-adapter#24; app integration uses exact reviewed vendored archives. No npm publication is claimed.
Related: #428.