Repository navigation
Add capability-gated JS-backed staging on Web - #2165
Merged
Merged
Conversation
This was referenced Nov 22, 2026
Contributor
|
Chat app preview removed for |
13 tasks done
leehack
added a commit
that referenced
this pull request
Nov 22, 2026
## Summary - Prepare core and all three Apple runtime companions at `0.20.6` for #2149. The release includes capability-gated JS-backed staging for Web GGUF models and projectors with bridge `v0.1.92` (#2165). - Refresh current installation snippets and regenerate the chat app, validation harness, and observability locks. The Apple companions retain their published core floors and SwiftPM runtime pins. ## Changelog N/A: Prepares release metadata and generates 0.20.6 notes from merged changes. ## Production-readiness scope - **User-facing scope** — Release notes and install guidance for the core and the llama.cpp, LiteRT-LM, and Stable Diffusion Apple companions. - **Supported platforms/paths** — Core pub archive, Flutter Apple SwiftPM packages, and the docs site. The landed Web change and its runtime evidence are in #2165. - **Unsupported or intentionally unavailable paths** — N/A for release metadata. The Web staging option follows the capability checks documented in #2165. - **Out of scope / follow-ups** — #2090 and the Stable Diffusion `v0.4.0-1` pin are planned for 0.20.7. #2171 tracks the separate browser driver. #2136, #554, and #1702 remain open. The package owner verifies pub.dev automated-publishing settings before release approval. ## Completeness checklist - [x] Bumped the core and companion versions, recorded the release notes, refreshed install guidance, and regenerated the three consumer locks. - [x] Unsupported platform/option changes are N/A for this metadata diff. - [x] Kept the current install docs and changelogs aligned with the candidate. API and support-matrix edits are N/A for this diff. - [x] Verified the release receipt, companion compatibility, and rejection of a changed receipt digest. - [x] Validation coverage registry changes are N/A for this metadata diff. - [x] The diff and receipt contain no credentials or private artifact paths. - [x] The release follow-ups are linked above. ## PR type guidance - **Release prep** — Versions, changelogs, install docs, and generated locks. Feature, bugfix, and docs-only guidance is N/A. ## Test Plan - [x] Clean `dart run tool/prepare_workspace.dart`, repository format, `dart analyze`, and platform boundaries with Flutter 3.47.1. - [x] Root VM and Chrome suites excluding local-only, tooling suite, and validation coverage inventory. All passed. - [x] Both version verifier modes, the release candidate rehearsal, live bridge and native digests, six Apple SwiftPM digests, companion registry preflight, and three staged companion dry-runs. - [x] Core archive consumer, docs build and website tests, chat app VM and targeted Chrome, basic and server examples, and observability. - [x] Studio core and UI formatting, analysis, VM and targeted Chrome with Flutter 3.50.0, plus the Studio Android acceptance tooling tests. - [x] `coverage-lib` is N/A because the diff changes no library behavior. ## Matrix Evidence | Matrix row | Scope covered | Platform / model / backend | Result | Evidence / notes | | --- | --- | --- | --- | --- | | `static-format-analyze` | Workspace preparation, format, analysis, platform boundaries | macOS arm64 / Flutter 3.47.1 | PASS | 1,924 files formatted with zero changes. Clean analysis and platform boundaries. | | `root-vm` | VM suite excluding local-only | macOS arm64 / Dart | PASS | 15,659 passed and 135 skipped in an isolated system temp. | | `root-chrome` | Chrome suite excluding local-only | macOS / Chrome | PASS | 5,227 passed and one skipped. | | Release tooling | Tooling suite and coverage inventory | macOS / Dart VM | PASS | 2,370 tooling tests passed and 11 skipped. All 15 inventory tests and 37 targeted companion pin tests passed. The publisher rehearsal rejected a corrupted receipt digest. | | `docs-site` | Site build, links, analyzes and tests | macOS / Jaspr | PASS | 4,592 pages, 64 sitemap entries, no broken internal links, and 31 website tests. | | `release-doc-version-consistency` | Core and companion versions and compatibility | macOS / Dart | PASS | Default and strict modes passed with no pending companion bumps. | | `webgpu-bridge-tag-consistency` | Bridge pins, live manifest and release provenance | WebGPU `v0.1.92` | PASS | All 14 pin references agree. | | `native-release-digests` | Runtime archive digests | llama.cpp `v1.0.0-4`, LiteRT-LM `v0.19.1-7`, Stable Diffusion `v0.4.0` | PASS | 12 llama.cpp, eight LiteRT-LM, and 12 Stable Diffusion bundle digests match. | | `release-companion-pub-gate` | Package registry, SwiftPM, and staged publication dry-runs | pub.dev / Apple SwiftPM | PASS | Preflight and all three staged dry-runs passed. Six SwiftPM digests match. All four 0.20.6 version endpoints returned HTTP 404. | | `release-representative-smokes` | Core archive and consumer resolution | macOS / Dart | PASS | 2,037 selected files. The fresh consumer and packaged basic example resolved and analyzed. | | `examples-tests` | Chat app, basic, server, observability | macOS / Dart and Flutter | PASS | Chat app 698 VM and 141 Chrome, basic 51, server 54, observability seven. | | Studio packages | Package-local format, analysis, VM and targeted Chrome | macOS / Flutter 3.50.0 | PASS | Core 314 VM and 18 Chrome. UI 206 VM and nine Chrome. Four Android acceptance tooling tests passed. | | `android-release-device-pool` | Old and modern arm64 devices | Android | N/A for prep | No Android runtime, CPU profile, or native pin changes since 0.20.5. | | `coverage-lib` | Line coverage | — | N/A | No library behavior changes in the prep diff. | | `genkit-release` | Independently versioned adapter | — | N/A | Genkit is outside this release. | | `high-risk-exact-head-independent-qa` | Independent blocking review | `39e4d68a` against `main` `99cb4291` | PASS | Fresh-session `auditor-deep` ACCEPT. Versions, floors, pins, both changelogs and size limits checked. The squash rehearsal and the publication trace (core, then llama.cpp, LiteRT-LM, Stable Diffusion) passed. 4 of 5 verifier mutations were rejected. The surviving one is an existing P3 limitation, offset by the source-PR comparison. Readiness exits 2 locally | ## Review Notes - Independent review ACCEPT at the exact head. - Head `39e4d68a24690754828222f90e345fd03a33158f`. The labeled [Verify release prep run](https://github.com/leehack/llamadart/actions/runs/45080590366/job/137389057874) passed. The final description update triggers another verification at the same head and base. ## High-risk regression review - **Classification** — High-risk / `artifactConsumer`. - **Implementation task** — #2149, llamadart 0.20.6 release preparation. - **Independent blocking QA task** — fresh-session `auditor-deep`, ACCEPT. - **Exact head / current base** — `39e4d68a24690754828222f90e345fd03a33158f` / `99cb4291da4eb304258083ed3fab3a1c61e93006`. - **Production-branch deletion, bypass, or miswire proof** — N/A for production code. The local publisher rehearsal accepted the candidate and rejected a deliberately changed release receipt digest. - **Affected-family real-model/artifact evidence** — The live default bridge, native archive and Apple SwiftPM identities match. See #2165 for Web runtime evidence. - **Explicit unavailable-family or other N/A evidence** — The prep diff changes versions, installation guidance, package resolution metadata, and release notes. The physical Safari/iOS and Montréal follow-ups remain in #2136 and #554. - **Known PR-caused P1 regressions** — 0. The independent audit agrees. - **Unresolved review threads** — 0 at creation. ## Collector ledger | Source | Disposition | Release note or reason | | --- | --- | --- | | #2165 | Included | Added capability-gated JS-backed Web model and projector staging with bridge v0.1.92. | | #2150 | N/A | Apple setup guide correction. | | #2151, #2157 | N/A | Maintainer release tooling and tests. | | #2152, #2158, #2159 | N/A | Private qualification and test harness changes. | | #2161, #2167, #2168, #2170 | N/A | Static deployment and CI maintenance. | One included PR, ten N/A, and zero unresolved inputs. The collector separately recognized the generated 0.20.5 docs cut. ## Release notes review - 99cb429 Combine the new staging option and its bridge capability requirement with the WebGPU v0.1.92 pin announcement. ## Release notes input Previous-tag: v0.20.5@ee0bfb72da29ad64c12e83683ff0d7590710956e Through: 99cb429 Input-SHA256: e4fac36cc031df0d8a382db47b2e0a3a6fcc6ca19bada0aea093201aba1c1247
4 tasks
leehack
added a commit
that referenced
this pull request
Nov 23, 2026
## Summary - Add the local Chromium driver, public Dart fixture, and scenario wiring for Web JS-backed GGUF and projector staging. - Replay sanitized Chromium receipts to check explicit wasm64 loads and reloads, unrelated capability refusals, non-`unsupported` refusal rejection, and model requests made during a refusal. - Address `audit-daa742` findings and merge `origin/main` (`85643f74f2b00a59ae70b479c9b4cbbd7f1ccc74`) into prior head `5692399853cce1cf780b84172ddcead161a48f5a` -> new head `970c016e9dfd120db52c9294ce95e0939f8a2437`, keeping only the 13 tooling, fixture, matrix, and coverage-registry files on top of `main`: - Removed the no-op `tool/testing/playwright_web_js_backed_model_staging.py` entry from `tagHistoryFiles` in `tool/testing/check_webgpu_bridge_tag.dart` (reverting `check_webgpu_bridge_tag.dart` to `origin/main`). - Added `test_refusal_requires_unsupported_field` in `test/unit/tooling/playwright_web_js_backed_model_staging_grader_test.dart` so all four refusal cases (`old-bridge-v0.1.86`, `old-worker`, `old-core`, `forced-fetch`) fail if the refusal reason only appears in `model_error` or `error` instead of `unsupported`. - Updated `doc/testing_matrix.md` under `## Web JS-backed model staging` to replace `"after adopting the matching v0.1.92+ assets"` with accurate wording stating that omitting `--dry-run` fetches the pinned bridge assets automatically. - Refs #2115. This draft is a maintainer-tooling follow-up outside the release scope of #2165. ## Changelog N/A: Maintainer test tooling only. ## Production-readiness scope - The local scenario exercises direct and worker routes, both Wasm widths, output and reload parity, staging defaults, and version-skew refusals. - The driver requires Playwright Chromium, checksum-verified bridge assets, and local model weights. Supported inputs and dry-run instructions are in the test matrix. - The library and bridge pin are in #2165 (now landed on `main`; current pinned bridge tag on `main` is `v0.1.93`). Web GGUF load cancellation is tracked in #2166. ## Completeness checklist - [x] Merged `origin/main` (`85643f74f2b00a59ae70b479c9b4cbbd7f1ccc74`) and applied the three `audit-daa742` fixes into new head `970c016e9dfd120db52c9294ce95e0939f8a2437`. - [x] Pinned refusal reason validation to the `unsupported` field (`test_refusal_requires_unsupported_field`) and killed the any-field refusal (`json.dumps(result)`) mutant. - [x] Replayed sanitized receipts offline across all tooling and markdown verification suites on `970c016e9dfd120db52c9294ce95e0939f8a2437`. ## PR type guidance - **Tooling** — Restores the local browser scenario and proves its grader rejects invalid results. N/A for public API and release validation. ## Test Plan Verified on new head `970c016e9dfd120db52c9294ce95e0939f8a2437` (macOS arm64, Flutter 3.47.1 / Dart 3.13.1, Python 3.15.2): - [x] `dart run tool/prepare_workspace.dart` (clean `git status`) - [x] `python3 tool/ci/check_format.py` (`Formatted 1949 files (0 changed)`) - [x] `dart analyze` (`No issues found!`) - [x] `dart run tool/testing/check_webgpu_bridge_tag.dart` (`16 live pins agree on v0.1.93`; `1 docs restate the release 454836373 provenance correctly`) - [x] `TMPDIR="$(mktemp -d)" dart test -p vm test/unit/tooling/playwright_web_js_backed_model_staging_test.dart test/unit/tooling/playwright_web_js_backed_model_staging_grader_test.dart test/unit/tooling/check_webgpu_bridge_tag_test.dart` (`+444: All tests passed!`) - [x] Mutation check (`json.dumps(result)` refusal-field mutant on `tool/testing/playwright_web_js_backed_model_staging.py`): killed by `test_refusal_requires_unsupported_field` in `playwright_web_js_backed_model_staging_grader_test.dart` (8 subtest failures across `old-bridge-v0.1.86`, `old-worker`, `old-core`, `forced-fetch` for `model_error` and `error`; restored driver passes) - [x] `TMPDIR="$(mktemp -d)" dart test -p vm test/unit/tooling/` (`+2680 ~11: All tests passed!`) - [x] `TMPDIR="$(mktemp -d)" xargs dart test -p vm -j 1 --exclude-tags local-only < tool/ci/markdown_test_suites.txt` (`+1650 ~3: All tests passed!`) - [x] `git diff --name-only --no-renames origin/main...HEAD | dart run tool/testing/classify_high_risk_changes.dart` (`Classification: high-risk`, `Surfaces: backendRuntime, regressionPolicy`) - [x] Prior-head checks and audits no longer count for `970c016e9dfd120db52c9294ce95e0939f8a2437`: earlier CI runs, the `audit-daa742` audit on `5692399853cce1cf780b84172ddcead161a48f5a`, prior-head Chromium browser runs from #2165, and prior-head checks from `5692399853cce1cf780b84172ddcead161a48f5a` do not carry over to `970c016e9dfd120db52c9294ce95e0939f8a2437`. ## Matrix Evidence | Matrix row | Scope covered | Platform / model / backend | Result | Evidence / notes | | --- | --- | --- | --- | --- | | `static-format-analyze` | Workspace prep, format, analyzer | macOS arm64, Flutter 3.47.1 | PASS | Verified on `970c016e9dfd120db52c9294ce95e0939f8a2437` (`prepare_workspace.dart`, `check_format.py`, `dart analyze`, `check_webgpu_bridge_tag.dart`). | | `root-vm` | Driver CLI and receipt grader, scenario wiring, tooling, markdown suites | macOS arm64, Flutter 3.47.1 | Targeted PASS | Driver/grader/tag (`+444`), `test/unit/tooling/` (`+2680 ~11`), and `markdown_test_suites.txt` (`+1650 ~3`) passed on `970c016e9dfd120db52c9294ce95e0939f8a2437`. | | `web-js-backed-model-staging` | Direct and worker staging, output parity, reload, and version skew | Chromium CPU | Prior-head evidence (stale) | Real Chromium cases and Qwen3-4B memory results from #2165 are prior-head evidence and no longer count for `970c016e9dfd120db52c9294ce95e0939f8a2437`. | | `coverage-lib` | Runtime coverage | N/A | N/A | This diff changes local validation tooling, fixtures, and matrix docs only (`lib/` unchanged vs `origin/main`). | ## Review Notes - Merged `origin/main` (`85643f74f2b00a59ae70b479c9b4cbbd7f1ccc74`) and resolved the three `audit-daa742` findings from prior head `5692399853cce1cf780b84172ddcead161a48f5a` -> new head `970c016e9dfd120db52c9294ce95e0939f8a2437` (pushed via `tool/git/safe_pr_head_update.dart`). - Earlier CI runs and the `audit-daa742` audit on `5692399853cce1cf780b84172ddcead161a48f5a` no longer count for `970c016e9dfd120db52c9294ce95e0939f8a2437`. - Fresh CI is green on `970c016e9dfd120db52c9294ce95e0939f8a2437`, and the independent delta re-audit `audit-0d4b20` found no P1, P2 or P3 (readiness exits 2). ## High-risk regression review - **Classification** — High risk (`backendRuntime`, `regressionPolicy`). - **Implementation task** — #2115 local Chromium driver and offline runtime-receipt coverage (updated with `origin/main` merge and `audit-daa742` fixes at `970c016e9dfd120db52c9294ce95e0939f8a2437`). - **Independent blocking QA task** — `audit-0d4b20` (`claude-opus-5-5-auditor-0d4b20`, `operator-owned`) at `970c016e9dfd120db52c9294ce95e0939f8a2437`: no P1, P2 or P3; the three `audit-daa742` findings are fixed. Evidence: `llamadart-evidence/pr-2171/audit-0d4b20/`. - **Exact head / current base** — `970c016e9dfd120db52c9294ce95e0939f8a2437` / `85643f74f2b00a59ae70b479c9b4cbbd7f1ccc74`. - **Production-branch deletion, bypass, or miswire proof** — On `970c016e9dfd120db52c9294ce95e0939f8a2437`, the any-field refusal (`json.dumps(result)`) mutant failed `test_refusal_requires_unsupported_field` in `playwright_web_js_backed_model_staging_grader_test.dart` across all 4 refusal cases × both `model_error`/`error` (8 subtest failures), and all driver/grader/tag (`+444`), `test/unit/tooling/` (`+2680 ~11`), and `markdown_test_suites.txt` (`+1650 ~3`) tests pass on the restored driver. - **Affected-family real-model/artifact evidence** — Prior-head Chromium results in #2165 (stale for `970c016e9dfd120db52c9294ce95e0939f8a2437`). - **Explicit unavailable-family or other N/A evidence** — Current-head validation ran offline driver/grader suites, bridge-tag checks, mutation verification, tooling tests, and markdown suites without live model downloads. Hardware WebGPU and real Safari were outside the prior browser evidence. - **Known PR-caused P1 regressions** — 0 (independent audit `audit-0d4b20` at `970c016e9dfd120db52c9294ce95e0939f8a2437`). - **Unresolved review threads** — 0.
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
Changelog
ModelParams.jsBackedModelStagingto control JS-backed Web GGUF and projector staging, with capability checks in the pinned v0.1.92 bridge.Production-readiness scope
jsBackedModelStagingtotrueto require JS-backed staging,falseto disable it, or omit it to keep the WebKit default where supported.LlamaUnsupportedException. Native llama.cpp and both LiteRT-LM platforms reject any explicit setting.mainwith v0.1.90 and on this branch with staging off and on, cancelling from the first partial-load progress callback aborts the first GET, then the retry ladder makes a second GET and succeeds on wasm64.Completeness checklist
PR type guidance
Test Plan
dart analyze, and platform boundaries on Flutter 3.47.1.test/unit/tooling/on the VM with isolated temporary storage. 2,370 passed and 10 skipped. The separately targeted validation coverage suite passed 15 tests.Matrix Evidence
static-format-analyzeroot-vmroot-chromecoverage-liblib/high-risk-exact-head-independent-qa14035b78againstb6cbf850(currentmain135a6cadadds only unrelated deploy files)auditor-deepACCEPT after the driver split. Library, tests, docs and pin tests were preserved byte for byte. 22 library mutations and 5 reversions caught, 390 Chrome and 519 VM tests passed, and all 14 pins plus thev0.1.92manifest verified. Readiness exits 2 locallystructured-output-adversarialdocs-siterelease-doc-version-consistencywebgpu-bridge-tag-consistencyexamples-tests61781eaf.a8eeb693. The driver is now in #2171.true,false, and omission.web-webgpu-generationwebgpu-multimodal-regressionChromium runtime evidence
The driver carried by #2171 produced this prior-head evidence. The 68-case Chromium CPU matrix ran on Chromium 159.0.8154.6 on macOS arm64. Staged and control generation outputs matched, including reloads. The WebKit user agent exercised browser-default policy in Chromium. Chromium does not expose worker JS heap samples.
Largest sampled Wasm linear-memory capacity across the cores created during each case. The unstaged Qwen3-4B wasm32 controls retried on wasm64.
For the Qwen3-4B direct wasm64 cases, sampled page JS peaks were 435 MiB by default and 1,498 MiB with staging.
The models were Stories15M (SHA-256
61b50d457809a5194818fd22e6724b456cd7bb9a6264c52c8110684c53f3704a), LFM2-VL-450M fixture model (SHA-2561fbf4797e8669cdeabd97fa1d31ab046907cb1fc78b1c3d4bda1ba879574e5d7) and projector (SHA-256a6a813fae4ba3f90852a990fdd4786a017dba0e80e599a366853ba539ee2b5ef), and Qwen3-4B (SHA-256ab27b9bfa375a178d6cba48f3ad892b94b7739659dcc7aae8058ce0ffed6b328).Review Notes
14035b78cbc4e1fd6ce303a25d9f6bacb52fa4d4.High-risk regression review
artifactConsumer,backendRuntime).auditor-deep, ACCEPT.14035b78cbc4e1fd6ce303a25d9f6bacb52fa4d4/135a6cadf1e511a5da4504b812e2ef1f74a56de9. Last merged baseb6cbf85065d567f72046fb91f745b3abac211edb.c247b099018f55472dc83e561f0105a83f4ce03aa153d32365a07b34cde129f1and4f2fb82d55a932e9182e703d5265f3fc5875f808d4d9aa0ba18a0585d0d7784b, respectively. The matrix preserves the larger GGUF and projector results.