diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md index c1dd564c..248c4315 100644 --- a/.claude/memory/decisions.md +++ b/.claude/memory/decisions.md @@ -450,3 +450,10 @@ Context: R4.2 report (RUST.md §10.3, §10.4): O7 144/144, O9 38/38, O8 47 + 4 d Decision: `MAX_JSON_VALUES` = 400,000 (10 × CAP envelope 39,652) and `--max-memory` 1 GiB final for R4; existing depth / size / complexity / inflation caps kept, no raise without measurement. 1 GiB = safety net, never a tab memory guarantee. Leak criterion: first import = init cost, counted apart; then ≥ 5 consecutive imports + idle, recurring growth ≤ 10 MiB, in Chromium + Firefox + WebKit, GC fluctuations repeated and explained; global peaks kept beside. Three distinct subjects: no leak / low peak / ceiling guarantee. Before the app import switch: 20–50 MiB files (WebKit 324 MiB vs TS 76) must be fixed (fewer ArrayBuffer copies, fewer linear copies, early release, no retained refs, transfer / streaming when it pays) and re-measured on 3 engines, or an explicit size limit with controlled refusal proposed with numbers; no switch before that is solved or decided. OD-4 refusals accepted (L1); no legitimate corpus file may be refused; never rewrite source files or drop bilan data on error; oracles unchanged. Worker technical error / resource overflow / timeout never presented as proof of a corrupt PDF. TS reader deleted only after parity + non-regression. WebKit one-off worker `error`: not blocking, keep trace, repetition tests, never mask `error` events. J1 on real devices announced with "TEST FONCTIONNEL DISPONIBLE"; headless ≠ Safari/iPhone validation. Alt rejected: 1,000,000 values (25 × CAP; more headroom, weaker bound). Switch import before the large-file fix. Status: active. R4.3 started 2026-10-18 on feature/rust-r4-pdf-core; no R4 merge into develop, no R5, no 0.2.0, no deploy. + +## BDR-059 | 2026-10-18 | J1 authorised with the two WebKit reserves; PDF cap kept at 50 MiB + +Context: R4.3 checkpoint report (RUST.md §10.5): WebKit 50 MiB file 145 MiB vs TS 76 (worker read was 324); WebKit leak series above 10 MiB but navigation control grows too, one-page series levels off; no forced GC headless. Owner decisions 2026-10-18. +Decision: both WebKit reserves accepted provisionally; J1 device acceptance launched on `feature/rust-r4-pdf-core`. PDF cap stays 50 MiB; no streaming scanner in R4.3. Leak criterion unchanged (≤ 10 MiB recurring over ≥ 5 imports after init), same-page measures separated from navigation ones, a no-import control kept; any device overshoot documented and analysed before final acceptance. OD-3 400,000 / 1 GiB, copy cap 16 MiB, worker protections, validated messages kept. J1 focus: Safari iOS, large PDFs, repeated imports, timers. Deliverable: PASS / FAIL / NON TESTÉ per device and scenario, gaps, residual risks, argued recommendation. Not a final validation of R4.3; headless never sufficient; TS reader kept; no merge; stop at J1, no R4.4. +Alt rejected: streaming scanner now; lowering the PDF cap; blocking J1 on the WebKit growth. +Status: active. Kit generated at ../faunosteo-j1-kit; results template docs/development/R4_J1_RESULTS.md; waiting for the owner's device run. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 29dc0a04..08e41720 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -287,3 +287,4 @@ Owner validated R4.0 plan with conditions (BDR-057, plan §A.6, LRN-059/060). R3 - 2026-10-18 R4.2 done on feature/rust-r4-pdf-core (21d34fb..): pdf::read (scan, strings, stamp, inflate, probe), json_js, import_pdf, SheetHandle.import_pdf; O7 144/144, O9 38/38, O8 51 (4 declared: 3 OD-4 lone surrogate in overwritten dup value, 1 OD-3 values-1m), reference PDFs all import, through wasm too. OD-3: MAX_JSON_VALUES 400,000 (10 × CAP envelope 39,652), rescue copy guarded, --max-memory 1 GiB trap proven; hostile 16 MiB: 784 MiB → 16 MiB linear. Security gate BLOCK(1) (count stopped past depth cap → bypass) fixed 593893a, re-gate PASS. Browser run 3 engines: 666/678 agree, W4 max 68 MiB, W2 46 ms; open: after-GC residue 11.7 MiB first import (one-time), worker holds file twice on 50 MiB inputs (WebKit 324 MiB). Module 422 KB gzip. STOP before R4.3: owner to confirm thresholds. - 2026-10-18 owner validated R4.2 (BDR-058): thresholds 400,000 / 1 GiB final; R4.3 go on feature branch; app import switch gated on the 20–50 MiB file memory fix (WebKit 324 vs 76 MiB) re-measured on 3 engines, and leak series (init apart, ≥ 5 imports, ≤ 10 MiB recurring). LRN-061, LRN-062 written. Next: R4.3a bytes API + streaming read, worker protocol, HomeRoute, CSP proof, series measurements. - 2026-10-18 R4.3 done on feature/rust-r4-pdf-core (52471db..b08373a): FileBytes sink + import_pdf_bytes/restore_copy_bytes; worker protocol v1 (task/chunk/ack/end → ready/result/failed), page reads file in 1 MiB BYOB chunks (amendment B.1.5: WebKit worker file read ≈180 MiB), client timers + settle-once + terminate, controller, HomeRoute switched, B.1.8 messages pinned on O8/O7/O2/O3 via in-process worker, 6 suites migrated (458 app tests). Security gates: reader PASS after fix, worker PASS 7 LOW → hardenings 8ddf185. Browser proofs on dist: 666/678, W5 0 long tasks, CSP with/without OK; 50 MiB WebKit 145 vs TS 76 (was 324); leak series Chromium OK, Firefox sawtooth reclaimed, WebKit grows with same-tab navigation (control too). DEPLOY note, R4_J1.md + kit script. Open for owner: WebKit large-file gate, WebKit leak criterion. Next: owner decision, J1 on devices. +- 2026-10-18 owner: J1 authorised with both WebKit reserves (BDR-059), cap 50 MiB kept, no streaming scanner, criterion 10 MiB / 5 imports kept with same-page vs navigation split + control. Kit generated (../faunosteo-j1-kit, 13 MB, L report as rescue copy for the 42 MB export), R4_J1_RESULTS.md template. STOP: waiting for device results; no merge, no R4.4. diff --git a/scripts/r4-j1-kit.mjs b/scripts/r4-j1-kit.mjs index 5bf4d136..4dc7f663 100644 --- a/scripts/r4-j1-kit.mjs +++ b/scripts/r4-j1-kit.mjs @@ -122,6 +122,11 @@ write( ) write('copie-json-invalide.json', '{"version": 3,', MESSAGES.invalid_copy) write('copie-version-1.json', '{"version": 1}', MESSAGES.invalid_copy) +write( + 'copie-L-60-observations.json', + readFileSync(join(FIXTURES, 'r4/reports/L.json'), 'utf8'), + `${MESSAGES.editor} ; sur l’ordinateur, exporter ensuite ce bilan en PDF (≈ 42 Mo) pour J1.8 et J1.9`, +) write( 'copie-trop-grande.json', `{"version":3,"a":[${'1,'.repeat((9 * 1024 * 1024) / 2)}1]}`,