vomebook commited on
Commit
cef0553
·
1 Parent(s): 322e6f5

docs: record Reader recovery release and passing test recheck

Browse files
Files changed (1) hide show
  1. READER_PROXY_REPORT.md +558 -0
READER_PROXY_REPORT.md ADDED
@@ -0,0 +1,558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Reader Proxy Verification
2
+
3
+ ## Production Observation (2026-10-09)
4
+
5
+ A read-only Chromium run opened Reader ID `398vk0yyy8m29` against
6
+ `https://voiceofml-search.hf.space`, with Service Workers blocked. The deployed
7
+ shell referenced `reader.7ca58a33e4eb.js?reader-v3`; that bundle contained the
8
+ preparation surface. The book resolved to its original PDF without a page stream.
9
+
10
+ The first page rendered in 35.328 seconds and Reader reported 669 pages. There
11
+ were no page errors or visible Reader errors. All document requests used
12
+ `/api/reader-content`; none used `/api/reader-cdn`.
13
+
14
+ | Request | Status | Request Start (ms) | Response Headers (ms) |
15
+ | --- | --- | --- | --- |
16
+ | Initial GET, no Range | 200, cancelled by PDF.js | 4857 | 6689 |
17
+ | bytes=0-262143 | 206 | 6690 | 19810 |
18
+ | bytes=31457280-31691722 | 206 | 19845 | 23268 |
19
+ | bytes=31195136-31457279 | 206 | 26725 | 27223 |
20
+ | bytes=262144-524287 | 206 | 27300 | 34780 |
21
+
22
+ These timings describe one device/network run against the deployed version,
23
+ not a performance guarantee or acceptance of the local changes below.
24
+
25
+ ## Local Verification
26
+
27
+ The working tree's PDF bucket delivery reuses streaming document validation,
28
+ range caching, cancellation and upstream-resource ownership. Initial PDF GETs
29
+ and HEADs do not wait for a whole-object filesystem read. Completed small ranges
30
+ are reusable, but incomplete bodies are not cached. Redirect-cache hits retain
31
+ their original expiry rather than renewing signed URLs on each range request.
32
+
33
+ Verified commands:
34
+
35
+ ```bash
36
+ python3 -B -m unittest tests.test_async_proxy tests.test_upstream_http tests.test_proxy_ownership -q
37
+ python3 -B -m unittest tests.test_reader_pdf_loading.PdfLoadingTests.test_cold_success_uses_one_module_request tests.test_reader_pdf_loading.PdfLoadingTests.test_large_original_pdf_renders_using_bounded_ranges_and_stops_transfer tests.test_reader_pdf_loading.PdfLoadingTests.test_proxy_failure_reuses_prepared_worker_for_original_source -v
38
+ node tests/test_reader_request_manager.js
39
+ ```
40
+
41
+ The previously failing migration fixtures have been updated to the current v2
42
+ bucket paths and the intentional absence of retired-dataset fallback. The
43
+ backend/API/static verification command now passes; both projects' Reader
44
+ architecture and regression contracts also pass. Legal v2 converted PDF paths
45
+ are accepted by the sidecar parser and all v2 primary assets use the proxy.
46
+ These checks do not establish production timing or complete OCR/page-stream
47
+ coverage.
48
+
49
+ ## Release Acceptance (2026-10-09)
50
+
51
+ - HF final revision: `46fa98c5082048892f1f61e62134b7e2c29a179e`, runtime RUNNING.
52
+ - Pages final revision: `2ec14e08a01bd1bc01e478004e9ec2528d74a8f8`; deployment
53
+ workflow `37877483552` succeeded.
54
+ - HF's four production smoke cases and the GitHub Pages/API production smoke
55
+ passed after the final release.
56
+ - Actual Chromium with active Service Workers rendered original and converted
57
+ PDFs on both sites; canvas pixels were nonblank, no page errors were observed,
58
+ no CDN requests occurred, and page tops stayed within the reading viewport.
59
+ HF page-10 navigation also rendered successfully.
60
+ - An earlier, colder run measured 18.600/13.212 seconds for original PDF opens
61
+ on HF/Pages and 12.007/48.984 seconds for converted PDF opens. A later repeat
62
+ with warm upstream ranges measured 4.926/5.470 and 4.435/3.950 seconds
63
+ respectively. These are single environment-specific observations, not an
64
+ A/B speedup estimate or a cold-start guarantee.
65
+ - The 73,508,988-byte migrated PDF now returns a correct 262,144-byte 206 range
66
+ through production. Its earlier local full-first-page attempt required many
67
+ tail ranges and did not render within 45 seconds. That large-file cold-load
68
+ limitation remains outside this release's performance acceptance.
69
+ - Local validation included 247 offline Python cases, both Reader architecture
70
+ and regression contracts, 12 Pages PDF browser cases, and both content-hashed
71
+ release build gates. Position-specific browser checks cover the viewport-top
72
+ correction and saved-page restoration.
73
+ - The final push's full informational Pages Reader suite (`37877483446`) ran
74
+ 72 cases with one failure and 14 errors, although the required chapter gates
75
+ and syntax checks passed. This suite is not accepted as all-green. The old
76
+ bucket-image test expects nested `/api/reader-content` and two chapter
77
+ fixtures still use retired `ebook-chapters/` paths; other HTML/PDF preparation
78
+ timeouts are not all classified. The PDF-download and native-spreadsheet
79
+ failures were rerun individually locally and passed. Required deployment
80
+ success does not override these residual verification gaps.
81
+
82
+ ## Reader CI Repair (2026-10-09)
83
+
84
+ The informational-suite failures above are resolved by HF revision
85
+ `11bfc3034a69be3c13d22ca2ec04b06fd59898de` and Pages revision
86
+ `1ce07dddc4aa48095d09881572b1cfdf37b8b722`.
87
+
88
+ - Both jobs now prepare SHA-256-verified pinned Reader engines before browser
89
+ tests. Fresh checkouts previously lacked PDF.js and DOMPurify files, which
90
+ caused preparation timeouts despite passing local runs with existing vendors.
91
+ - Pages fixtures use current v2 chapter paths and direct external bucket proxy
92
+ requests. The HF skipped chapter test now verifies invalid-position failure,
93
+ preserved history, and subsequent successful chapter restoration.
94
+ - Native PDF vertical selection measures attached glyph layout instead of
95
+ assuming identical advances for Han glyphs and spaces across Linux fonts.
96
+ This does not change OCR generation or page-stream publication.
97
+ - Full-suite `continue-on-error` was removed. CI run `37879583504` completed
98
+ successfully on both jobs: HF 71 tests in 86.269 seconds and Pages 72 tests
99
+ in 75.897 seconds, with no failures, errors or skips. The separate chapter
100
+ gates passed as well. Local full runs used the CI-pinned Playwright 1.63.0.
101
+ - Pages deployment run `37879583498` succeeded; HF reports the new revision as
102
+ RUNNING. All four HF production smoke cases and Pages/API live smoke passed
103
+ after deployment. The earlier large-PDF cold-load limitation is not resolved
104
+ by this test-system repair.
105
+
106
+ CI: https://github.com/vomebook/search/actions/runs/37879583504
107
+
108
+ ## Request Ownership Review (2026-10-09)
109
+
110
+ - HF revision `2cbf1f48b0617315068a4a70097da66f5a91c45a` and Pages revision
111
+ `bbe4e021aec7e57905f1cb90bc9cb44ed2f51ce8` were published and accepted.
112
+ - Request sharing is restricted to string-URL plain GETs with matching
113
+ deadlines. Range, method, validator, credentials and caller-signal variants
114
+ are independent. Caller cancellation remains effective through body reads,
115
+ and abort listeners are removed at settlement.
116
+ - Existing v2 bucket PDF/document source links are mapped to each site's proxy.
117
+ Both canonical v2 bucket origins are accepted by the backend route. Pages
118
+ source validation now accepts legal reader-assets-v2 links as well as
119
+ pdf-pages-v2, while rejecting source credentials and fragments.
120
+ - Bucket filesystem workers retain semaphore ownership until their threads
121
+ finish, including shutdown cancellation; shutdown drains owned workers.
122
+ Current v2 chapter manifests and complete search-index assets enter the
123
+ existing bounded cache. A deterministic regression confirms repeat reads
124
+ use one filesystem read; no production latency improvement is inferred.
125
+ - Native-text layout batching was benchmarked but not retained: 1,000 text
126
+ runs (800 vertical), six measured rounds, median 38.40 ms baseline versus
127
+ 38.55 ms candidate on this device, with identical vertical geometry.
128
+ - A flaky first-page text-cache test now uses a single-page document so
129
+ unrelated speculative page extraction cannot change its global counter.
130
+ - Required CI `37882919115` passed: Pages 13 PDF-loading and 72 full Reader
131
+ cases; HF 19 PDF-loading and 71 full Reader cases. Request-manager contracts
132
+ and chapter gates also passed. Pages deployment `37882919327` succeeded.
133
+ - Production smoke passed on both sites. Active-SW Chromium rendered original
134
+ PDFs and old bucket-source converted PDFs on desktop/mobile with nonblank
135
+ canvases, no page errors, unclipped page tops and proxy request traces. HF
136
+ page-10 navigation passed. First-page observations ranged 8.630-9.350 s in
137
+ this run, not an A/B speedup or cold-start guarantee.
138
+
139
+ CI: https://github.com/vomebook/search/actions/runs/37882919115
140
+
141
+ ## Native PDF Text Reuse (2026-10-09)
142
+
143
+ - HF revision `33faec5da8db0b2dec009292328b34b1ab807e7a` is RUNNING;
144
+ Pages revision `872dca863e623ce64f360b9a85ce154bdeaa0b39` is deployed.
145
+ - Native page rendering and full-text search share pending PDF.js extraction
146
+ and reuse the existing 4 MiB page-text cache. Search retains its separate
147
+ bounded normalized-text cache. Failed extraction is retryable; disposal
148
+ releases pending ownership, and cancelled search cannot publish late results.
149
+ No full-book structured-text cache or extra background extraction is added.
150
+ - Full-book scanning normalizes strings without building unused per-character
151
+ offset arrays. Highlighting still builds the original mapping. Han spacing,
152
+ punctuation, Latin spaces and supplementary characters retain the same rules.
153
+ - Before/after browser regressions showed two extraction calls for a rendered
154
+ page's first search becoming one, and three calls during rendering plus two
155
+ successive searches becoming one. Five alternating Chromium rounds with a
156
+ deliberately 200 ms extraction fixture measured median 200.9 ms versus
157
+ 0.5 ms for first-search text loading. These are controlled fixture results,
158
+ not whole-book or production speedup claims.
159
+ - Chromium normalization medians for 100,000 Latin code units were 0.85 ms
160
+ versus below timer resolution; for 88,000 mixed Han code units, 4.74 ms
161
+ versus 3.20 ms. Node's separate heap-allocation probe measured about
162
+ 2.76 MB versus 520 bytes for Latin, and 5.53 MB versus 0.93 MB for Han.
163
+ Those allocation observations are engine-specific, not retained-heap limits.
164
+ - A Pages progressive-search regression now holds the last page explicitly,
165
+ instead of relying on repeated extraction delays to observe disabled paging.
166
+ Cache-miss tests clear both existing caches to verify actual re-extraction.
167
+ - Required CI `37908271544` passed: Pages 75 full Reader and 13 PDF-loading
168
+ cases, HF 74 full Reader and 19 PDF-loading cases, plus both chapter gates
169
+ and request-manager contracts. Pages deployment `37908271625` succeeded.
170
+ Local full browser suites, normalization contracts and release gates passed.
171
+ - Both production smoke suites passed. Active-SW Chromium rendered the real
172
+ 42,477-byte, six-page `Understanding the New Terrorism` PDF on desktop HF
173
+ and mobile Pages. Searches `terrorism` and `terror` returned 38 and 63 hits
174
+ on both sites, matching independent MuPDF extraction, with working highlights
175
+ and no page errors. Pypdf omitted one footnote hit (37/62), while pdftotext
176
+ joined line-end hyphenation (40/64); those extraction policies are not the
177
+ Reader's literal embedded-text contract. Small-PDF first-page observations
178
+ were 3.453/3.455 seconds, not an A/B timing comparison.
179
+ - The 669-page original PDF also rendered on both sites, page-10 navigation
180
+ produced nonblank canvases, and the first-page top matched the viewport top.
181
+ The previously recorded 73.5 MB cold-load limitation remains unresolved.
182
+ OCR/page-stream generation and pipeline publication were not changed.
183
+
184
+ CI: https://github.com/vomebook/search/actions/runs/37908271544
185
+
186
+ ## Non-PDF Search Optimization (2026-10-09)
187
+
188
+ - HF revision `f584eeb56ba6bbaafc6477ccd27836702388bee1` is RUNNING;
189
+ Pages revision `2740ff2c837b695e84d42a2ccecc55da55a2e024` is deployed.
190
+ - Foliate's EPUB/MOBI/FB2 search engine defers excerpt and DOM Range creation
191
+ until a result belongs to the requested page. Complete matching, exact totals,
192
+ cancellation checkpoints, CFI generation and the existing four-page cache
193
+ retain their behavior. A real EPUB regression counts 1,000 hits with just
194
+ 50 excerpts/ranges; visiting page 20 adds only its 50 requested entries and
195
+ correctly highlights hit 999.
196
+ - Fixed excerpt assembly across inline nodes: slicing now uses node indices,
197
+ and same-node detection uses index equality rather than equal text content.
198
+ Simple and diacritic-insensitive search regressions preserve every character.
199
+ - TXT, Markdown, HTML and Reader-asset DOCX result navigation stops text-node
200
+ collection at the selected match's end. Initial full-text search still scans
201
+ the complete document. Browser regressions cover early cross-node matches,
202
+ tail matches beyond 8,000 nodes, repeated navigation and cancelled activation.
203
+ - Six alternating Chromium rounds on a deliberately dense 3,000-hit single-node
204
+ fixture measured median counting time 530.1 ms before versus 38.5 ms after.
205
+ A separate 20,001-node navigation fixture measured a complete walk at median
206
+ 76.6 ms versus a one-node early walk below the browser's timer resolution.
207
+ These controlled observations are not production speedup percentages or
208
+ cold-start guarantees.
209
+ - Required CI `37911227839` passed: Pages 78 full Reader and 13 PDF-loading
210
+ cases, HF 77 full Reader and 19 PDF-loading cases, plus chapter gates and
211
+ request-manager contracts. Pages deployment `37911227794` succeeded.
212
+ - Both production smoke suites passed. Active-SW Chromium opened real EPUB,
213
+ HTML, TXT and Markdown sources on desktop HF and mobile Pages. EPUB search
214
+ totals 15/213 matched independent XML/spine parsing; deep pagination and
215
+ last-result highlighting passed. Other formats' totals matched an independent
216
+ rendered-DOM traversal (HTML 37/63, TXT 5/44, Markdown 22/5). All eight opens
217
+ completed without page errors. Ready-time observations ranged 0.568-2.765 s,
218
+ including warm upstream responses; no timing comparison is inferred.
219
+ - DOCX navigation was verified locally using its accepted Reader-asset source
220
+ contract and controlled rendering, not a production DOCX corpus sample.
221
+ OCR/page-stream generation and pipeline publication were not changed.
222
+
223
+ CI: https://github.com/vomebook/search/actions/runs/37911227839
224
+
225
+ ## Format Loading And Media Streaming (2026-10-09)
226
+
227
+ - HF revision `e92f61b11bd5a2aed51040d56bf3be71eda67aa2` is RUNNING;
228
+ Pages revision `fa279dc0dd1e30b7b53b06f54baa61aa1af151d2` is deployed.
229
+ - DOCX engines now download concurrently with ordered classic-script execution.
230
+ The pinned preview library captures JSZip during evaluation, so allowing it
231
+ to execute first was rejected during verification. Both dependencies complete
232
+ before parsing/rendering. Disposal guards also cover document-byte preparation
233
+ and the return from the renderer.
234
+ - Classic engines have a lifecycle-owned 20-second deadline, removed handlers
235
+ and reload retry after load failure. Markdown/HTML HTTP failure, timeout and
236
+ pagehide cases verify failed script removal and explicit retry/disposal.
237
+ - Spreadsheet and Foliate image waits share one bounded, cancellable helper.
238
+ Prepared off-DOM section images become eager; load/error listeners and timers
239
+ are removed on success, deadline or disposal. Existing 2.5-second section and
240
+ 30-second spreadsheet bounds remain. Real lazy-image EPUB, broken/deadline
241
+ waits, late events and cleanup counters are covered by regressions.
242
+ - Validated bucket audio/video GET/HEAD and Range requests now reuse streaming
243
+ validation and cancellation instead of reading the whole object through a
244
+ filesystem worker. The existing 64 MiB resource bound remains; PDFs retain
245
+ their 512 MiB bound. MIME derives from validated paths, and range-cache keys
246
+ include the limit and MIME policy. Local proxy regressions verify actual
247
+ range reuse, forwarded headers, limits and semaphore cleanup.
248
+ - Five alternating cold-context Chromium rounds with real pinned DOCX engines
249
+ and 350 ms server latency per engine measured median 965.5 ms serial versus
250
+ 568.3 ms parallel/ordered. This controlled comparison does not establish a
251
+ production percentage gain or cold-start guarantee.
252
+ - Local verification passed 132 backend/API/static cases and both complete
253
+ Reader/PDF browser suites (HF 100, Pages 95), plus architecture, regression
254
+ and cross-project/release gates. Required CI `37914296274` passed: HF 81 full
255
+ Reader and 19 PDF-loading cases, Pages 82 full Reader and 13 PDF-loading cases,
256
+ plus chapter gates and request contracts. Pages deployment `37914296181`
257
+ succeeded, and both production smoke suites passed.
258
+ - Production MP3 (1,883,172 bytes) and MP4 (5,489,287 bytes) HEADs returned the
259
+ expected MIME/length; repeated `bytes=0-65535` GETs returned correct 65,536-byte
260
+ 206 bodies and exact Content-Range. Active-SW desktop HF and mobile Pages
261
+ played and sought both files, and pagehide paused/released their sources.
262
+ Metadata observations ranged 0.746-2.070 s with warm range probes, not A/B
263
+ timings. Video screenshots show decoded frames after seeking.
264
+ - Production browser acceptance used installed Chromium 153.0.8010.12.
265
+ The older Chromium 151 build returned no H.264/AAC capability and could not
266
+ play this H.264 High/HE-AAC sample. PyAV confirmed the file codecs, and the
267
+ newer browser completed playback; this was a test-browser limitation.
268
+ - Both sites rendered the real 42-page DOCX catalog, returned 11 `目录` hits
269
+ and highlighted a selected result; image-page samples rendered successfully.
270
+ No page errors occurred in the eight production opens. The first search
271
+ immediately after restart lacked sidecar enrichment; awaiting the documented
272
+ Reader-assets endpoint restored it before these asset-specific checks.
273
+ - OCR/page-stream generation, pipeline publication and large-PDF cold loading
274
+ were not changed by this release.
275
+
276
+ CI: https://github.com/vomebook/search/actions/runs/37914296274
277
+
278
+ ## Incremental TXT Preview And Bounded TOC (2026-10-09)
279
+
280
+ - HF revision `e43a66d4e3f043b1b1a429516465c6cd3bae6492` is RUNNING;
281
+ Pages revision `a7c51dba40e7202709847feb3d5aceaae7c185de` is deployed.
282
+ - TXT keeps the full encoding sample but uses a chunk/byte cursor and one
283
+ preview decoder for newly arrived ASCII bytes. It retains immediate preview,
284
+ streaming search/highlighting, the existing probe threshold and resource bound.
285
+ Split UTF-8 BOM, UTF-16 LE/BE, NUL invalidation, GB18030, Windows-1251 and
286
+ multibyte boundaries pass focused browser regressions.
287
+ - A regression's old 183,317 sample-chunk visits now reduce to the complete
288
+ sample's single assembly pass. Six alternating Chromium rounds on a 64 KiB
289
+ ASCII body in 4,096 sixteen-byte chunks measured median 85.5 ms before versus
290
+ 19.0 ms after; visits fell from 8,394,752 to 4,096, and decoder constructions
291
+ from 4,098 to three including detection/final decoding. These are controlled
292
+ local observations, not network or production speedup guarantees.
293
+ - Foliate TOC enrichment uses an indexed visible-section map, at most eight
294
+ active resolvers and a shared 8 ms soft scheduling budget. A fixed 32-item
295
+ yielding experiment slowed completion and was replaced by this time budget.
296
+ Disposal rejects enrichment promptly, stops queued work and ignores late
297
+ results. Complete order, fragments, malformed-link isolation and each site's
298
+ existing TOC eligibility are preserved: HF includes group-only headings;
299
+ Pages retains href-only entries. Duplicate section references retain the
300
+ former first-index lookup behavior.
301
+ - In the final six-round 5,000-entry/10,000-section synthetic comparison, median
302
+ TOC completion was 8.45 ms before versus 6.35 ms after, with 5,000 versus
303
+ eight peak resolver tasks and 5,000 versus zero linear visible-section scans.
304
+ A CPU-work regression also verifies event-loop ticks during enrichment.
305
+ - Local full Reader/PDF cases passed (HF 104, Pages 99), together with targeted
306
+ encoding, rapid navigation, failure retry, grouped TOC and real 600-chapter
307
+ virtual-directory checks. Two initially selected HF-only performance method
308
+ names were corrected for Pages; its three actual TXT performance cases passed.
309
+ - Required CI `37920669662` passed: HF 85 full Reader plus 19 PDF-loading cases,
310
+ Pages 86 full Reader plus 13 PDF-loading cases, plus chapter gates and request
311
+ contracts. Pages deployment `37920669638` succeeded. Both production smoke
312
+ suites and cross-project/release checks passed.
313
+ - Active-SW Chromium 153 opened real EPUB and TXT sources on desktop HF and
314
+ mobile Pages. EPUB TOC labels/order matched independent EPUB2 NCX parsing,
315
+ and directory navigation passed. EPUB full-spine counts 15/213 and TXT
316
+ rendered-text counts 5/44 matched the selected independent oracles; repeated
317
+ searches, deep result paging and last-hit highlighting passed without page
318
+ errors. Observed opens ranged 0.739-4.020 seconds; no A/B gain is inferred.
319
+ - Generated data, OCR/page-stream generation and pipeline publication were not
320
+ changed by this frontend release.
321
+
322
+ CI: https://github.com/vomebook/search/actions/runs/37920669662
323
+
324
+ ## HTML Contrast Ancestor Reuse (2026-10-09)
325
+
326
+ - HF revision `77cba61cff9ee7c725464dcac62f1d2c21b31e13` is RUNNING;
327
+ Pages revision `940d65c50bb6aad773ef004933eaa047118c9aaa` is deployed.
328
+ - Isolated HTML contrast repair shares the element's computed-style read with
329
+ background lookup and memoizes resolved ancestor luminance within that check.
330
+ Every color write clears the cache to preserve sequential inherited-color and
331
+ `currentColor` behavior. The existing alpha threshold, contrast threshold,
332
+ repaired colors, element bound and sufficiently contrasted source styles remain.
333
+ - Six alternating Chromium rounds against `a7c51db`, with 24 transparent wrappers,
334
+ measured 8,000 readable elements at median 317.45 ms before versus 18.15 ms
335
+ after, with 224,000 versus 8,026 computed-style reads. A mixed 1,200-element
336
+ document with every tenth element repaired measured 27.55 versus 4.9 ms, with
337
+ 33,600 versus 4,346 reads. An all-repaired 1,200-element case measured 38.55
338
+ versus 34.6 ms; safe invalidation deliberately limits reuse in that case.
339
+ The 10,001-element bound sample measured 439.55 versus 37.3 ms. Every round
340
+ compared final inline styles, computed text colors and backgrounds; all matched.
341
+ These synthetic local timings do not establish production speedup percentages.
342
+ - Focused browser regressions passed on both sites: shared ancestors, independent
343
+ passes, sequential `currentColor` changes, inherited repairs, alpha threshold
344
+ and retained link colors. HTML headings/progress, spreadsheet images/zoom and
345
+ cross-node search navigation passed. Architecture/regression, cross-project
346
+ release and whitespace gates passed.
347
+ - Required CI `37924041474` passed: HF 87 full Reader and 19 PDF-loading cases,
348
+ Pages 88 full Reader and 13 PDF-loading cases, plus chapter-search gates and
349
+ request contracts. Pages deployment `37924041481` succeeded. Uploaded HF files
350
+ were SHA-256 checked, and both production smoke suites passed.
351
+ - Active-SW Chromium 153 production opens covered desktop and mobile on each
352
+ site. Two real HTML sources returned exact rendered-text oracle counts
353
+ (10/172 and 32/242), with repeated queries, last-page navigation and selected
354
+ highlights verified. Light/dark Reader shell changes retained HTML's existing
355
+ isolated light-page policy. No page errors occurred. Ordinary prose screenshots
356
+ wrap normally on mobile. Ready times of 1.058-1.807 seconds are observations,
357
+ not an A/B comparison or cold-start guarantee.
358
+ - A legacy source page has a 510 px document inside a 370 px mobile frame.
359
+ A baseline/candidate local replay of its production bytes found identical frame,
360
+ document/body widths and heading positions: its fixed-width overflow predates
361
+ this optimization and remains a source-layout limitation.
362
+
363
+ CI: https://github.com/vomebook/search/actions/runs/37924041474
364
+
365
+ ## Sparse DOM Navigation And Chapter Labels (2026-10-09)
366
+
367
+ - HF revision `36748c51b2e96961d4a5e5f795e738a070ee1f39` is RUNNING;
368
+ Pages revision `14fee3c75c7993498fe04589be785ac7d54759a2` is deployed.
369
+ - Progressive DOM search builds at most 2,048 sparse element-boundary checkpoints
370
+ from the existing complete text-offset map. Navigation starts at the nearest
371
+ preceding eligible boundary instead of rescanning every preceding text node.
372
+ Reader-owned text splitting, marking and normalization run with the observer
373
+ paused and preserve the boundaries. External text/tree/class mutations disable
374
+ the index; pending records are checked synchronously before navigation too.
375
+ A mutation during an awaited walk causes a full-root retry. Query generation
376
+ changes and disposal disconnect the observer and clear retained checkpoints.
377
+ - Chapter labels use text-offset boundaries, preserving last-entry precedence
378
+ for duplicate targets and page-number priority. Boundary construction uses an
379
+ ordered merge for dense headings and binary lookup for sparse headings. Unordered,
380
+ disconnected or other-tree targets retain the original lookup, and replacing
381
+ the TOC invalidates the indexed label lookup. Original parent references keep
382
+ page labels stable after Reader-owned text-node normalization.
383
+ - An initial per-heading binary-only build sped result pages but increased
384
+ 5,000-heading initial search cost; it was rejected in favor of adaptive merging.
385
+ Final six alternating Chromium rounds against `940d65c` measured:
386
+ - 20,000 preceding paragraphs: initial search median 364.4 versus 334.5 ms;
387
+ repeated tail activation median 117.25 versus 0.1 ms, with 20,005 versus
388
+ 37 visited text nodes. The selected tail match spans three inline elements.
389
+ - 5,000 headings/hits: initial search median 440.1 versus 382.15 ms;
390
+ last-page generation median 65.65 versus 0.35 ms, with 1,275 versus zero
391
+ DOM position comparisons while generating that page. Repeated last-result
392
+ activation median 52.4 versus 0.1 ms, with 10,000 versus 16 visited nodes.
393
+ Every comparison checked complete totals, page labels and selected match text.
394
+ ScrollIntoView was suppressed for the timing probe, which measures mapping,
395
+ marking and result construction, not end-to-end UI/animation or network time.
396
+ Timings are synthetic local observations, not production speedup guarantees.
397
+ - Both sites passed focused cross-node/deep/repeated navigation, synchronous
398
+ external mutation fallback, shifted-prefix rejection, query/disposal cleanup,
399
+ post-normalization labels, duplicate/empty/ordered/unordered/replaced TOC and
400
+ page-priority checks. Existing streaming TXT, search reopen, large complete
401
+ scan, character-batch pagination and stale Foliate fallback regressions passed.
402
+ An initial test used the search-opening helper twice while the panel was open;
403
+ switching the existing input directly fixed that harness error.
404
+ - Required CI `37928445292` passed: HF 90 full Reader and 19 PDF-loading cases;
405
+ Pages 91 full Reader and 13 PDF-loading cases, plus chapter-search gates and
406
+ request contracts. Pages deployment `37928445285` succeeded. HF upload hashes,
407
+ both production smoke suites, architecture/regression, cross-project release
408
+ and whitespace gates passed. The publication worktree is clean.
409
+ - Active-SW Chromium 153 on desktop HF and mobile Pages verified real HTML,
410
+ Markdown, TXT and DOCX. Independent rendered-text traversal checked counts
411
+ HTML 10/172, Markdown 6/22, TXT 5/44 and DOCX 11/66 for the selected sources.
412
+ Every first/last result-page label matched the DOM/page/heading oracle. Last,
413
+ first and last selection on the final page preserved exact absolute highlight
414
+ offsets and text after repeated normalization. All eight opens had no page
415
+ errors. Screenshots were captured after the drawer-closing transition settled.
416
+ Observed initial opens ranged 0.681-4.304 seconds across two acceptance runs;
417
+ these are not A/B measurements or cold-start guarantees.
418
+
419
+ CI: https://github.com/vomebook/search/actions/runs/37928445292
420
+
421
+ ## PDF Cache And Ebook Index Recovery (2026-10-09)
422
+
423
+ - Pages `38a0b2aadbaff1aed7d337b186223580dda0a597` and HF
424
+ `d8ae99da139d64eed9cf048b18de0bac81674d51` introduced PDF-document-only
425
+ Fetch `cache: no-store`, while retaining the bounded completed-range server
426
+ cache. An un-routed default-cache regression checks concurrent range reads;
427
+ disabling HTTP cache or Playwright routing is not performance acceptance.
428
+ - Pages `b06450804df397d34defd1280ef6da60339d4ed0` and HF
429
+ `d4b284a083508baf57e7bb17fc99dce8d2107ff2` fixed the chapter Worker rejecting
430
+ valid v2 bucket index URLs. Origin, exact path/query, byte-count, checksum and
431
+ complete chapter identity checks remain enforced.
432
+
433
+ ## Close, Retry And Missing-Asset Recovery (2026-10-09)
434
+
435
+ - Frontend release: Pages `2b7c9ba4dea0ea679ad8ab7d4f2621ddd7d98289`, deployment
436
+ `37950249638` and Reader CI `37950249588` succeeded. HF frontend/backend release
437
+ `2787e18c8c26e4ddea03438c5acfaf6c162059ea` was followed by backend hotfix
438
+ `5f52d90ae99cd2b1bbf5495ed93c6914d10ed0e7`, verified RUNNING with uploaded hashes.
439
+ - Overlay removal now dispatches synchronous disposal before blanking/detaching
440
+ the child. Eligible progress is captured first. PDF document requests combine
441
+ their caller abort signal with their Reader owner; disposal cancels both pending
442
+ transport and body reads. Idle OCR prefetch cannot recreate a Worker after close.
443
+ Native media is paused and its source removed. Bucket page images use the owned
444
+ streaming proxy instead of an abandoned filesystem read.
445
+ - The header/admission disconnect watcher initially exposed a cached-response
446
+ deadlock: Starlette's disconnect probe can swallow task cancellation. The
447
+ hotfix adds an explicit stop flag, with a deterministic cancellation-swallowing
448
+ cached-range regression. Original, adjacent and repeated ranges were checked
449
+ separately; the original sample's exact first range no longer hangs.
450
+ - Random Reader API requests have a ten-second whole-body deadline. A stalled
451
+ JSON body is aborted and a later click can open another book. Both sites passed
452
+ actual return-to-search, random-open, close, random-open, close cycles with
453
+ an active SW and default HTTP caching. After each removal, the 1.6-second
454
+ observation window (200 ms delivery grace) recorded zero new document requests
455
+ and zero encoded document bytes.
456
+ - Actual Chromium 153 playback/closure covered MP3 and MP4 on both sites, plus
457
+ JPG and EPUB closure. Media was playing before removal; synchronous probes
458
+ confirmed `disposed`, paused playback and cleared `src`. The subsequent
459
+ 1.8-second windows recorded zero new document/media requests and bytes. These
460
+ checks concern Reader resources, not ordinary search-shell background activity.
461
+ - Seed `20261009` selected 15 images, three each of JPG/JPEG/PNG/BMP/TIF. Four
462
+ manifests really are missing: `0itua4rlzn5mf`, `1dnlqoj3qve6x`,
463
+ `2o2v8kfgm8w7v`, `3fctw9l4brgs1`. Their existing original images now render
464
+ through the proxy fallback, releasing failed manifest/page resources and
465
+ retaining the book identity. All 15 HF opens passed; the four failed IDs and
466
+ user PNG `0fiu8963bgw9z` passed on both sites. Missing generated objects were
467
+ not silently republished or represented as repaired data.
468
+ - Short touch taps clear an unchanged selection inside TXT, PDF text layers and
469
+ isolated HTML. Long presses, movement, cancelled pointers, changed selections,
470
+ secondary touches and controls retain native handling. Both sites passed real
471
+ mobile taps and those gesture boundaries. No custom long-press selection engine
472
+ was introduced.
473
+ - Cold source resolution waits for the first conversion sidecar; an empty failed
474
+ sidecar resolution is `no-store`. The user's PS `1ycx98ke77ewf` opens its converted
475
+ PDF and returns 22 `Lisp` hits on both sites, matching independent all-page
476
+ PyMuPDF extraction, including selected-hit highlighting.
477
+ - FB2 head-only hits now show and highlight the original indexed chapter title.
478
+ The temporary title is excluded from body mapping and removed on the next
479
+ navigation/query, so repeated searches retain exact offsets and totals.
480
+ The production `Cover` hit passed on both sites.
481
+
482
+ ### Format Matrix And Remaining Data/Latency Limits
483
+
484
+ The production matrix covered 28 source extensions on both sites with active SW
485
+ and default HTTP cache: TXT, MD, HTML, HTM, MHT, RTF, DOC, DOCX, ODT, WPS, CAJ,
486
+ KDH, XLS, XLSX, CSV, PPT, PPTX, PPS, PS, VCF, INI, DJVU, PDF, EPUB, MOBI, AZW3,
487
+ FB2 and CHM. Positive samples for 26 extensions matched independent source-text,
488
+ HTML, DOCX XML, PDF extraction or verified complete chapter-index counts and
489
+ last-result highlighting. Examples include 19,437 TXT hits, 240 CSV hits, 381
490
+ EPUB hits and 210 CHM hits; these are selected production samples, not corpus
491
+ totals or cross-project corpus equivalence.
492
+
493
+ The selected DJVU and KDH conversions contain no embedded text and have no
494
+ published OCR index. Both sites correctly expose the OCR-required failure;
495
+ positive full-text search for these samples is **not accepted**. The raw current
496
+ sidecar confirms the KDH entries have only migrated PDF paths, without OCR fields.
497
+ A legacy HTM frameset has no inline body text and was excluded from the positive
498
+ sample set after checking its original; its external frame contents are not
499
+ claimed as searched. Audio/video/SWF and plain images do not gain fabricated
500
+ full-text capability.
501
+
502
+ PDF pixel/page-10 acceptance passed for the 241-page `2ac1h9ocf0ju7` and 669-page
503
+ `398vk0yyy8m29` on both sites. Single-run first-page times were HF 31.478/8.165 s
504
+ and Pages 11.100/4.615 s respectively. The 10,205,075-byte sample still requires
505
+ 39 ranges, nearly its full file; it is not accepted as a fast cold load. The older
506
+ 73,508,988-byte sample's large-read limitation also remains unclaimed. Stopped
507
+ post-close transfers and fixed cache deadlocks do not establish that every
508
+ remaining loading delay is solved. PDF-primary/page-stream/OCR lifecycle work in
509
+ the separate pipeline session was preserved.
510
+
511
+ Both documented production smoke suites passed after the hotfix. Local release
512
+ fixtures were completed with the pinned engines and current source/test assets;
513
+ missing fixture/dependency setup failures were rerun rather than counted as
514
+ successful tests. New closure, random-body retry and backend cached-range gates
515
+ are required in the Reader workflow.
516
+
517
+ ### Final Body-Stream And Test-Isolation Follow-Up
518
+
519
+ HF `70e6f0923f84e9fa1517231a1784c869fcf42e7c` extends owned streaming to uncached
520
+ office/text/HTML/chapter/SWF bodies. The existing bounded metadata/search-index
521
+ cache remains intact. Both sites revalidated actual TXT (19,437 hits), DOCX
522
+ (3), HTML (2) and EPUB (381), including last-hit highlighting after this change.
523
+
524
+ The new backend CI gate exposed old fixture leakage: proxy tests shared app
525
+ state/assets tasks and patched the global `time.monotonic`, affecting asyncio's
526
+ own clock. HF `2c63ac97ba6de4ffc486672f9123ed0febdab25e` isolates that state and
527
+ uses an app-local test clock. It also treats timestamp zero as an uninitialized
528
+ sidecar cache, with a simulated 100-second-uptime failure/backoff/recovery check.
529
+ All 92 staged backend/proxy cases passed in under a second. The development
530
+ checkout also passed in reverse module order; its separate PDF-primary test
531
+ accounts for its additional case. No tests were skipped to hide CI failures.
532
+
533
+ Pages workflow `7b9950560208e758628cb93253b25f0cb0d4a771` separates backend and
534
+ upstream-ownership gates, each with a 120-second ceiling. Earlier CI
535
+ `37958114191` was superseded while its leaking fixture stalled; the first
536
+ `37959527001` attempt correctly failed its ownership timeout. Its failed HF job
537
+ was rerun against the fixed Space source. Reader source from the independent
538
+ pipeline session and concurrent generated-index publications were preserved.
539
+
540
+ The final `37959527001` attempt succeeded on both jobs, including the two backend
541
+ gates, PDF/closure/navigation gates and complete Reader suites. Final HF source
542
+ `2c63ac97ba6de4ffc486672f9123ed0febdab25e` passed both production smoke layers.
543
+ Fresh default-cache, active-SW Chromium 153 repeated MP3/MP4 playback and closure
544
+ plus JPG, EPUB, DOCX, TXT and HTML closure on both sites: all 14 cases captured
545
+ `disposed`, all native media captured paused/cleared-source state, and every
546
+ post-close observation recorded zero new Reader-body requests and encoded bytes.
547
+
548
+ Final CI: https://github.com/vomebook/search/actions/runs/37959527001
549
+
550
+ ### Failed-Test Recheck (2026-10-09)
551
+
552
+ After the user handed cold-PDF/OCR work to other sessions, the current development
553
+ checkout re-ran the previously affected tests: 93 backend/proxy cases and six
554
+ focused Reader browser cases per site passed without skips. The browser cases
555
+ cover missing images, v2 chapter-index/title highlighting, mid-transfer closure,
556
+ touch selection, synchronous unmount and random-response-body retry. CI
557
+ `37959527001` was independently checked as completed/success. Existing fixes were
558
+ still effective; this recheck needed no additional test-code changes.