Skip to content

Return the LiteRT-LM Web executor context limit from getContextSize - #1901

Closed
leehack wants to merge 1 commit into
mainfrom
lane-1861b
Closed

leehack wants to merge 1 commit into
mainfrom
lane-1861b

Conversation

@leehack

@leehack leehack commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Summary

Production-readiness scope

  • User-facing scope: engine.getContextSize() on LiteRT-LM Web withTextHistory() loads reports the enforced limit.
  • Supported platforms/paths: LiteRT-LM Web. Native and other backends untouched.
  • Unsupported or intentionally unavailable paths: runtimes without the probe keep returning the requested size.
  • Out of scope / follow-ups: None.

Completeness checklist

  • Declared scope is fully implemented.
  • Unsupported platform/option combinations: unchanged fallback.
  • Changelog (CHANGELOG.md and website recent-releases) updated; no skills or support-matrix claim changes.
  • Regression coverage: new browser test, failing before the fix (expected 4096, got 65536), plus the unprobed fallback case.
  • Validation coverage registry: N/A, no capability change.
  • Security/privacy review: no secrets involved.
  • Follow-ups: None.

PR type guidance

  • Bugfix PR: root cause is getContextSize reading the requested ModelParams.contextSize while the executor enforces its own clamped copy; regression test above; affected platform is LiteRT-LM Web.

Test Plan

  • dart format --output=none --set-exit-if-changed .
  • dart test -p chrome test/unit/backends/litert_lm/litert_lm_backend_web_test.dart (172 passed)
  • coverage-lib: N/A, the file is Web-only and not in VM coverage

Matrix Evidence

Matrix row Scope covered Platform / model / backend Result Evidence / notes
static-format-analyze format macOS PASS
root-chrome LiteRT-LM Web backend suite Chrome, fake @litert-lm/core engine PASS
high-risk-exact-head-independent-qa N/A pending, draft

Review Notes

  • Independent review status: pending; draft until audited
  • CI status / head SHA: see checks

High-risk regression review

  • Classification: high-risk (backendRuntime)
  • Implementation task: lane 1861b (this branch)
  • Independent blocking QA task: pending
  • Exact head / current base: pending
  • Production-branch deletion, bypass, or miswire proof: reverting the _reportedContextTokens ?? term fails the new test (4096 expected, 65536 returned)
  • Affected-family real-model/artifact evidence: N/A, no Web hardware run; fake engine only. The real-model litert-lm-web-truncation scenario was not re-run.
  • Explicit unavailable-family or other N/A evidence: real LiteRT-LM Web model run unavailable here
  • Known PR-caused P1 regressions: 0
  • Unresolved review threads: 0

@leehack

leehack commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Landed via batch integration PR #1912 (rebase merge, main 2cfb936). The integration audit passed at a9c7772, and this PR's audited head is recorded in #1912's constituent table.

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

Copy link
Copy Markdown
Contributor

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

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.

1 participant