@zerogpu/browser-extension-sdk 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +75 -0
  2. package/bin/zerogpu.mjs +6 -0
  3. package/dist/assets/zerogpu-assets.json +2 -2
  4. package/dist/assets/zerogpu-worker.js +1 -1
  5. package/dist/extension/zerogpu-background.js +1 -1
  6. package/dist/extension/zerogpu-offscreen.js +1 -1
  7. package/dist/loader.js +1 -1
  8. package/dist/manifest.json +5 -5
  9. package/dist/types/adapters/kinds.d.ts +8 -0
  10. package/dist/types/adapters/onnx/executor.d.ts +26 -1
  11. package/dist/types/adapters/onnx/runtime.d.ts +10 -4
  12. package/dist/types/adapters/types.d.ts +15 -1
  13. package/dist/types/appinference/eligible.d.ts +12 -0
  14. package/dist/types/appinference/store.d.ts +50 -0
  15. package/dist/types/appinference/types.d.ts +118 -0
  16. package/dist/types/config/types.d.ts +1 -0
  17. package/dist/types/device/telemetry.d.ts +6 -0
  18. package/dist/types/extension/background.d.ts +36 -0
  19. package/dist/types/extension/offscreen.d.ts +25 -3
  20. package/dist/types/loader.d.ts +1 -0
  21. package/dist/types/public-api.d.ts +41 -7
  22. package/dist/types/runtime/app-identity.d.ts +24 -0
  23. package/dist/types/runtime/app-inference.d.ts +60 -0
  24. package/dist/types/runtime/guardrails.d.ts +10 -0
  25. package/dist/types/runtime/host-api.d.ts +13 -1
  26. package/dist/types/runtime/init-guard.d.ts +9 -0
  27. package/dist/types/runtime/lifecycle-options.d.ts +12 -0
  28. package/dist/types/runtime/lifecycle.d.ts +21 -8
  29. package/dist/types/runtime/restart.d.ts +11 -0
  30. package/dist/types/runtime/router.d.ts +13 -0
  31. package/dist/types/runtime/sdk-state.d.ts +24 -0
  32. package/dist/types/runtime/shutdown.d.ts +21 -3
  33. package/dist/types/storage/cached-model.d.ts +31 -2
  34. package/dist/types/telemetry/event-reporter.d.ts +1 -0
  35. package/dist/types/transport/http.d.ts +67 -0
  36. package/dist/v/zerogpu-browser-sdk.686affbdf19f.umd.js +1 -0
  37. package/dist/zerogpu-browser-sdk.cjs +1 -1
  38. package/dist/zerogpu-browser-sdk.esm.js +1 -1
  39. package/dist/zerogpu-browser-sdk.umd.js +1 -1
  40. package/dist/zerogpu-worker.js +1 -1
  41. package/docs/APP_INFERENCE_E2E_2026-11-06_DEV.md +855 -0
  42. package/docs/app-side-inference.md +541 -0
  43. package/docs/extension-developer-guide.md +31 -0
  44. package/docs/multi-model-support.md +5 -1
  45. package/package.json +2 -1
  46. package/dist/v/zerogpu-browser-sdk.87efe0d8c5ba.umd.js +0 -1
@@ -0,0 +1,855 @@
1
+ # Browser SDK app-side inference: e2e on develop (2026-11-06, ZGA-677)
2
+
3
+ The browser SDK's app-side inference (eligible list, model switching, local calls; design in
4
+ device-registry `docs/SDK_APP_INFERENCE_DESIGN.md` §2 and §14), the four inference kinds added for
5
+ parity with Android, the bounded multi-model cache and the ZGA-677 recovery fix, exercised against the
6
+ live develop registry from this checkout's built bundle. Two harnesses: a website page in headless
7
+ Chromium (`e2e/run.mjs`) and a Manifest V3 extension in a persistent Chromium context
8
+ (`e2e/run-extension.mjs`), both under Playwright.
9
+
10
+ ## 1. What ran
11
+
12
+ | | |
13
+ |---|---|
14
+ | Source | branch `ZGA-677-app-side-inference` (from `dev` 8c30cdb = 0.4.0 + the inference worker), `npm run build` of this checkout; bundle reports `0.4.0+8c30cdb` (the 0.5.0 bump is a separate chore PR) |
15
+ | Registry | develop (`dev.devices.zerogpu.ai`), lists `browser` and `chrome-extension` extended for the lab by `device-registry scripts/browser-app-inference-dev-catalog.mjs`: deberta (share 100, the deterministic default), the five production rows, t5-small, one lab row per extra kind (NER, QA, embedding, sentiment, fill-mask), gemma-3-270m and SmolLM2-360m (GGUF), a tokenizer-as-model row and a dead-URL row; `guardrails.sampleLatencyBudgetMs` 20 s (see finding 2) |
16
+ | Machine | Windows 11 laptop, headless Chromium 1228 (Playwright 1.61.1), page not cross-origin isolated → single-threaded wasm; ORT in the SDK's inference worker; wllama single-thread; lab battery shim (healthy) because the laptop ran on battery below 20 % during the run (see finding 6) |
17
+ | Website runs | `2026-11-06-dev-full-2.json` (19 scenarios, 15:48–15:59 UTC); `2026-11-06-dev-rerun-offline.json` and `2026-11-06-dev-rerun-switch.json` (the reworked `offline-online` and `switch-during-task` on fresh devices, 17:1x–17:4x UTC; the summary table of the appendix shows the last run of each scenario) |
18
+ | Extension run | `2026-11-06-dev-extension-2.json` (7 scenarios, 17:0x UTC): the fixture under `e2e/extension/` in the `npx zerogpu init` shape, driven through `ZeroGpuBackground.*` in the service worker |
19
+ | Unit tests | 359 pass (30 files), `tsc --noEmit`, eslint and the build's safe-logging check clean |
20
+
21
+ ## 2. Result
22
+
23
+ **Website: 19 of 19 scenarios pass, 0 failing checks (the first full run had two harness-side misses in `offline-online` and `switch-during-task`, both reworked and rerun; findings 3, 5 and 7). Extension: 7 of 7 scenarios, 18 of 18 checks.** Dev registry: 0 warning and 0 error lines during the runs; for the
24
+ e2e devices it logged 24 registrations, 21 acknowledged hellos, 15 successful dispatches, 14
25
+ eligible-list calls, the 2 intentional `device_requirements` refusals and the 1 intentional busy refusal.
26
+
27
+ | Scenario | Result | What it showed |
28
+ |---|---|---|
29
+ | install, default-register | PASS | fresh context → deberta assigned, warm-up 337 ms, hello acked, device in its ready lists as `browser` |
30
+ | eligible | PASS | all 15 entries of the browser list judged, every line with kind/framework/size/cap, active + downloaded merged |
31
+ | local-active, network | PASS | `runLocal` 249 ms on deberta; a registry-dispatched task served through the socket with the same output |
32
+ | switch-onnx | PASS, 140 checks | every ONNX kind: iab-classify (switch 4.3 s), moderation (14 s), domain classifier (13 s), signal-extract, t5-small, MiniLM embedding, SST-2, BERT NER, DistilBERT QA, BERT fill-mask; on each: granted, `activeModelChanged`, choice remembered, cache ≤ 3, registry lists the model, local call with the expected content, dispatched network task identical |
33
+ | cache-cap | PASS | the 4th model evicts the least recently used; switching back to a cached one reloads in 4.4 s without a download |
34
+ | switch-gguf | PASS | gemma-3-270m and SmolLM2-360m through wllama: local generation ("The capital of France is Paris."), dispatched task served (6.2 s / 4.2 s single-threaded) |
35
+ | busy-guard | PASS | a dispatched task during a local generation answered `device_busy` → 409, the device stays listed, the next task is served |
36
+ | not-eligible, not-offered | PASS | typed `ModelNotEligibleError` with the list's reason / `not_offered`; nothing changes |
37
+ | refused-at-register | PASS | the list said eligible, the entry was changed behind the SDK's back → `granted: false, reason: guardrail_blocked`, default active, `modelChoiceRefused`, choice cleared |
38
+ | warmup-fails | PASS | the dead-URL row: switch not granted (`load_failed:…`), files gone, unfit mark persisted and reported to the registry, `device_unfit` on the list, refused up front afterwards, `forgetUnfitModel` makes it eligible again |
39
+ | offline-online | PASS | the session dies without a handshake while offline → reconnect scheduled (1.3 s), the retry fails offline, state `registering`, typed error on a local call; network back → `Network is back; re-registering now`, the loaded model reused, contributing again, local call 479 ms |
40
+ | restart, clear-choice | PASS | page reload keeps the choice and the cache ("Loading the assigned model from the cache"); `clearModelChoice` + reload → default again |
41
+ | declined | PASS | battery 7 % unplugged → `declined`, every list line `low_battery` (unfit lines keep `device_unfit`), local call → `not_contributing_declined` with the reason; contributing again once cleared |
42
+ | long-input | PASS, 22 checks | ~305 tokens on iab-classify (list cap 128) runs locally; ~1,270 tokens → `input_too_large` before anything runs (catalog cap 400); a ~1,600-token prompt decodes on SmolLM2 |
43
+ | switch-during-task | PASS | a 48-token generation dispatched to SmolLM2, a switch to deberta 2 s into it: the task finished and was answered (7.4 s), the result went out before the session was closed for the switch, the switch completed |
44
+ | ext-register … ext-clear-choice | PASS | the offscreen document registers as `chrome-extension`, `activeModelChanged` reaches the service worker, eligible list, local call, switch to iab-classify (download + warm-up) with the registry record carrying `requestedModelId`, dispatched task served, `ModelNotEligibleError` rebuilt across the message boundary, opt-out stops the document and opt-in brings the default model back |
45
+
46
+ ## 3. Findings
47
+
48
+ 1. **transformers.js kept a second copy of every model file.** Its Cache API layer stored each file
49
+ under `https://huggingface.co/https://models.zerogpu.ai/<model>/resolve/main/<file>` (its remote-host
50
+ prefix), so the SDK's eviction never matched, and a model evicted from the SDK's IndexedDB store came
51
+ back on the next assignment with "0 files downloaded" — never re-persisted, while the SDK's list still
52
+ claimed it ("Cached model invalid; dropping it" on every boot). Fixed in this branch: the SDK's store is
53
+ the one cache (`env.useBrowserCache = false`), the legacy cache is purged once per page, eviction matches
54
+ the real keys. The first full run showed the symptom; the second did not.
55
+ 2. **The served warm-up latency budget is exactly what rule 6 measures.** On the browser lists the registry
56
+ serves `sampleLatencyBudgetMs: 2000`; in single-threaded wasm (any page that is not cross-origin
57
+ isolated, every offscreen document) the warm-up of signal-extract took 2.4 s, gemma 2.2 s and SmolLM2
58
+ 7.6 s, so the gate marked them unfit — the design working as intended. The dev lab lists now carry
59
+ 20 s so the e2e can exercise those models; production keeps its value, so on slow machines such models
60
+ end up `device_unfit` and the registry walks on. Worth a product decision per model.
61
+ 3. **A client-initiated close is not acknowledged promptly by the registry session.** `switchModel` closes
62
+ the old session with 1000; Chromium then waits for the server's close frame, which did not arrive, so the
63
+ old socket's `close` event fired only when the connection dropped later (as 1006). The SDK marks the old
64
+ socket superseded first, so nothing breaks, but up to four half-closed sockets were seen at once. The
65
+ registry's DeviceSession could answer the close frame.
66
+ 4. **The tokenizer-as-model "broken" row does not break the browser.** transformers.js fetches
67
+ `onnx/model_quantized.onnx` by name from the row's URL, so the Android lab row (whose required-files list
68
+ points the model entry at the tokenizer) loads the real model here. The browser lab uses a dead-URL row.
69
+ 5. **Chromium's offline emulation does not kill an open WebSocket.** The first version of the offline scenario
70
+ saw only superseded sockets close; the reworked scenario kills the live socket the way a dead TCP
71
+ connection surfaces (readyState `CLOSED` + a close event with no handshake) while offline, which is what
72
+ a laptop waking from sleep looks like to the SDK.
73
+ 6. **The copilot `.env` dev API key is inactive** (`Default API Key`, sha8 298ab2a9): the harness's
74
+ observed orchestrator side-requests got `403 Invalid credentials`. Informational only; the device path
75
+ is covered by the registry's dispatch route, which all passed.
76
+ 7. **The laptop running the suite went below 20 % on battery** mid-run, and the registry declined it with
77
+ `low_battery` (one switch in the first rerun). The lab harnesses now report a healthy battery unless a
78
+ scenario simulates a low one.
79
+
80
+ ## 4. Not covered
81
+
82
+ - A guardrail restart on the live registry (the allocation-failure path cannot be provoked from a page;
83
+ the restart ladder, the fresh runtime and the terminal host stop are unit-tested in
84
+ `test/guardrail-restart.test.ts`).
85
+ - Telegram mini apps (same bundle; the Telegram list has one model).
86
+ - A real laptop sleeping; a non-Chromium engine; a cross-origin-isolated page (multi-threaded wasm).
87
+ - The published npm / CDN artifact: this ran the checkout's build. The dev CDN deploys on push to `dev`.
88
+
89
+ ## 5. Reproducing
90
+
91
+ ```bash
92
+ cd sdk && npm run build
93
+ ZG_CATALOG_SCRIPT=<device-registry>/scripts/browser-app-inference-dev-catalog.mjs \
94
+ node --env-file=<zerogpu copilot .env> e2e/run.mjs --out e2e/results/<name>.json
95
+ node --env-file=<zerogpu copilot .env> e2e/run-extension.mjs --out e2e/results/<name>-extension.json
96
+ node e2e/report.mjs e2e/results/<name>.json e2e/results/<name>-extension.json
97
+ ```
98
+
99
+ ## Appendix: every scenario, every check
100
+
101
+ | # | Scenario | Goal | Checks | Result | Took |
102
+ |---|---|---|---|---|---|
103
+ | 1 | `local-active` | rule 4: a local call runs on the model the device holds, no model parameter | 3/3 | **PASS** | 0 s |
104
+ | 2 | `network` | the device keeps serving the network: a task dispatched to this device through the registry (and one real orchestrator request, observed) | 3/3 | **PASS** | 2 s |
105
+ | 3 | `switch-onnx` | rule 3: switch through register across every ONNX kind (download if missing, warm-up, reconnect), local call and a network task on each | 140/140 | **PASS** | 127 s |
106
+ | 4 | `cache-cap` | the download cache is bounded (3): switching back to a cached model only reloads; beyond the cap the least recently used is evicted | 10/10 | **PASS** | 5 s |
107
+ | 5 | `switch-gguf` | rule 3 on GGUF (wllama): two small instruct models; local generation and a network task on each | 28/28 | **PASS** | 80 s |
108
+ | 6 | `busy-guard` | rule 7 / §8: an app call goes to the front; a network task arriving meanwhile is answered device_busy (the registry turns it into a polite 409 and keeps the device listed) | 4/4 | **PASS** | 35 s |
109
+ | 7 | `not-eligible` | rule 3: asking for a model the list marks not eligible is a typed error, nothing changes (an entry made to require 64 GB) | 4/4 | **PASS** | 13 s |
110
+ | 8 | `not-offered` | rule 3: an unknown identifier is a typed error (not_offered) | 1/1 | **PASS** | 3 s |
111
+ | 9 | `refused-at-register` | §2.3: the list said eligible, but the registry refuses at register time → default assigned in the same answer, choice cleared, app told why | 5/5 | **PASS** | 21 s |
112
+ | 10 | `warmup-fails` | rule 6: a model that passes the registry but cannot be downloaded here (dead URL) is marked unfit with the reason, reported, and the device re-registers at once | 9/9 | **PASS** | 19 s |
113
+ | 11 | `restart` | rule 3: the choice survives a page reload (register carries requestedModelId); the cache is reused; unfit marks survive too | 4/4 | **PASS** | 10 s |
114
+ | 12 | `clear-choice` | clearModelChoice(): the next register takes the default assignment again | 2/2 | **PASS** | 9 s |
115
+ | 13 | `declined` | §2.5: a registry refusal (low battery, not charging) takes local inference away with the registry reason; the eligible list reflects it | 5/5 | **PASS** | 13 s |
116
+ | 14 | `long-input` | rule 7: no fleet input cap on local calls — text above the list's network cap runs locally; only the model's own catalog cap refuses, as a typed error before anything runs | 22/22 | **PASS** | 278 s |
117
+ | 15 | `offline-online` | ZGA-677: the laptop sleeps — the session dies without a close handshake while the network is away — and wakes; the SDK reconnects on its own, at once when the network returns, without a page reload | 7/7 | **PASS** | 4 s |
118
+ | 16 | `install` | fresh browser context (new device identity, empty cache) on this checkout's dist bundle, against develop | 1/1 | **PASS** | 14 s |
119
+ | 17 | `default-register` | rule 1: register with the operator key, the registry assigns the default model, warm-up, connect | 5/5 | **PASS** | 2 s |
120
+ | 18 | `eligible` | rule 2: the eligible list judges every entry of the browser list; downloaded/active merged by the SDK | 5/5 | **PASS** | 2 s |
121
+ | 19 | `switch-during-task` | §2.3: a switch lets the in-flight network task finish before closing the session | 11/11 | **PASS** | 43 s |
122
+ | 20 | `ext-register` | the fixture extension (scaffold shape, vendored bundle) registers from its offscreen document as chrome-extension on develop, downloads the default model, contributes | 3/3 | **PASS** | 24 s |
123
+ | 21 | `ext-eligible` | ZeroGpuBackground.getZeroGpuEligibleModels(): the chrome-extension list judged for this device | 3/3 | **PASS** | 2 s |
124
+ | 22 | `ext-local` | ZeroGpuBackground.runZeroGpuLocal(): a local call on the active model, answered over the message boundary | 2/2 | **PASS** | 0 s |
125
+ | 23 | `ext-switch` | ZeroGpuBackground.switchZeroGpuModel(): download, warm-up, reconnect under the new model; local call on it; choice remembered | 5/5 | **PASS** | 6 s |
126
+ | 24 | `ext-network` | the extension device keeps serving the network: a task dispatched through the registry | 1/1 | **PASS** | 3 s |
127
+ | 25 | `ext-not-offered` | a typed error crosses the message boundary intact | 1/1 | **PASS** | 2 s |
128
+ | 26 | `ext-clear-choice` | ZeroGpuBackground.clearZeroGpuModelChoice(), then the offscreen document is recreated (opt-out / opt-in): the default model again | 3/3 | **PASS** | 11 s |
129
+
130
+ ### `install` — PASS (earlier run, superseded below)
131
+
132
+ fresh browser context (new device identity, empty cache) on this checkout's dist bundle, against develop
133
+
134
+ - page loaded and the SDK started — `{"status":"running"}`
135
+
136
+ | Check | Result | Evidence |
137
+ |---|---|---|
138
+ | initZeroGpuSdk returned a handle | PASS | |
139
+
140
+ ### `default-register` — PASS (earlier run, superseded below)
141
+
142
+ rule 1: register with the operator key, the registry assigns the default model, warm-up, connect
143
+
144
+ - state — `{"contributionState":"contributing","activeModelId":"deberta-v3-small","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":null,"unfitModels":null,"downloadedModels":["deberta-v3-small\|v1…`
145
+ - JS heap MB — `10`
146
+
147
+ | Check | Result | Evidence |
148
+ |---|---|---|
149
+ | default assignment is deberta-v3-small (or the remembered choice) | PASS | `deberta-v3-small` |
150
+ | warm-up sample passed before hello | PASS | `["Post-register sample ok {taskType: classification, ok: true, error: false, errorMessage: undefined, processingTimeMs: 302}"]` |
151
+ | SDK ready (session open) | PASS | |
152
+ | registry record: browser, listed under the active model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["classification"],"lists":["reg:geo:cc:RS:deberta-v3-small","reg:geo:deberta-v3-small","reg:geo:ip:185.26.175.217:deberta-v3-small","reg:geo:op:3265aabb-85cd-4be9-95b…` |
153
+ | device is in a ready list of its model | PASS | `["reg:geo:cc:RS:deberta-v3-small","reg:geo:deberta-v3-small","reg:geo:ip:185.26.175.217:deberta-v3-small","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:deberta-v3-small"]` |
154
+
155
+ ### `eligible` — PASS (earlier run, superseded below)
156
+
157
+ rule 2: the eligible list judges every entry of the browser list; downloaded/active merged by the SDK
158
+
159
+ - lines: 15 — `["OK deberta-v3-small zero_shot_classification/onnx 193MB cap=400 dl=true active=true","OK zlm-v1-iab-classify-edge sequence_classification/onnx 25MB cap=400 dl=false active=false","OK zlm-v1-moderation-edge sequence_c…`
160
+ - not eligible on this device — `[]`
161
+
162
+ | Check | Result | Evidence |
163
+ |---|---|---|
164
+ | eligibleModels() answered | PASS | |
165
+ | the whole browser list is judged (not just the first fit) | PASS | `15` |
166
+ | every line carries kind, framework, size and catalog cap | PASS | |
167
+ | the active model is marked active + downloaded + eligible | PASS | `deberta-v3-small` |
168
+ | most models are eligible on this machine | PASS | `15` |
169
+
170
+ ### `local-active` — PASS
171
+
172
+ rule 4: a local call runs on the model the device holds, no model parameter
173
+
174
+ - runLocal on deberta-v3-small — `{"ms":237,"queueWaitMs":0,"runtime":"onnx","response":"{\"Economy\":0.5013316113052586,\"Travel\":0.2640736842023389,\"Sports\":0.13311052914262142,\"Cooking\":0.10148417534978092}"}`
175
+
176
+ | Check | Result | Evidence |
177
+ |---|---|---|
178
+ | local call succeeded | PASS | |
179
+ | result names the active model, location device | PASS | |
180
+ | response has the expected shape/content | PASS | `{"Economy":0.5013316113052586,"Travel":0.2640736842023389,"Sports":0.13311052914262142,"Cooking":0.10148417534978092}` |
181
+
182
+ ### `network` — PASS
183
+
184
+ the device keeps serving the network: a task dispatched to this device through the registry (and one real orchestrator request, observed)
185
+
186
+ - registry dispatch → 200 in 772 ms — `{"output":{"Economy":0.5013316113052586,"Travel":0.2640736842023389,"Sports":0.13311052914262142,"Cooking":0.10148417534978092},"metadata":{"processingTime":231,"customParams":{"cust_param1":"","cust_param2":"","cust_par…`
187
+ - observed: orchestrator /v1/chat/completions pinned → 403 device=- in 784 ms; task did not reach this device — `Invalid credentials`
188
+
189
+ | Check | Result | Evidence |
190
+ |---|---|---|
191
+ | device served the network task through its socket (registry device route) | PASS | `231` |
192
+ | the task result went out on the socket (console) | PASS | |
193
+ | network output has the same content as the local call | PASS | `{"Economy":0.5013316113052586,"Travel":0.2640736842023389,"Sports":0.13311052914262142,"Cooking":0.10148417534978092}` |
194
+
195
+ ### `switch-onnx` — PASS
196
+
197
+ rule 3: switch through register across every ONNX kind (download if missing, warm-up, reconnect), local call and a network task on each
198
+
199
+ - ONNX entries offered by this environment — `["zlm-v1-iab-classify-edge","zlm-v1-moderation-edge","zlm-v1-iab-domain-classifier","zlm-v1-signal-extract","t5-small","all-minilm-l6-v2-edge","distilbert-sst2-edge","bert-base-ner-edge","distilbert-squad-edge","bert-bas…`
200
+ - switch deberta-v3-small → zlm-v1-iab-classify-edge
201
+ - switch answered in 4.3 s — `{"requestedModelId":"zlm-v1-iab-classify-edge","activeModelId":"zlm-v1-iab-classify-edge","granted":true}`
202
+ - runLocal on zlm-v1-iab-classify-edge — `{"ms":14,"queueWaitMs":0,"runtime":"onnx","response":"{\"content\|Sports\":0.8960159874521612,\"content\|Running and Jogging\":0.8078519314010332,\"audience\|Sports\":0.7733025185554885,\"content\|Fitness and Exercise\":0.76…`
203
+ - registry dispatch → 200 in 502 ms — `{"output":{"content\|Sports":0.8960159874521612,"content\|Running and Jogging":0.8078519314010332,"audience\|Sports":0.7733025185554885,"content\|Fitness and Exercise":0.766105656054488,"audience\|Interest \| Healthy Living \| …`
204
+ - observed: orchestrator /usecase/classify/iab pinned → 403 device=- in 415 ms; task did not reach this device — `Invalid credentials`
205
+ - switch zlm-v1-iab-classify-edge → zlm-v1-moderation-edge
206
+ - switch answered in 15.2 s — `{"requestedModelId":"zlm-v1-moderation-edge","activeModelId":"zlm-v1-moderation-edge","granted":true}`
207
+ - runLocal on zlm-v1-moderation-edge — `{"ms":110,"queueWaitMs":0,"runtime":"onnx","response":"{\"unsafe\":0.9991213403598755,\"harassment/threatening\":0.989750541922511,\"harassment\":0.9873972858596375,\"illicit\":0.1843750749839129,\"violence\":0.093362517…`
208
+ - registry dispatch → 200 in 590 ms — `{"output":{"unsafe":0.9991213403598755,"harassment/threatening":0.989750541922511,"harassment":0.9873972858596375,"illicit":0.1843750749839129,"violence":0.09336251775046477,"illicit/violent":0.03976775581436732,"sexual"…`
209
+ - observed: orchestrator /usecase/moderation pinned → 403 device=- in 387 ms; task did not reach this device — `Invalid credentials`
210
+ - switch zlm-v1-moderation-edge → zlm-v1-iab-domain-classifier
211
+ - switch answered in 11.9 s — `{"requestedModelId":"zlm-v1-iab-domain-classifier","activeModelId":"zlm-v1-iab-domain-classifier","granted":true}`
212
+ - runLocal on zlm-v1-iab-domain-classifier — `{"ms":128,"queueWaitMs":0,"runtime":"onnx","response":"{\"content\|Job Search\":0.9923716459156425,\"content\|Careers\":0.946752966381927,\"audience\|Career Advice\":0.9351867499373294,\"content\|Job Market\":0.8606599136304…`
213
+ - registry dispatch → 200 in 555 ms — `{"output":{"content\|Job Search":0.9923716459156425,"content\|Careers":0.946752966381927,"audience\|Career Advice":0.9351867499373294,"content\|Job Market":0.8606599136304314,"audience\|Unemployed / Job Seeker":0.852681542488…`
214
+ - switch zlm-v1-iab-domain-classifier → zlm-v1-signal-extract
215
+ - switch answered in 18.3 s — `{"requestedModelId":"zlm-v1-signal-extract","activeModelId":"zlm-v1-signal-extract","granted":true}`
216
+ - runLocal on zlm-v1-signal-extract — `{"ms":631,"queueWaitMs":0,"runtime":"onnx","response":"{\"text\":\"budget smartphones, sale, price comparison, battery life, laptop life, sale this week, phone prices [SEP] identify sale details [SEP] transactional\",\"s…`
217
+ - registry dispatch → 200 in 1231 ms — `{"output":{"text":"budget smartphones, sale, price comparison, battery life, laptop life, sale this week, phone prices [SEP] identify sale details [SEP] transactional","score":0.6186041206827542},"metadata":{"processingT…`
218
+ - switch zlm-v1-signal-extract → t5-small
219
+ - switch answered in 8.3 s — `{"requestedModelId":"t5-small","activeModelId":"t5-small","granted":true}`
220
+ - runLocal on t5-small — `{"ms":1214,"queueWaitMs":0,"runtime":"onnx","response":"{\"text\":\"cities around the world have started rethinking how people move through urban spaces. bicycling lanes have expanded, car-free zones have appeared in his…`
221
+ - registry dispatch → 200 in 1514 ms — `{"output":{"text":"cities around the world have started rethinking how people move through urban spaces. bicycling lanes have expanded, car-free zones have appeared in historic centers.","score":0.8416450926898744},"meta…`
222
+ - observed: orchestrator /summary pinned → 403 device=- in 417 ms; task did not reach this device — `Invalid credentials`
223
+ - switch t5-small → all-minilm-l6-v2-edge
224
+ - switch answered in 4.4 s — `{"requestedModelId":"all-minilm-l6-v2-edge","activeModelId":"all-minilm-l6-v2-edge","granted":true}`
225
+ - eviction — `["Evicted the least recently used model from the cache {modelId: deberta-v3-small, cap: 3}"]`
226
+ - runLocal on all-minilm-l6-v2-edge — `{"ms":13,"queueWaitMs":0,"runtime":"onnx","response":"{\"embedding\":[0.04779260233044624,0.015748703852295876,0.008267763070762157,0.0025135439354926348,0.03128952905535698,0.04912225529551506,0.01523023284971714,-0.032…`
227
+ - registry dispatch → 200 in 460 ms — `{"output":{"embedding":[0.04779260233044624,0.015748703852295876,0.008267763070762157,0.0025135439354926348,0.03128952905535698,0.04912225529551506,0.01523023284971714,-0.03220164030790329,0.024953041225671768,0.01663159…`
228
+ - switch all-minilm-l6-v2-edge → distilbert-sst2-edge
229
+ - switch answered in 6.0 s — `{"requestedModelId":"distilbert-sst2-edge","activeModelId":"distilbert-sst2-edge","granted":true}`
230
+ - eviction — `["Evicted the least recently used model from the cache {modelId: zlm-v1-iab-classify-edge, cap: 3}"]`
231
+ - runLocal on distilbert-sst2-edge — `{"ms":38,"queueWaitMs":0,"runtime":"onnx","response":"{\"POSITIVE\":0.9997297105687563,\"NEGATIVE\":0.00027028943124368594}"}`
232
+ - registry dispatch → 200 in 484 ms — `{"output":{"POSITIVE":0.9997297105687563,"NEGATIVE":0.00027028943124368594},"metadata":{"processingTime":31,"customParams":{"cust_param1":"","cust_param2":"","cust_param3":""}},"deviceInferenceMs":31}`
233
+ - switch distilbert-sst2-edge → bert-base-ner-edge
234
+ - switch answered in 10.0 s — `{"requestedModelId":"bert-base-ner-edge","activeModelId":"bert-base-ner-edge","granted":true}`
235
+ - eviction — `["Evicted the least recently used model from the cache {modelId: t5-small, cap: 3}"]`
236
+ - runLocal on bert-base-ner-edge — `{"ms":95,"queueWaitMs":0,"runtime":"onnx","response":"{\"entities\":[{\"label\":\"PER\",\"text\":\"Wolfgang\",\"start\":11,\"end\":19,\"score\":0.998618},{\"label\":\"LOC\",\"text\":\"Berlin\",\"start\":34,\"end\":40,\"s…`
237
+ - registry dispatch → 200 in 532 ms — `{"output":{"entities":[{"label":"PER","text":"Wolfgang","start":11,"end":19,"score":0.998618},{"label":"LOC","text":"Berlin","start":34,"end":40,"score":0.999545},{"label":"ORG","text":"SpaceX","start":42,"end":48,"score…`
238
+ - switch bert-base-ner-edge → distilbert-squad-edge
239
+ - switch answered in 6.2 s — `{"requestedModelId":"distilbert-squad-edge","activeModelId":"distilbert-squad-edge","granted":true}`
240
+ - eviction — `["Evicted the least recently used model from the cache {modelId: all-minilm-l6-v2-edge, cap: 3}"]`
241
+ - runLocal on distilbert-squad-edge — `{"ms":74,"queueWaitMs":0,"runtime":"onnx","response":"{\"answer\":\"1889\",\"score\":0.9664832578801565,\"start\":34,\"end\":38}"}`
242
+ - registry dispatch → 200 in 542 ms — `{"output":{"answer":"1889","score":0.9664832578801565,"start":34,"end":38},"metadata":{"processingTime":83,"customParams":{"cust_param1":"","cust_param2":"","cust_param3":""}},"deviceInferenceMs":83}`
243
+ - switch distilbert-squad-edge → bert-base-uncased-fillmask-edge
244
+ - switch answered in 10.5 s — `{"requestedModelId":"bert-base-uncased-fillmask-edge","activeModelId":"bert-base-uncased-fillmask-edge","granted":true}`
245
+ - eviction — `["Evicted the least recently used model from the cache {modelId: distilbert-sst2-edge, cap: 3}"]`
246
+ - runLocal on bert-base-uncased-fillmask-edge — `{"ms":168,"queueWaitMs":0,"runtime":"onnx","response":"{\"predictions\":[{\"token\":\"paris\",\"tokenId\":3000,\"score\":0.32540807127952576},{\"token\":\"lille\",\"tokenId\":22479,\"score\":0.09218233078718185},{\"token…`
247
+ - registry dispatch → 200 in 641 ms — `{"output":{"predictions":[{"token":"paris","tokenId":3000,"score":0.32540807127952576},{"token":"lille","tokenId":22479,"score":0.09218233078718185},{"token":"lyon","tokenId":10241,"score":0.050382912158966064},{"token":…`
248
+
249
+ | Check | Result | Evidence |
250
+ |---|---|---|
251
+ | granted=true | PASS | `{"requestedModelId":"zlm-v1-iab-classify-edge","activeModelId":"zlm-v1-iab-classify-edge","granted":true}` |
252
+ | activeModelId is the requested model | PASS | |
253
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"zlm-v1-iab-classify-edge","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"zlm-v1-iab-classify-edge","unfitModels":null,"downloade…` |
254
+ | activeModelChanged fired for it | PASS | `[{"modelId":"zlm-v1-iab-classify-edge"}]` |
255
+ | choice remembered on the device | PASS | `zlm-v1-iab-classify-edge` |
256
+ | cache holds at most 3 models | PASS | `["zlm-v1-iab-classify-edge\|1","deberta-v3-small\|v1"]` |
257
+ | IndexedDB records match the cap | PASS | `["deberta-v3-small:v1","zlm-v1-iab-classify-edge:1"]` |
258
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["iab_classify"],"lists":["reg:geo:cc:RS:zlm-v1-iab-classify-edge","reg:geo:ip:185.26.175.217:zlm-v1-iab-classify-edge","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a…` |
259
+ | local call succeeded | PASS | |
260
+ | result names the active model, location device | PASS | |
261
+ | response has the expected shape/content | PASS | `{"content\|Sports":0.8960159874521612,"content\|Running and Jogging":0.8078519314010332,"audience\|Sports":0.7733025185554885,"content\|Fitness and Exercise":0.766105656054488,"audience\|Interest \| Healthy Living \| Running an…` |
262
+ | device served the network task through its socket (registry device route) | PASS | `13` |
263
+ | the task result went out on the socket (console) | PASS | |
264
+ | network output has the same content as the local call | PASS | `{"content\|Sports":0.8960159874521612,"content\|Running and Jogging":0.8078519314010332,"audience\|Sports":0.7733025185554885,"content\|Fitness and Exercise":0.766105656054488,"audience\|Interest \| Healthy…` |
265
+ | granted=true | PASS | `{"requestedModelId":"zlm-v1-moderation-edge","activeModelId":"zlm-v1-moderation-edge","granted":true}` |
266
+ | activeModelId is the requested model | PASS | |
267
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"zlm-v1-moderation-edge","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"zlm-v1-moderation-edge","unfitModels":null,"downloadedMod…` |
268
+ | activeModelChanged fired for it | PASS | `[{"modelId":"zlm-v1-moderation-edge"}]` |
269
+ | choice remembered on the device | PASS | `zlm-v1-moderation-edge` |
270
+ | cache holds at most 3 models | PASS | `["zlm-v1-moderation-edge\|v1","zlm-v1-iab-classify-edge\|1","deberta-v3-small\|v1"]` |
271
+ | IndexedDB records match the cap | PASS | `["deberta-v3-small:v1","zlm-v1-iab-classify-edge:1","zlm-v1-moderation-edge:v1"]` |
272
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["moderation"],"lists":["reg:geo:cc:RS:zlm-v1-moderation-edge","reg:geo:ip:185.26.175.217:zlm-v1-moderation-edge","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:zlm-…` |
273
+ | local call succeeded | PASS | |
274
+ | result names the active model, location device | PASS | |
275
+ | response has the expected shape/content | PASS | `{"unsafe":0.9991213403598755,"harassment/threatening":0.989750541922511,"harassment":0.9873972858596375,"illicit":0.1843750749839129,"violence":0.09336251775046477,"illicit/violent":0.03976775581436732,"sexual":0.0034257…` |
276
+ | device served the network task through its socket (registry device route) | PASS | `112` |
277
+ | the task result went out on the socket (console) | PASS | |
278
+ | network output has the same content as the local call | PASS | `{"unsafe":0.9991213403598755,"harassment/threatening":0.989750541922511,"harassment":0.9873972858596375,"illicit":0.1843750749839129,"violence":0.09336251775046477,"illicit/violent":0.0397677558143673…` |
279
+ | granted=true | PASS | `{"requestedModelId":"zlm-v1-iab-domain-classifier","activeModelId":"zlm-v1-iab-domain-classifier","granted":true}` |
280
+ | activeModelId is the requested model | PASS | |
281
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"zlm-v1-iab-domain-classifier","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"zlm-v1-iab-domain-classifier","unfitModels":null,"d…` |
282
+ | activeModelChanged fired for it | PASS | `[{"modelId":"zlm-v1-iab-domain-classifier"}]` |
283
+ | choice remembered on the device | PASS | `zlm-v1-iab-domain-classifier` |
284
+ | cache holds at most 3 models | PASS | `["zlm-v1-iab-domain-classifier\|1","zlm-v1-iab-classify-edge\|1","deberta-v3-small\|v1"]` |
285
+ | IndexedDB records match the cap | PASS | `["deberta-v3-small:v1","zlm-v1-iab-classify-edge:1","zlm-v1-iab-domain-classifier:1"]` |
286
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["iab_classify_domain"],"lists":["reg:geo:cc:RS:zlm-v1-iab-domain-classifier","reg:geo:ip:185.26.175.217:zlm-v1-iab-domain-classifier","reg:geo:op:3265aabb-85cd-4be9-9…` |
287
+ | local call succeeded | PASS | |
288
+ | result names the active model, location device | PASS | |
289
+ | response has the expected shape/content | PASS | `{"content\|Job Search":0.9923716459156425,"content\|Careers":0.946752966381927,"audience\|Career Advice":0.9351867499373294,"content\|Job Market":0.8606599136304314,"audience\|Unemployed / Job Seeker":0.8526815424884746}` |
290
+ | device served the network task through its socket (registry device route) | PASS | `92` |
291
+ | the task result went out on the socket (console) | PASS | |
292
+ | network output has the same content as the local call | PASS | `{"content\|Job Search":0.9923716459156425,"content\|Careers":0.946752966381927,"audience\|Career Advice":0.9351867499373294,"content\|Job Market":0.8606599136304314,"audience\|Unemployed / Job Seeker":0.85…` |
293
+ | granted=true | PASS | `{"requestedModelId":"zlm-v1-signal-extract","activeModelId":"zlm-v1-signal-extract","granted":true}` |
294
+ | activeModelId is the requested model | PASS | |
295
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"zlm-v1-signal-extract","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"zlm-v1-signal-extract","unfitModels":null,"downloadedModel…` |
296
+ | activeModelChanged fired for it | PASS | `[{"modelId":"zlm-v1-signal-extract"}]` |
297
+ | choice remembered on the device | PASS | `zlm-v1-signal-extract` |
298
+ | cache holds at most 3 models | PASS | `["zlm-v1-signal-extract\|v1","zlm-v1-iab-classify-edge\|1","deberta-v3-small\|v1"]` |
299
+ | IndexedDB records match the cap | PASS | `["deberta-v3-small:v1","zlm-v1-iab-classify-edge:1","zlm-v1-signal-extract:v1"]` |
300
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["signal_extract"],"lists":["reg:geo:cc:RS:zlm-v1-signal-extract","reg:geo:ip:185.26.175.217:zlm-v1-signal-extract","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:zl…` |
301
+ | local call succeeded | PASS | |
302
+ | result names the active model, location device | PASS | |
303
+ | response has the expected shape/content | PASS | `{"text":"budget smartphones, sale, price comparison, battery life, laptop life, sale this week, phone prices [SEP] identify sale details [SEP] transactional","score":0.6186041206827542}` |
304
+ | device served the network task through its socket (registry device route) | PASS | `776` |
305
+ | the task result went out on the socket (console) | PASS | |
306
+ | network output has the same content as the local call | PASS | `{"text":"budget smartphones, sale, price comparison, battery life, laptop life, sale this week, phone prices [SEP] identify sale details [SEP] transactional","score":0.6186041206827542}` |
307
+ | granted=true | PASS | `{"requestedModelId":"t5-small","activeModelId":"t5-small","granted":true}` |
308
+ | activeModelId is the requested model | PASS | |
309
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"t5-small","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"t5-small","unfitModels":null,"downloadedModels":["t5-small\|1","zlm-v1-i…` |
310
+ | activeModelChanged fired for it | PASS | `[{"modelId":"t5-small"}]` |
311
+ | choice remembered on the device | PASS | `t5-small` |
312
+ | cache holds at most 3 models | PASS | `["t5-small\|1","zlm-v1-iab-classify-edge\|1","deberta-v3-small\|v1"]` |
313
+ | IndexedDB records match the cap | PASS | `["deberta-v3-small:v1","t5-small:1","zlm-v1-iab-classify-edge:1"]` |
314
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["summary"],"lists":["reg:geo:cc:RS:t5-small","reg:geo:ip:185.26.175.217:t5-small","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:t5-small","reg:geo:t5-small"],"mode…` |
315
+ | local call succeeded | PASS | |
316
+ | result names the active model, location device | PASS | |
317
+ | response has the expected shape/content | PASS | `{"text":"cities around the world have started rethinking how people move through urban spaces. bicycling lanes have expanded, car-free zones have appeared in historic centers.","score":0.8416450926898744}` |
318
+ | device served the network task through its socket (registry device route) | PASS | `1070` |
319
+ | the task result went out on the socket (console) | PASS | |
320
+ | network output has the same content as the local call | PASS | `{"text":"cities around the world have started rethinking how people move through urban spaces. bicycling lanes have expanded, car-free zones have appeared in historic centers.","score":0.8416450926898…` |
321
+ | granted=true | PASS | `{"requestedModelId":"all-minilm-l6-v2-edge","activeModelId":"all-minilm-l6-v2-edge","granted":true}` |
322
+ | activeModelId is the requested model | PASS | |
323
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"all-minilm-l6-v2-edge","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"all-minilm-l6-v2-edge","unfitModels":null,"downloadedModel…` |
324
+ | activeModelChanged fired for it | PASS | `[{"modelId":"all-minilm-l6-v2-edge"}]` |
325
+ | choice remembered on the device | PASS | `all-minilm-l6-v2-edge` |
326
+ | cache holds at most 3 models | PASS | `["all-minilm-l6-v2-edge\|1","t5-small\|1","zlm-v1-iab-classify-edge\|1"]` |
327
+ | IndexedDB records match the cap | PASS | `["all-minilm-l6-v2-edge:1","t5-small:1","zlm-v1-iab-classify-edge:1"]` |
328
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["iab_classify"],"lists":["reg:geo:all-minilm-l6-v2-edge","reg:geo:cc:RS:all-minilm-l6-v2-edge","reg:geo:ip:185.26.175.217:all-minilm-l6-v2-edge","reg:geo:op:3265aabb-…` |
329
+ | local call succeeded | PASS | |
330
+ | result names the active model, location device | PASS | |
331
+ | response has the expected shape/content | PASS | `{"embedding":[0.04779260233044624,0.015748703852295876,0.008267763070762157,0.0025135439354926348,0.03128952905535698,0.04912225529551506,0.01523023284971714,-0.03220164030790329,0.024953041225671768,0.0166315957903862,0…` |
332
+ | device served the network task through its socket (registry device route) | PASS | `11` |
333
+ | the task result went out on the socket (console) | PASS | |
334
+ | network output has the same content as the local call | PASS | `{"embedding":[0.04779260233044624,0.015748703852295876,0.008267763070762157,0.0025135439354926348,0.03128952905535698,0.04912225529551506,0.01523023284971714,-0.03220164030790329,0.024953041225671768,…` |
335
+ | granted=true | PASS | `{"requestedModelId":"distilbert-sst2-edge","activeModelId":"distilbert-sst2-edge","granted":true}` |
336
+ | activeModelId is the requested model | PASS | |
337
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"distilbert-sst2-edge","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"distilbert-sst2-edge","unfitModels":null,"downloadedModels"…` |
338
+ | activeModelChanged fired for it | PASS | `[{"modelId":"distilbert-sst2-edge"}]` |
339
+ | choice remembered on the device | PASS | `distilbert-sst2-edge` |
340
+ | cache holds at most 3 models | PASS | `["distilbert-sst2-edge\|1","all-minilm-l6-v2-edge\|1","t5-small\|1"]` |
341
+ | IndexedDB records match the cap | PASS | `["all-minilm-l6-v2-edge:1","distilbert-sst2-edge:1","t5-small:1"]` |
342
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["classification"],"lists":["reg:geo:cc:RS:distilbert-sst2-edge","reg:geo:distilbert-sst2-edge","reg:geo:ip:185.26.175.217:distilbert-sst2-edge","reg:geo:op:3265aabb-8…` |
343
+ | local call succeeded | PASS | |
344
+ | result names the active model, location device | PASS | |
345
+ | response has the expected shape/content | PASS | `{"POSITIVE":0.9997297105687563,"NEGATIVE":0.00027028943124368594}` |
346
+ | device served the network task through its socket (registry device route) | PASS | `31` |
347
+ | the task result went out on the socket (console) | PASS | |
348
+ | network output has the same content as the local call | PASS | `{"POSITIVE":0.9997297105687563,"NEGATIVE":0.00027028943124368594}` |
349
+ | granted=true | PASS | `{"requestedModelId":"bert-base-ner-edge","activeModelId":"bert-base-ner-edge","granted":true}` |
350
+ | activeModelId is the requested model | PASS | |
351
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"bert-base-ner-edge","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"bert-base-ner-edge","unfitModels":null,"downloadedModels":["b…` |
352
+ | activeModelChanged fired for it | PASS | `[{"modelId":"bert-base-ner-edge"}]` |
353
+ | choice remembered on the device | PASS | `bert-base-ner-edge` |
354
+ | cache holds at most 3 models | PASS | `["bert-base-ner-edge\|1","distilbert-sst2-edge\|1","all-minilm-l6-v2-edge\|1"]` |
355
+ | IndexedDB records match the cap | PASS | `["all-minilm-l6-v2-edge:1","bert-base-ner-edge:1","distilbert-sst2-edge:1"]` |
356
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["classification"],"lists":["reg:geo:bert-base-ner-edge","reg:geo:cc:RS:bert-base-ner-edge","reg:geo:ip:185.26.175.217:bert-base-ner-edge","reg:geo:op:3265aabb-85cd-4b…` |
357
+ | local call succeeded | PASS | |
358
+ | result names the active model, location device | PASS | |
359
+ | response has the expected shape/content | PASS | `{"entities":[{"label":"PER","text":"Wolfgang","start":11,"end":19,"score":0.998618},{"label":"LOC","text":"Berlin","start":34,"end":40,"score":0.999545},{"label":"ORG","text":"SpaceX","start":42,"end":48,"score":0.996981…` |
360
+ | device served the network task through its socket (registry device route) | PASS | `84` |
361
+ | the task result went out on the socket (console) | PASS | |
362
+ | network output has the same content as the local call | PASS | `{"entities":[{"label":"PER","text":"Wolfgang","start":11,"end":19,"score":0.998618},{"label":"LOC","text":"Berlin","start":34,"end":40,"score":0.999545},{"label":"ORG","text":"SpaceX","start":42,"end"…` |
363
+ | granted=true | PASS | `{"requestedModelId":"distilbert-squad-edge","activeModelId":"distilbert-squad-edge","granted":true}` |
364
+ | activeModelId is the requested model | PASS | |
365
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"distilbert-squad-edge","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"distilbert-squad-edge","unfitModels":null,"downloadedModel…` |
366
+ | activeModelChanged fired for it | PASS | `[{"modelId":"distilbert-squad-edge"}]` |
367
+ | choice remembered on the device | PASS | `distilbert-squad-edge` |
368
+ | cache holds at most 3 models | PASS | `["distilbert-squad-edge\|1","bert-base-ner-edge\|1","distilbert-sst2-edge\|1"]` |
369
+ | IndexedDB records match the cap | PASS | `["bert-base-ner-edge:1","distilbert-squad-edge:1","distilbert-sst2-edge:1"]` |
370
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["classification"],"lists":["reg:geo:cc:RS:distilbert-squad-edge","reg:geo:distilbert-squad-edge","reg:geo:ip:185.26.175.217:distilbert-squad-edge","reg:geo:op:3265aab…` |
371
+ | local call succeeded | PASS | |
372
+ | result names the active model, location device | PASS | |
373
+ | response has the expected shape/content | PASS | `{"answer":"1889","score":0.9664832578801565,"start":34,"end":38}` |
374
+ | device served the network task through its socket (registry device route) | PASS | `83` |
375
+ | the task result went out on the socket (console) | PASS | |
376
+ | network output has the same content as the local call | PASS | `{"answer":"1889","score":0.9664832578801565,"start":34,"end":38}` |
377
+ | granted=true | PASS | `{"requestedModelId":"bert-base-uncased-fillmask-edge","activeModelId":"bert-base-uncased-fillmask-edge","granted":true}` |
378
+ | activeModelId is the requested model | PASS | |
379
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"bert-base-uncased-fillmask-edge","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"bert-base-uncased-fillmask-edge","unfitModels":n…` |
380
+ | activeModelChanged fired for it | PASS | `[{"modelId":"bert-base-uncased-fillmask-edge"}]` |
381
+ | choice remembered on the device | PASS | `bert-base-uncased-fillmask-edge` |
382
+ | cache holds at most 3 models | PASS | `["bert-base-uncased-fillmask-edge\|1","distilbert-squad-edge\|1","bert-base-ner-edge\|1"]` |
383
+ | IndexedDB records match the cap | PASS | `["bert-base-ner-edge:1","bert-base-uncased-fillmask-edge:1","distilbert-squad-edge:1"]` |
384
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["classification"],"lists":["reg:geo:bert-base-uncased-fillmask-edge","reg:geo:cc:RS:bert-base-uncased-fillmask-edge","reg:geo:ip:185.26.175.217:bert-base-uncased-fill…` |
385
+ | local call succeeded | PASS | |
386
+ | result names the active model, location device | PASS | |
387
+ | response has the expected shape/content | PASS | `{"predictions":[{"token":"paris","tokenId":3000,"score":0.32540807127952576},{"token":"lille","tokenId":22479,"score":0.09218233078718185},{"token":"lyon","tokenId":10241,"score":0.050382912158966064},{"token":"marseille…` |
388
+ | device served the network task through its socket (registry device route) | PASS | `174` |
389
+ | the task result went out on the socket (console) | PASS | |
390
+ | network output has the same content as the local call | PASS | `{"predictions":[{"token":"paris","tokenId":3000,"score":0.32540807127952576},{"token":"lille","tokenId":22479,"score":0.09218233078718185},{"token":"lyon","tokenId":10241,"score":0.050382912158966064}…` |
391
+
392
+ ### `cache-cap` — PASS
393
+
394
+ the download cache is bounded (3): switching back to a cached model only reloads; beyond the cap the least recently used is evicted
395
+
396
+ - cache before — `["bert-base-uncased-fillmask-edge\|1","distilbert-squad-edge\|1","bert-base-ner-edge\|1"]`
397
+ - switch bert-base-uncased-fillmask-edge → distilbert-squad-edge
398
+ - switch answered in 3.2 s — `{"requestedModelId":"distilbert-squad-edge","activeModelId":"distilbert-squad-edge","granted":true}`
399
+ - no download: reload from the cache — `distilbert-squad-edge`
400
+
401
+ | Check | Result | Evidence |
402
+ |---|---|---|
403
+ | granted=true | PASS | `{"requestedModelId":"distilbert-squad-edge","activeModelId":"distilbert-squad-edge","granted":true}` |
404
+ | activeModelId is the requested model | PASS | |
405
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"distilbert-squad-edge","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"distilbert-squad-edge","unfitModels":null,"downloadedModel…` |
406
+ | activeModelChanged fired for it | PASS | `[{"modelId":"distilbert-squad-edge"}]` |
407
+ | choice remembered on the device | PASS | `distilbert-squad-edge` |
408
+ | cache holds at most 3 models | PASS | `["distilbert-squad-edge\|1","bert-base-uncased-fillmask-edge\|1","bert-base-ner-edge\|1"]` |
409
+ | IndexedDB records match the cap | PASS | `["bert-base-ner-edge:1","bert-base-uncased-fillmask-edge:1","distilbert-squad-edge:1"]` |
410
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["classification"],"lists":["reg:geo:cc:RS:distilbert-squad-edge","reg:geo:distilbert-squad-edge","reg:geo:ip:185.26.175.217:distilbert-squad-edge","reg:geo:op:3265aab…` |
411
+ | a cached model reloads without a download | PASS | |
412
+ | still within the cap | PASS | |
413
+
414
+ ### `switch-gguf` — PASS
415
+
416
+ rule 3 on GGUF (wllama): two small instruct models; local generation and a network task on each
417
+
418
+ - switch distilbert-squad-edge → gemma-3-270m-it
419
+ - switch answered in 24.7 s — `{"requestedModelId":"gemma-3-270m-it","activeModelId":"gemma-3-270m-it","granted":true}`
420
+ - eviction — `["Evicted the least recently used model from the cache {modelId: bert-base-ner-edge, cap: 3}"]`
421
+ - runLocal on gemma-3-270m-it — `{"ms":6394,"queueWaitMs":0,"runtime":"gguf","response":"{\"text\":\" While France has a long history of political intrigue and a complex history, the capital of France is Paris.\\n\"}"}`
422
+ - registry dispatch → 200 in 6641 ms — `{"output":" While France has a long history of political intrigue and a complex history, the capital of France is Paris.\n","metadata":{"processingTime":6155,"customParams":{"cust_param1":"","cust_param2":"","cust_param3…`
423
+ - observed: orchestrator /v1/chat/completions pinned → 403 device=- in 569 ms; task did not reach this device — `Invalid credentials`
424
+ - JS heap MB after load — `10`
425
+ - switch gemma-3-270m-it → smollm2-360m-instruct
426
+ - switch answered in 24.8 s — `{"requestedModelId":"smollm2-360m-instruct","activeModelId":"smollm2-360m-instruct","granted":true}`
427
+ - eviction — `["Evicted the least recently used model from the cache {modelId: bert-base-uncased-fillmask-edge, cap: 3}"]`
428
+ - runLocal on smollm2-360m-instruct — `{"ms":4815,"queueWaitMs":0,"runtime":"gguf","response":"{\"text\":\"\\nThe capital of France is Paris.\"}"}`
429
+ - registry dispatch → 200 in 4680 ms — `{"output":"\nThe capital of France is Paris.","metadata":{"processingTime":4217,"customParams":{"cust_param1":"","cust_param2":"","cust_param3":""}},"deviceInferenceMs":4217}`
430
+ - observed: orchestrator /v1/chat/completions pinned → 403 device=- in 685 ms; task did not reach this device — `Invalid credentials`
431
+ - JS heap MB after load — `10`
432
+
433
+ | Check | Result | Evidence |
434
+ |---|---|---|
435
+ | granted=true | PASS | `{"requestedModelId":"gemma-3-270m-it","activeModelId":"gemma-3-270m-it","granted":true}` |
436
+ | activeModelId is the requested model | PASS | |
437
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"gemma-3-270m-it","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"gemma-3-270m-it","unfitModels":null,"downloadedModels":["gemma-3…` |
438
+ | activeModelChanged fired for it | PASS | `[{"modelId":"gemma-3-270m-it"}]` |
439
+ | choice remembered on the device | PASS | `gemma-3-270m-it` |
440
+ | cache holds at most 3 models | PASS | `["gemma-3-270m-it\|1","distilbert-squad-edge\|1","bert-base-uncased-fillmask-edge\|1"]` |
441
+ | IndexedDB records match the cap | PASS | `["bert-base-uncased-fillmask-edge:1","distilbert-squad-edge:1","gemma-3-270m-it:1"]` |
442
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["text_generation"],"lists":["reg:geo:cc:RS:gemma-3-270m-it","reg:geo:gemma-3-270m-it","reg:geo:ip:185.26.175.217:gemma-3-270m-it","reg:geo:op:3265aabb-85cd-4be9-95ba-…` |
443
+ | local call succeeded | PASS | |
444
+ | result names the active model, location device | PASS | |
445
+ | response has the expected shape/content | PASS | `{"text":" While France has a long history of political intrigue and a complex history, the capital of France is Paris.\n"}` |
446
+ | device served the network task through its socket (registry device route) | PASS | `6155` |
447
+ | the task result went out on the socket (console) | PASS | |
448
+ | network output has the same content as the local call | PASS | `{"text":" While France has a long history of political intrigue and a complex history, the capital of France is Paris.\n"}` |
449
+ | granted=true | PASS | `{"requestedModelId":"smollm2-360m-instruct","activeModelId":"smollm2-360m-instruct","granted":true}` |
450
+ | activeModelId is the requested model | PASS | |
451
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"smollm2-360m-instruct","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"smollm2-360m-instruct","unfitModels":null,"downloadedModel…` |
452
+ | activeModelChanged fired for it | PASS | `[{"modelId":"smollm2-360m-instruct"}]` |
453
+ | choice remembered on the device | PASS | `smollm2-360m-instruct` |
454
+ | cache holds at most 3 models | PASS | `["smollm2-360m-instruct\|1","gemma-3-270m-it\|1","distilbert-squad-edge\|1"]` |
455
+ | IndexedDB records match the cap | PASS | `["distilbert-squad-edge:1","gemma-3-270m-it:1","smollm2-360m-instruct:1"]` |
456
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["text_generation"],"lists":["reg:geo:cc:RS:smollm2-360m-instruct","reg:geo:ip:185.26.175.217:smollm2-360m-instruct","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:s…` |
457
+ | local call succeeded | PASS | |
458
+ | result names the active model, location device | PASS | |
459
+ | response has the expected shape/content | PASS | `{"text":"\nThe capital of France is Paris."}` |
460
+ | device served the network task through its socket (registry device route) | PASS | `4217` |
461
+ | the task result went out on the socket (console) | PASS | |
462
+ | network output has the same content as the local call | PASS | `{"text":"\nThe capital of France is Paris."}` |
463
+
464
+ ### `busy-guard` — PASS
465
+
466
+ rule 7 / §8: an app call goes to the front; a network task arriving meanwhile is answered device_busy (the registry turns it into a polite 409 and keeps the device listed)
467
+
468
+ - local result — `{"ms":26072,"queueWaitMs":0,"text":"\nTo count from 1 to 200, separated by commas, nothing else, you can use the following code:\n\n```python\nfor i in range(1,…"}`
469
+ - network task during the app call → 409 in 359 ms — `{"error":"busy"}`
470
+
471
+ | Check | Result | Evidence |
472
+ |---|---|---|
473
+ | the app call ran | PASS | |
474
+ | the network task was answered busy (409) instead of waiting behind the app call | PASS | `409` |
475
+ | the device stays listed after the busy answer | PASS | `["reg:geo:cc:RS:smollm2-360m-instruct","reg:geo:ip:185.26.175.217:smollm2-360m-instruct","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:smollm2-360m-instruct","reg:geo:smollm2-360m-instruct"]` |
476
+ | the next network task after the app call is served | PASS | `{"status":200,"ms":6288}` |
477
+
478
+ ### `not-eligible` — PASS
479
+
480
+ rule 3: asking for a model the list marks not eligible is a typed error, nothing changes (an entry made to require 64 GB)
481
+
482
+ - every line is eligible here: the lab entry now requires 64 GB — `[ { result: 1 } ]`
483
+ - llama-3.2-3b (not on the list) — `{"type":"ModelNotEligibleError","code":"model_not_eligible","message":"llama-3.2-3b-instruct-fast is not eligible here: not_offered","modelId":"llama-3.2-3b-instruct-fast","reason":"not_offered"}`
484
+ - entry restored — `[ { result: 1 } ]`
485
+
486
+ | Check | Result | Evidence |
487
+ |---|---|---|
488
+ | the list has a not-eligible line | PASS | `distilbert-sst2-edge: guardrail_blocked` |
489
+ | ModelNotEligibleError with the list reason | PASS | `{"type":"ModelNotEligibleError","code":"model_not_eligible","message":"distilbert-sst2-edge is not eligible here: guardrail_blocked","modelId":"distilbert-sst2-edge","reason":"guardrail_blocked"}` |
490
+ | a model outside the list is refused up front | PASS | |
491
+ | nothing changed | PASS | |
492
+
493
+ ### `not-offered` — PASS
494
+
495
+ rule 3: an unknown identifier is a typed error (not_offered)
496
+
497
+
498
+ | Check | Result | Evidence |
499
+ |---|---|---|
500
+ | ModelNotEligibleError(not_offered) | PASS | `{"type":"ModelNotEligibleError","code":"model_not_eligible","message":"no-such-model is not eligible here: not_offered","modelId":"no-such-model","reason":"not_offered"}` |
501
+
502
+ ### `refused-at-register` — PASS
503
+
504
+ §2.3: the list said eligible, but the registry refuses at register time → default assigned in the same answer, choice cleared, app told why
505
+
506
+ - conditions change behind the list: the entry now requires 64 GB — `[ { result: 1 } ]`
507
+ - switch outcome — `{"requestedModelId":"distilbert-sst2-edge","activeModelId":"deberta-v3-small","granted":false,"reason":"guardrail_blocked"}`
508
+ - entry restored — `[ { result: 1 } ]`
509
+
510
+ | Check | Result | Evidence |
511
+ |---|---|---|
512
+ | target eligible in the fetched list | PASS | |
513
+ | not granted, with the registry reason, in one round trip | PASS | `{"requestedModelId":"distilbert-sst2-edge","activeModelId":"deberta-v3-small","granted":false,"reason":"guardrail_blocked"}` |
514
+ | the default model is active instead | PASS | `deberta-v3-small` |
515
+ | modelChoiceRefused fired | PASS | `[{"modelId":"distilbert-sst2-edge","reason":"guardrail_blocked"}]` |
516
+ | the remembered choice was cleared | PASS | `null` |
517
+
518
+ ### `warmup-fails` — PASS
519
+
520
+ rule 6: a model that passes the registry but cannot be downloaded here (dead URL) is marked unfit with the reason, reported, and the device re-registers at once
521
+
522
+ - switch outcome — `{"requestedModelId":"zlm-dev-broken-url-edge","activeModelId":"deberta-v3-small","granted":false,"reason":"load_failed:init_error:pipeline_load_failed:Could not locate file: \"htt"}`
523
+
524
+ | Check | Result | Evidence |
525
+ |---|---|---|
526
+ | switch failed with the unfit reason | PASS | `{"requestedModelId":"zlm-dev-broken-url-edge","activeModelId":"deberta-v3-small","granted":false,"reason":"load_failed:init_error:pipeline_load_failed:Could not locate file: \"htt"}` |
527
+ | unfit mark written and the device registered again | PASS | `["Model unfit on this device; dropping it and registering again {modelId: zlm-dev-broken-url-edge, modelVersion: 1, reason: load_failed:init_error:pipeline_load_f"]` |
528
+ | cache no longer holds the model | PASS | `{"active":"deberta-v3-small","downloadedModels":["deberta-v3-small\|v1","smollm2-360m-instruct\|1","gemma-3-270m-it\|1"],"disk":{"deberta-v3-small:v1":{"status":"complete","files":4,"bytes":181098615},"gemma-3-270m-it:1":{"…` |
529
+ | contributing again on another model | PASS | `deberta-v3-small` |
530
+ | unfit mark persisted on the device | PASS | `[{"modelId":"zlm-dev-broken-url-edge","modelVersion":"1","reason":"load_failed:init_error:pipeline_load_failed:Could not locate fil","sdkVersion":"0.4.0+8c30cdb","at":1793980395629}]` |
531
+ | eligible list now says device_unfit for it | PASS | `{"modelId":"zlm-dev-broken-url-edge","modelVersion":"1","displayName":"Broken model, dead URL (dev e2e)","taskType":"classification","inferenceKind":"sequence_classification","inferenceFramework":"onnx","sizeBytes":10485…` |
532
+ | switching to it again is refused up front | PASS | `{"type":"ModelNotEligibleError","code":"model_not_eligible","message":"zlm-dev-broken-url-edge is not eligible here: device_unfit","modelId":"zlm-dev-broken-url-edge","reason":"device_unfit"}` |
533
+ | registry record carries the unfit report | PASS | `[{"modelId":"zlm-dev-broken-url-edge","modelVersion":"1","reason":"load_failed:init_error:pipeline_load_failed:Could not locate fil"}]` |
534
+ | forgetUnfitModel makes it eligible again | PASS | `{"modelId":"zlm-dev-broken-url-edge","modelVersion":"1","displayName":"Broken model, dead URL (dev e2e)","taskType":"classification","inferenceKind":"sequence_classification","inferenceFramework":"onnx","sizeBytes":10485…` |
535
+
536
+ ### `offline-online` — FAIL (earlier run, superseded below)
537
+
538
+ ZGA-677: the network goes away and comes back (a laptop waking from sleep); the SDK reconnects on its own without a page reload
539
+
540
+ - network emulated offline
541
+ - the socket dropped while offline
542
+ - state while offline — `{"contributionState":"contributing","activeModelId":"deberta-v3-small","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":null,"unfitModels":null,"downloadedModels":["deberta-v3-small\|v1…`
543
+ - network back
544
+
545
+ | Check | Result | Evidence |
546
+ |---|---|---|
547
+ | contributing again on the same model, no reload | PASS | `{"before":"deberta-v3-small","after":"deberta-v3-small"}` |
548
+ | the SDK re-registered on its own (online fast path or the retry timer) | FAIL | `[]` |
549
+ | a local call runs after the network returned | PASS | `{"ms":434}` |
550
+
551
+ ### `restart` — PASS
552
+
553
+ rule 3: the choice survives a page reload (register carries requestedModelId); the cache is reused; unfit marks survive too
554
+
555
+
556
+ | Check | Result | Evidence |
557
+ |---|---|---|
558
+ | same active model after the reload | PASS | `{"before":"deberta-v3-small","after":"deberta-v3-small"}` |
559
+ | chosen model persisted | PASS | `null` |
560
+ | the model came back from the cache (no download) | PASS | `["Cache verified {cachedModels: Array(3)}","Loading the assigned model from the cache {modelId: deberta-v3-small, cached: true}"]` |
561
+ | register carried requestedModelId (registry record) | PASS | |
562
+
563
+ ### `clear-choice` — PASS
564
+
565
+ clearModelChoice(): the next register takes the default assignment again
566
+
567
+
568
+ | Check | Result | Evidence |
569
+ |---|---|---|
570
+ | back on the default deberta-v3-small | PASS | `deberta-v3-small` |
571
+ | no remembered choice | PASS | `null` |
572
+
573
+ ### `declined` — PASS
574
+
575
+ §2.5: a registry refusal (low battery, not charging) takes local inference away with the registry reason; the eligible list reflects it
576
+
577
+ - battery simulated: 7 %, unplugged (page reloaded with the shim)
578
+ - battery shim removed
579
+
580
+ | Check | Result | Evidence |
581
+ |---|---|---|
582
+ | state declined after the refused register | PASS | `{"contributionState":"declined","activeModelId":null,"status":"error","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":null,"unfitModels":null,"downloadedModels":["deberta-v3-small\|v1","smollm2-360m-inst…` |
583
+ | every line not eligible: low_battery (device_unfit lines keep their verdict) | PASS | `["low_battery"]` |
584
+ | local call → NotContributingError(declined, low_battery) | PASS | `{"type":"NotContributingError","code":"not_contributing_declined","message":"not contributing: declined (low_battery)","state":"declined","registryReason":"low_battery"}` |
585
+ | SDK logged the refusal | PASS | |
586
+ | contributing again once the condition clears | PASS | `deberta-v3-small` |
587
+
588
+ ### `long-input` — PASS
589
+
590
+ rule 7: no fleet input cap on local calls — text above the list's network cap runs locally; only the model's own catalog cap refuses, as a typed error before anything runs
591
+
592
+ - switch deberta-v3-small → zlm-v1-iab-classify-edge
593
+ - switch answered in 7.8 s — `{"requestedModelId":"zlm-v1-iab-classify-edge","activeModelId":"zlm-v1-iab-classify-edge","granted":true}`
594
+ - eviction — `["Evicted the least recently used model from the cache {modelId: gemma-3-270m-it, cap: 3}"]`
595
+ - text of 1270 chars (~318 tokens; the list caps network tasks at 128 tokens, the catalog cap is 400)
596
+ - runLocal on zlm-v1-iab-classify-edge — `{"ms":440,"queueWaitMs":0,"runtime":"onnx","response":"{\"content\|Running and Jogging\":0.8803423419449187,\"audience\|Interest \| Healthy Living \| Running and Jogging \|\":0.8478417264064136,\"content\|Fitness and Exercise\…`
597
+ - text of 5080 chars (~1270 tokens, beyond the catalog cap) — `{"type":"ZeroGpuError","code":"input_too_large","message":"input of about 1270 tokens exceeds the model's cap of 400"}`
598
+ - switch zlm-v1-iab-classify-edge → smollm2-360m-instruct
599
+ - switch answered in 7.4 s — `{"requestedModelId":"smollm2-360m-instruct","activeModelId":"smollm2-360m-instruct","granted":true}`
600
+ - GGUF prompt of 4141 chars (~1035 tokens) on a 4096-token catalog cap
601
+ - runLocal on smollm2-360m-instruct with the long prompt — `{"ms":258054,"text":"\nThe quick brown fox"}`
602
+
603
+ | Check | Result | Evidence |
604
+ |---|---|---|
605
+ | granted=true | PASS | `{"requestedModelId":"zlm-v1-iab-classify-edge","activeModelId":"zlm-v1-iab-classify-edge","granted":true}` |
606
+ | activeModelId is the requested model | PASS | |
607
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"zlm-v1-iab-classify-edge","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"zlm-v1-iab-classify-edge","unfitModels":null,"downloade…` |
608
+ | activeModelChanged fired for it | PASS | `[{"modelId":"zlm-v1-iab-classify-edge"}]` |
609
+ | choice remembered on the device | PASS | `zlm-v1-iab-classify-edge` |
610
+ | cache holds at most 3 models | PASS | `["zlm-v1-iab-classify-edge\|1","deberta-v3-small\|v1","smollm2-360m-instruct\|1"]` |
611
+ | IndexedDB records match the cap | PASS | `["deberta-v3-small:v1","smollm2-360m-instruct:1","zlm-v1-iab-classify-edge:1"]` |
612
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["iab_classify"],"lists":["reg:geo:cc:RS:zlm-v1-iab-classify-edge","reg:geo:ip:185.26.175.217:zlm-v1-iab-classify-edge","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a…` |
613
+ | local call succeeded | PASS | |
614
+ | result names the active model, location device | PASS | |
615
+ | response has the expected shape/content | PASS | `{"content\|Running and Jogging":0.8803423419449187,"audience\|Interest \| Healthy Living \| Running and Jogging \|":0.8478417264064136,"content\|Fitness and Exercise":0.679905748395539,"audience\|Fitness and Exercise":0.6640081…` |
616
+ | local call accepted the input above the network cap | PASS | |
617
+ | beyond the catalog cap: input_too_large before anything runs | PASS | `{"type":"ZeroGpuError","code":"input_too_large","message":"input of about 1270 tokens exceeds the model's cap of 400"}` |
618
+ | granted=true | PASS | `{"requestedModelId":"smollm2-360m-instruct","activeModelId":"smollm2-360m-instruct","granted":true}` |
619
+ | activeModelId is the requested model | PASS | |
620
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"smollm2-360m-instruct","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"smollm2-360m-instruct","unfitModels":null,"downloadedModel…` |
621
+ | activeModelChanged fired for it | PASS | `[{"modelId":"smollm2-360m-instruct"}]` |
622
+ | choice remembered on the device | PASS | `smollm2-360m-instruct` |
623
+ | cache holds at most 3 models | PASS | `["smollm2-360m-instruct\|1","zlm-v1-iab-classify-edge\|1","deberta-v3-small\|v1"]` |
624
+ | IndexedDB records match the cap | PASS | `["deberta-v3-small:v1","smollm2-360m-instruct:1","zlm-v1-iab-classify-edge:1"]` |
625
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["text_generation"],"lists":["reg:geo:cc:RS:smollm2-360m-instruct","reg:geo:ip:185.26.175.217:smollm2-360m-instruct","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:s…` |
626
+ | a prompt far beyond 512 tokens is decoded in one batch | PASS | `{"text":"\nThe quick brown fox"}` |
627
+
628
+ ### `switch-during-task` — FAIL (earlier run, superseded below)
629
+
630
+ §2.3: a switch lets the in-flight network task finish before closing the session
631
+
632
+ - switch smollm2-360m-instruct → smollm2-360m-instruct
633
+ - switch answered in 0.0 s — `{"requestedModelId":"smollm2-360m-instruct","activeModelId":"smollm2-360m-instruct","granted":true}`
634
+ - already the active model: granted at once, no activeModelChanged (nothing changed)
635
+ - network task 200 in 7264 ms — `{"output":"\nThe capital of France is Paris.","metadata":{"processingTime":6768,"customParams":{"cust_param1":"","cust_param2":"","cust_param3":""}},"deviceInferenceMs":6768}`
636
+ - switch — `{"type":"NotContributingError","code":"not_contributing_declined","message":"not contributing: declined (low_battery)","state":"declined","registryReason":"low_battery"}`
637
+ - order in the console (task result sent before the session closed) — `{"taskResultIdx":246,"closeIdx":-1}`
638
+
639
+ | Check | Result | Evidence |
640
+ |---|---|---|
641
+ | granted=true | PASS | `{"requestedModelId":"smollm2-360m-instruct","activeModelId":"smollm2-360m-instruct","granted":true}` |
642
+ | activeModelId is the requested model | PASS | |
643
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"smollm2-360m-instruct","status":"running","deviceId":"1ca0004f-fe5c-4113-acf9-d2ff238c1231","chosenModelId":"smollm2-360m-instruct","unfitModels":null,"downloadedModel…` |
644
+ | choice remembered on the device | PASS | `smollm2-360m-instruct` |
645
+ | cache holds at most 3 models | PASS | `["smollm2-360m-instruct\|1","zlm-v1-iab-classify-edge\|1","deberta-v3-small\|v1"]` |
646
+ | IndexedDB records match the cap | PASS | `["deberta-v3-small:v1","smollm2-360m-instruct:1","zlm-v1-iab-classify-edge:1"]` |
647
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["text_generation"],"lists":["reg:geo:cc:RS:smollm2-360m-instruct","reg:geo:ip:185.26.175.217:smollm2-360m-instruct","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:s…` |
648
+ | the in-flight network task finished and was answered | PASS | ` The capital of France is Paris.` |
649
+ | the result went out before the normal close | FAIL | |
650
+ | switch completed | FAIL | |
651
+
652
+ ### `install` — PASS (earlier run, superseded below)
653
+
654
+ fresh browser context (new device identity, empty cache) on this checkout's dist bundle, against develop
655
+
656
+ - page loaded and the SDK started — `{"status":"running"}`
657
+
658
+ | Check | Result | Evidence |
659
+ |---|---|---|
660
+ | initZeroGpuSdk returned a handle | PASS | |
661
+
662
+ ### `default-register` — PASS (earlier run, superseded below)
663
+
664
+ rule 1: register with the operator key, the registry assigns the default model, warm-up, connect
665
+
666
+ - state — `{"contributionState":"contributing","activeModelId":"deberta-v3-small","status":"running","deviceId":"2ca15e2c-4ee1-4be0-8e4a-77d486e00726","chosenModelId":null,"unfitModels":null,"downloadedModels":["deberta-v3-small\|v1…`
667
+ - JS heap MB — `10`
668
+
669
+ | Check | Result | Evidence |
670
+ |---|---|---|
671
+ | default assignment is deberta-v3-small (or the remembered choice) | PASS | `deberta-v3-small` |
672
+ | warm-up sample passed before hello | PASS | `["Post-register sample ok {taskType: classification, ok: true, error: false, errorMessage: undefined, processingTimeMs: 660}"]` |
673
+ | SDK ready (session open) | PASS | |
674
+ | registry record: browser, listed under the active model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["classification"],"lists":["reg:geo:cc:RS:deberta-v3-small","reg:geo:deberta-v3-small","reg:geo:ip:185.26.175.217:deberta-v3-small","reg:geo:op:3265aabb-85cd-4be9-95b…` |
675
+ | device is in a ready list of its model | PASS | `["reg:geo:cc:RS:deberta-v3-small","reg:geo:deberta-v3-small","reg:geo:ip:185.26.175.217:deberta-v3-small","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:deberta-v3-small"]` |
676
+
677
+ ### `eligible` — PASS (earlier run, superseded below)
678
+
679
+ rule 2: the eligible list judges every entry of the browser list; downloaded/active merged by the SDK
680
+
681
+ - lines: 15 — `["OK deberta-v3-small zero_shot_classification/onnx 193MB cap=400 dl=true active=true","OK zlm-v1-iab-classify-edge sequence_classification/onnx 25MB cap=400 dl=false active=false","OK zlm-v1-moderation-edge sequence_c…`
682
+ - not eligible on this device — `[]`
683
+
684
+ | Check | Result | Evidence |
685
+ |---|---|---|
686
+ | eligibleModels() answered | PASS | |
687
+ | the whole browser list is judged (not just the first fit) | PASS | `15` |
688
+ | every line carries kind, framework, size and catalog cap | PASS | |
689
+ | the active model is marked active + downloaded + eligible | PASS | `deberta-v3-small` |
690
+ | most models are eligible on this machine | PASS | `15` |
691
+
692
+ ### `offline-online` — PASS
693
+
694
+ ZGA-677: the laptop sleeps — the session dies without a close handshake while the network is away — and wakes; the SDK reconnects on its own, at once when the network returns, without a page reload
695
+
696
+ - network emulated offline
697
+ - live socket killed without a handshake (1006): 1 open socket(s)
698
+ - a retry ran while offline and failed
699
+ - network back
700
+ - the online fast path reconnected before the retry timer
701
+
702
+ | Check | Result | Evidence |
703
+ |---|---|---|
704
+ | the SDK scheduled a reconnect | PASS | `["Scheduling re-registration {reason: socket_closed, delayMs: 1304, attempt: 0}"]` |
705
+ | not contributing while the session is down | PASS | `registering` |
706
+ | a local call while down is a typed not-contributing error | PASS | `{"type":"NotContributingError","code":"not_contributing_registering","message":"not contributing: registering","state":"registering"}` |
707
+ | contributing again on the same model, no reload | PASS | `{"before":"deberta-v3-small","after":"deberta-v3-small"}` |
708
+ | the SDK re-registered on its own (online fast path or the retry timer) | PASS | `["Network is back; re-registering now"]` |
709
+ | the loaded model was reused (no reload, no re-download) | PASS | |
710
+ | a local call runs after the network returned | PASS | `{"ms":479}` |
711
+
712
+ ### `install` — PASS
713
+
714
+ fresh browser context (new device identity, empty cache) on this checkout's dist bundle, against develop
715
+
716
+ - page loaded and the SDK started — `{"status":"running"}`
717
+
718
+ | Check | Result | Evidence |
719
+ |---|---|---|
720
+ | initZeroGpuSdk returned a handle | PASS | |
721
+
722
+ ### `default-register` — PASS
723
+
724
+ rule 1: register with the operator key, the registry assigns the default model, warm-up, connect
725
+
726
+ - state — `{"contributionState":"contributing","activeModelId":"deberta-v3-small","status":"running","deviceId":"3ff31177-a788-4d6f-a73a-53d4e089657e","chosenModelId":null,"unfitModels":null,"downloadedModels":["deberta-v3-small\|v1…`
727
+ - JS heap MB — `10`
728
+
729
+ | Check | Result | Evidence |
730
+ |---|---|---|
731
+ | default assignment is deberta-v3-small (or the remembered choice) | PASS | `deberta-v3-small` |
732
+ | warm-up sample passed before hello | PASS | `["Post-register sample ok {taskType: classification, ok: true, error: false, errorMessage: undefined, processingTimeMs: 677}"]` |
733
+ | SDK ready (session open) | PASS | |
734
+ | registry record: browser, listed under the active model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["classification"],"lists":["reg:geo:cc:RS:deberta-v3-small","reg:geo:deberta-v3-small","reg:geo:ip:185.26.175.217:deberta-v3-small","reg:geo:op:3265aabb-85cd-4be9-95b…` |
735
+ | device is in a ready list of its model | PASS | `["reg:geo:cc:RS:deberta-v3-small","reg:geo:deberta-v3-small","reg:geo:ip:185.26.175.217:deberta-v3-small","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:deberta-v3-small"]` |
736
+
737
+ ### `eligible` — PASS
738
+
739
+ rule 2: the eligible list judges every entry of the browser list; downloaded/active merged by the SDK
740
+
741
+ - lines: 15 — `["OK deberta-v3-small zero_shot_classification/onnx 193MB cap=400 dl=true active=true","OK zlm-v1-iab-classify-edge sequence_classification/onnx 25MB cap=400 dl=false active=false","OK zlm-v1-moderation-edge sequence_c…`
742
+ - not eligible on this device — `[]`
743
+
744
+ | Check | Result | Evidence |
745
+ |---|---|---|
746
+ | eligibleModels() answered | PASS | |
747
+ | the whole browser list is judged (not just the first fit) | PASS | `15` |
748
+ | every line carries kind, framework, size and catalog cap | PASS | |
749
+ | the active model is marked active + downloaded + eligible | PASS | `deberta-v3-small` |
750
+ | most models are eligible on this machine | PASS | `15` |
751
+
752
+ ### `switch-during-task` — PASS
753
+
754
+ §2.3: a switch lets the in-flight network task finish before closing the session
755
+
756
+ - switch deberta-v3-small → smollm2-360m-instruct
757
+ - switch answered in 25.5 s — `{"requestedModelId":"smollm2-360m-instruct","activeModelId":"smollm2-360m-instruct","granted":true}`
758
+ - network task 200 in 7406 ms — `{"output":"\nThe capital of France is Paris.","metadata":{"processingTime":6902,"customParams":{"cust_param1":"","cust_param2":"","cust_param3":""}},"deviceInferenceMs":6902}`
759
+ - switch — `{"requestedModelId":"deberta-v3-small","activeModelId":"deberta-v3-small","granted":true}`
760
+ - order in the console (task result sent before the session was closed for the switch) — `{"taskResultIdx":246,"switchRestartIdx":541}`
761
+
762
+ | Check | Result | Evidence |
763
+ |---|---|---|
764
+ | granted=true | PASS | `{"requestedModelId":"smollm2-360m-instruct","activeModelId":"smollm2-360m-instruct","granted":true}` |
765
+ | activeModelId is the requested model | PASS | |
766
+ | state contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"smollm2-360m-instruct","status":"running","deviceId":"3ff31177-a788-4d6f-a73a-53d4e089657e","chosenModelId":"smollm2-360m-instruct","unfitModels":null,"downloadedModel…` |
767
+ | activeModelChanged fired for it | PASS | `[{"modelId":"smollm2-360m-instruct"}]` |
768
+ | choice remembered on the device | PASS | `smollm2-360m-instruct` |
769
+ | cache holds at most 3 models | PASS | `["smollm2-360m-instruct\|1","deberta-v3-small\|v1"]` |
770
+ | IndexedDB records match the cap | PASS | `["deberta-v3-small:v1","smollm2-360m-instruct:1"]` |
771
+ | registry record lists the device under the model | PASS | `{"status":"idle","edgeSdkType":"browser","taskTypes":["text_generation"],"lists":["reg:geo:cc:RS:smollm2-360m-instruct","reg:geo:ip:185.26.175.217:smollm2-360m-instruct","reg:geo:op:3265aabb-85cd-4be9-95ba-a102749727a6:s…` |
772
+ | the in-flight network task finished and was answered | PASS | ` The capital of France is Paris.` |
773
+ | the result went out before the normal close | PASS | |
774
+ | switch completed | PASS | |
775
+
776
+ ### `ext-register` — PASS
777
+
778
+ the fixture extension (scaffold shape, vendored bundle) registers from its offscreen document as chrome-extension on develop, downloads the default model, contributes
779
+
780
+ - contribution (through the service worker) — `{"contributionState":"contributing","activeModelId":"deberta-v3-small","status":"running","deviceId":"110007b4-e1b1-405e-b1be-4d72ed8ea277"}`
781
+
782
+ | Check | Result | Evidence |
783
+ |---|---|---|
784
+ | contributing on the default deberta-v3-small | PASS | `deberta-v3-small` |
785
+ | registry record: chrome-extension, listed under the active model | PASS | `{"status":"idle","edgeSdkType":"chrome-extension","taskTypes":["classification"],"models":["cc:RS:deberta-v3-small","deberta-v3-small","ip:185.26.175.217:deberta-v3-small"],"cached":["deberta-v3-small"],"sdkVersion":"0.4…` |
786
+ | the service worker heard activeModelChanged (broadcast from the offscreen document) | PASS | `[{"at":1793980960032,"event":"activeModelChanged","detail":{"modelId":"deberta-v3-small"}}]` |
787
+
788
+ ### `ext-eligible` — PASS
789
+
790
+ ZeroGpuBackground.getZeroGpuEligibleModels(): the chrome-extension list judged for this device
791
+
792
+ - lines: 15 — `["OK deberta-v3-small zero_shot_classification dl=true active=true","OK zlm-v1-iab-classify-edge sequence_classification dl=false active=false","OK zlm-v1-moderation-edge sequence_classification dl=false active=false"…`
793
+
794
+ | Check | Result | Evidence |
795
+ |---|---|---|
796
+ | answered | PASS | |
797
+ | the whole list is judged | PASS | `15` |
798
+ | the active model is marked active + downloaded + eligible | PASS | |
799
+
800
+ ### `ext-local` — PASS
801
+
802
+ ZeroGpuBackground.runZeroGpuLocal(): a local call on the active model, answered over the message boundary
803
+
804
+ - runLocal on deberta-v3-small — `{"ms":386,"queueWaitMs":0,"response":"{\"Economy\":0.5013316113052586,\"Travel\":0.2640736842023389,\"Sports\":0.13311052914262142,\"Cooking\":0.10148417534978092}"}`
805
+
806
+ | Check | Result | Evidence |
807
+ |---|---|---|
808
+ | ran on this device on the active model | PASS | |
809
+ | response has the expected content | PASS | `{"Economy":0.5013316113052586,"Travel":0.2640736842023389,"Sports":0.13311052914262142,"Cooking":0.10148417534978092}` |
810
+
811
+ ### `ext-switch` — PASS
812
+
813
+ ZeroGpuBackground.switchZeroGpuModel(): download, warm-up, reconnect under the new model; local call on it; choice remembered
814
+
815
+ - switch answered in 4.6 s — `{"requestedModelId":"zlm-v1-iab-classify-edge","activeModelId":"zlm-v1-iab-classify-edge","granted":true}`
816
+ - runLocal on the new model — `{"ms":32,"response":"{\"content\|Sports\":0.8960159874521612,\"content\|Running and Jogging\":0.8078519314010332,\"audience\|Sports\":0.7733025185554885,\"content\|Fitness and Exercise\":0.766105656054488,\"audience\|Interest…`
817
+
818
+ | Check | Result | Evidence |
819
+ |---|---|---|
820
+ | granted, active model is the requested one | PASS | |
821
+ | contributing on the new model | PASS | `{"contributionState":"contributing","activeModelId":"zlm-v1-iab-classify-edge","status":"running","deviceId":"110007b4-e1b1-405e-b1be-4d72ed8ea277"}` |
822
+ | activeModelChanged for it reached the service worker | PASS | `[{"at":1793980969645,"event":"activeModelChanged","detail":{"modelId":"zlm-v1-iab-classify-edge"}}]` |
823
+ | registry lists the device under the model; register carried requestedModelId | PASS | `{"status":"idle","edgeSdkType":"chrome-extension","taskTypes":["iab_classify"],"models":["cc:RS:zlm-v1-iab-classify-edge","ip:185.26.175.217:zlm-v1-iab-classify-edge","zlm-v1-iab-classify-edge"],"cached":["zlm-v1-iab-cla…` |
824
+ | local call on the new model has the expected content | PASS | |
825
+
826
+ ### `ext-network` — PASS
827
+
828
+ the extension device keeps serving the network: a task dispatched through the registry
829
+
830
+ - registry dispatch → 200 in 493 ms — `{"output":{"content\|Sports":0.8960159874521612,"content\|Running and Jogging":0.8078519314010332,"audience\|Sports":0.7733025185554885,"content\|Fitness and Exercise":0.766105656054488,"audience\|Interest \| Healthy Living \| …`
831
+
832
+ | Check | Result | Evidence |
833
+ |---|---|---|
834
+ | device served the network task through its socket | PASS | `31` |
835
+
836
+ ### `ext-not-offered` — PASS
837
+
838
+ a typed error crosses the message boundary intact
839
+
840
+
841
+ | Check | Result | Evidence |
842
+ |---|---|---|
843
+ | ModelNotEligibleError(not_offered) rebuilt in the service worker | PASS | `{"code":"model_not_eligible","message":"no-such-model is not eligible here: not_offered","modelId":"no-such-model","reason":"not_offered","name":"ModelNotEligibleError"}` |
844
+
845
+ ### `ext-clear-choice` — PASS
846
+
847
+ ZeroGpuBackground.clearZeroGpuModelChoice(), then the offscreen document is recreated (opt-out / opt-in): the default model again
848
+
849
+
850
+ | Check | Result | Evidence |
851
+ |---|---|---|
852
+ | choice cleared | PASS | |
853
+ | opted out: stopped (no offscreen document) | PASS | `{"contributionState":"stopped","activeModelId":null,"status":"shutdown","deviceId":null}` |
854
+ | back on the default deberta-v3-small | PASS | `deberta-v3-small` |
855
+