Skip to content

Document Chromium's private-mode Cache Storage entry limit - #1851

Closed
leehack wants to merge 1 commit into
mainfrom
lane6-1675-cache-put-private-mode
Closed

leehack wants to merge 1 commit into
mainfrom
lane6-1675-cache-put-private-mode

Conversation

@leehack

@leehack leehack commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Root cause of Diagnose browser Cache.put internal errors observed in Web QA #1675: Chromium keeps Cache Storage in memory for Incognito and other off-the-record profiles, and that in-memory store rejects any entry of 256 MiB or more with UnknownError: Failed to execute 'put' on 'Cache': Unexpected internal error. Web QA smokes open browser.new_context(), which is such a profile, and they load models larger than 256 MiB. Persistent profiles store the same bodies.
  • The bridge already handles the rejection correctly: model_cache_state is store_failed, no entry is written, the model still loads, and there are no page errors. No runtime change is needed. This PR documents the limit in doc/webgpu_bridge.md and on the website WebGPU bridge page.

Production-readiness scope

  • User-facing scope: docs explain why an Incognito or Playwright-context Web app logs Model was not cached and fetches a model again on every load.
  • Supported platforms/paths: docs only (Web bridge model cache).
  • Unsupported or intentionally unavailable paths: in Chromium off-the-record profiles, model caching is unavailable for entries of 256 MiB or more. The load still succeeds without the cache.
  • Out of scope / follow-ups: None. LiteRT-LM Web model caching was not examined.

Completeness checklist

  • Declared scope is fully implemented, or explicitly reduced above.
  • Unsupported platform/option combinations fail loudly with actionable diagnostics or are clearly documented as unavailable.
  • Public API docs, README/website docs, examples, support matrices, and changelog entries are updated where relevant. (Docs clarification only, no behavior change, so no changelog bullet.)
  • Regression coverage covers the original issue plus key negative/version-skew paths where relevant. (Docs-only. The deterministic browser repro is below.)
  • Public capability changes update the validation coverage registry with a pack or a reasoned, issue-linked exemption; inventory checks pass (or N/A with scope). N/A: no capability change.
  • Security/privacy review completed: no secrets, bearer tokens, signed URLs, or raw secret-bearing paths leak through logs, cache keys, metadata, errors, or snapshots.
  • Follow-up work that is useful but not required for this PR is tracked in GitHub Issues, or explicitly marked "None" above.

PR type guidance

  • Docs-only PR: no runtime behavior changes. The two Markdown files were validated with the Markdown-selected root suites.

Test Plan

  • dart run tool/prepare_workspace.dart
  • dart format --output=none --set-exit-if-changed . N/A: no Dart changes.
  • dart analyze N/A: no Dart changes.
  • dart test -p vm -j 1 --exclude-tags local-only N/A: docs-only. Ran the tool/ci/markdown_test_suites.txt suites instead: 729 passed, 4 skipped.
  • dart test -p chrome --exclude-tags local-only N/A: docs-only.
  • coverage-lib matrix row when lib/ behavior changes. N/A: no lib/ change.
  • Other targeted/local-only validation: the deterministic browser repro below. Docs site build not run: the website edit adds no links.

Matrix Evidence

Matrix row Scope covered Platform / model / backend Result Evidence / notes
Cache.put size probe (ad hoc, not a matrix row) fetch response then cache.put at 255/256/600/1024/1100 MiB, ephemeral vs persistent Playwright Chromium 149.0.7827.55 and Chrome 157.0.8103.38, macOS Ephemeral: 255 MiB stored; ≥ 256 MiB rejected UnknownError … Unexpected internal error. Persistent: all sizes stored and matched llamadart-evidence/issue-1675-lane6/probe-fetch.jsonl
Bridge cache probe (ad hoc) bridge v0.1.83 wasm32 loadModelFromUrl(useCache: true), worker and direct Chromium 149, LFM3-Audio-2B Q4_K_M (1,099,626,016 B) Ephemeral: load OK, store_failed, 0 entries, exact warning, no page errors. Persistent: stored, then hit bridge-probe-v0183-lfm3.jsonl

Review Notes

  • Independent review status: N/A: standard-risk docs-only change.
  • CI status / head SHA: green at 275e8229d3030086a6a5db0b4f06a5b785c4a21a (9 pass, 20 skipped by path selection).

High-risk regression review

  • Classification: standard
  • Implementation task: N/A
  • Independent blocking QA task: N/A
  • Exact head / current base: N/A
  • Production-branch deletion, bypass, or miswire proof: N/A
  • Affected-family real-model/artifact evidence: N/A
  • Explicit unavailable-family or other N/A evidence: N/A
  • Known PR-caused P1 regressions: 0
  • Unresolved review threads: 0

Fixes #1675
Refs #1845

Incognito and other off-the-record Chromium profiles keep Cache Storage in
memory and reject entries of 256 MiB or more with an internal error, so the
bridge logs 'Model was not cached' and refetches larger models on each load.

Fixes #1675
Refs #1845
@leehack

leehack commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Landed through the 0.19.2 batch integration PR #1870 (rebase merge, one commit per constituent; this PR's pinned head was audited/CI-gated there).

@leehack leehack closed this Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Chat app preview removed for leehack/llamadart-chat-pr-1851.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Diagnose browser Cache.put internal errors observed in Web QA

1 participant