Repository navigation
What changed
Lines already in the target language are no longer re-translated. A French page translated to English was sending its English bubbles to the model and then spending recovery requests when they came back unchanged — because a verbatim return cannot be told apart from a failure after the fact. A per-line language oracle now runs before dispatch, so those lines never reach the prompt.
Measured, 2 French + 2 English lines, fr → en:
| recovery requests | lines sent | page time | |
|---|---|---|---|
| before | 4 | 4 | 10 051 ms |
| after | 1 | 2 | 5 354 ms |
The oracle may only make the pipeline skip work: it never rejects a translation, never marks a page untranslated, never reaches the prompt. Measured precision: 22/22 English lines skipped with 0 false skips once bubbles under 4 Latin letters are excluded (those were the only miss — Yes and Ah are too short to classify).
The prompt no longer asserts a source language the pipeline guessed. A Chinese manhua with katakana sound effects measures a 0.375 kana share and resolved as ja, then told the model "from Japanese". Only a source you pin reaches the prompt now. Honest result: no measurable quality difference either way (59 auto runs vs 42 pinned, Welch t = 0.18), shipped because it stops the pipeline claiming what it does not know.
The translation gate was failing the reference build. It compared against one recorded sample of a stochastic model. auto-vi-zh measures 2–11 of 36 slots across twelve runs of identical code, so the baseline now stores a measured band and a combo fails only by exceeding the worst run the reference ever produced. Verified it still catches a real regression by injecting 30/36.
The storage meter was under-reporting by one image per page. Three full-page images are stored per job; the meter summed two, and the missing one (the delivered page) is usually the largest.
Verification
- 1 663 tests / 141 files;
docs:check880 delta +0 with 0 shape violations; lint exit 0; build clean;npm run gate:translationpassed. - Extension loads: smoke 6/6 PASS, including a storage write past the 10 MB default quota.
- The 4.6 MB language-detection chunk is loaded by dynamic
import(), only on mostly-Latin pages, only when a Latin target is requested — it never enters the popup or content-script bundle, and contains noeval/new Function(MV3 CSP safe).
Known limitations
See docs/development/known-limitations.md — now a measured document rather than a memory. It records, with numbers: short lines at 1–3 failed of 16 on the reference band, only 0.1 % of 1 187 measured pages sitting in the band the escalation rule refuses, ~55 unmeasured target languages, and the balloon-split question still open.
Install
Download kites-v1.5.2.zip, unzip, and load the folder via chrome://extensions → Developer mode → Load unpacked.