Repository navigation
Conversation
Preserve the opt-in investigation for #536 before reviewing the shared refactor and expanding worker/browser coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add an application-owned worker example, Chromium/Firefox/WebKit coverage, explicit cancellation and cleanup checks, and broader performance and process-memory measurements for #536. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain the opt-in live-test work while keeping this browser prototype isolated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the 424 passing ordinary tests, disabled live suite, and both browser memory ceilings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Eliminate the closed-validator compiled-module retaining path. Add independent stability and Unicode regressions, confirm the Unicode failure on pristine main, and document the verified retail Firefox dedicated-worker comparison. Keep the two upstream conformance failures explicit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep hosting application-owned. Verify CSP, compressed immutable artifacts, encoding negotiation, conditional requests, and worker loading errors across the browser matrix. Preserve the separate Unicode conformance gates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge approved main through #545 and share scoped compiler-rendered enum queries across native and WASM adapters. Preserve the original schema, error precedence, and schema-first/legacy message behavior. Keep independent Unicode assertions unchanged and expand the browser corpus to 88 outcomes. Verified build-all and 492 ordinary tests, plus all 36 experimental/browser checks with zero failures and skips. The pinned experimental compiler and WASM artifact are unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tokenize coding and quality fields before simple bounded syntax checks. Preserve negotiation behavior and cover large whitespace, malformed qualities, and extra parameters. All seven HTTP and hosted-browser checks pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Summary
Draft investigation for #536, under #534. This is an opt-in prototype for design review, not a supported browser release or a request to merge an experimental compiler into main.
7.1.0-dev.20261030.1; verify version, length, and SHA-256 before compiling. Make loading, cancellation, errors, independent validator ownership, and disposal explicit.The branch now integrates main through #545, including the approved 0.3 behavior from #540. Compiler-rendered enum literal queries are shared across separately typed native/WASM adapters. Tests preserve lexical scope, member-only namespace filtering, collisions, original-schema restoration, diagnostic precedence, and native CJS/ESM compatibility.
Verification
Windows, Node.js 24.22.1, after integrating approved main at f0e71c0:
typescript:npm run build-allandnpm testwithTYPECHAT_LIVE_TESTS=0-- 492 ordinary tests passed; the live API suite remained disabled.TYPECHAT_STABILITY_BROWSERS=1: 36 passed, 0 failed, 0 skipped. The two formerly failing Unicode assertions are unchanged and now pass in both backends. The expanded 88-outcome corpus covers independent Unicode semantics, scoped/merged/member enums, default schema-first and explicit legacy prompts, history roles, and repair behavior; same-version native/WASM diagnostics also match.git diff --checkpassed.All model responses were synthetic. No live model calls or credentials were used. Tests manage and close their own browsers, workers, and loopback servers.
Browser hosting follow-up
Follow-up validation addressed the CodeQL header-parser finding with tokenization and bounded syntax checks. Large/malformed header regressions were added, and all seven HTTP/hosted-browser checks passed after the change.
The application-owned example now uses a shared, tested static handler; no hosting API was added to the TypeChat core and nothing was deployed externally.
HTML/UI scripts/styles are external and no-store. Strict CSP permits same-origin resources and
wasm-unsafe-eval, not general JavaScript eval or inline scripts/styles. Both the document and worker receive the policy. Real-page eval blocking and explicit failure without WASM permission pass in all three engines.The compiler asset URL includes its exact version and SHA-256. Startup verifies the bytes before serving it with immutable caching, gzip/identity negotiation, representation-specific ETags,
Vary: Accept-Encoding, and correct HEAD/304/error handling.Four protocol tests verify actual bytes, MIME types, cache headers, compression, conditional responses, and encoding/method errors. Existing browser and recovery fixtures use the same hosting handler.
Automated two-job checks observed a warm cache hit in Firefox; Chromium and WebKit fetched again. Every network artifact response was gzip (13,359,431 bytes). Cache headers make reuse possible but do not guarantee storage, prevent eviction, or avoid initialization in a new worker.
Hosting remains application-owned and separate from core validation. The later #545 integration clears the Unicode gates without suppressing them; normal manifests match main and the pinned experimental compiler/artifact versions remain unchanged.
Resolved Unicode blocker and follow-up findings
20260516144017differs from Playwright's20260611193205. This does not certify WAN/mobile performance, retail memory costs, or a full retail-browser matrix.Ordinary repository CI does not run this separately installed experimental suite, so it was run explicitly with all browser recovery checks enabled: zero failures or skips. That clears the recorded Unicode gates, not the need for an upstream-support/maintenance decision or production deployment assessment. This remains a draft investigation.
Important limits / not ready for main
typechat/tsentry point browser-compatible.The prototype README documents reproducible commands, measured results, provisional budgets, lifecycle trade-offs, upgrade/rollback, and outstanding merge gates:
Browser prototype README.
Keep #534 and #536 open. Any supported mainline integration still needs explicit upstream-stability/maintenance, API, performance, and compatibility decisions.