chore(memory): R4 plan validated by the owner (BDR-057, LRN-059, LRN-060)

This commit is contained in:
bchanot committed 2026-10-18 04:42:53 +02:00
1 parent 2c8ac2ebe6
commit ac2a3bc41b
4 files changed
+38 -2

No files matched your search

+1 -1
View File
@@ -204,7 +204,7 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo
- [x] R3 final checks 2026-10-17 (owner brief 2026-10-16): rescue copy importable from Home, trapping draft held (no reload loop), replace confirmation, guard app-wide → 9bd9aca (BDR-056, BLK-012); verifier CONFORME 10/10, security PASS, check:all green; residuals in BLK-012
- [ ] R3 follow-ups kept by the owner (2026-10-15): worker TLS exercised against a real HTTPS endpoint before the deployment that needs it; roxmltree limits + SVG prescan (pin the iterative release when published); Firefox/WebKit check; SVG references across drawings scoped per view before community uploads (Step 13); WASM size margin (396 of 600 KB) before R4; TypeScript PDF sanitiser still present until R4
- [ ] R4 pdf core: reader (Web Worker, BLK-009 browser measurements) + writer (`pdf-writer`, Std14 AFM, draw log; lines/rects/colours golden frozen with the TS engine first, D-R2) + `report-compare` tool; `packages/pdf` deleted; N-1 scanner reads R4 PDFs
- [x] R4.0 plan (owner go 2026-10-17, arbitrations A1-A13): `.claude/tasks/plans/2026-10-17-rust-r4-pdf-core.md` rev 2 after 3 challengers (correctness 6 major, robustness 10 major, simplicity 3 major; none fatal) on chore/rust-r4-plan; Playwright Firefox 157 installed + proven, WebKit 27.2 downloaded (owner: `sudo apt-get install libevent-2.1-7t64 libmanette-0.2-0`); awaiting owner validation + OD-1..OD-7; no code
- [x] R4.0 plan (owner go 2026-10-17, arbitrations A1-A13): `.claude/tasks/plans/2026-10-17-rust-r4-pdf-core.md` rev 2 after 3 challengers (correctness 6 major, robustness 10 major, simplicity 3 major; none fatal) on chore/rust-r4-plan; Playwright Firefox 157 installed + proven, WebKit 27.2 downloaded (owner: `sudo apt-get install libevent-2.1-7t64 libmanette-0.2-0`); validated by the owner 2026-10-18 with conditions (plan §A.6, BDR-057)
- [ ] after validation: finish chore/rust-r4-plan into develop (owner signal), Safari PDF download fix (separate bugfix, owner go), then cut feature/rust-r4-pdf-core
- [ ] R4.1 freeze (O1-O13, ledger, browser harness, TS baselines)
- [ ] R4.2 reader (cargo + wasm, differential, OD-3 thresholds confirmed with owner before R4.3)
@@ -3,7 +3,7 @@
- date: 2026-10-17 | rev 2 (after 3 plan challenges: correctness CONCERNS (6 major, 8 minor), robustness CONCERNS (10 major, 12 minor), simplicity CONCERNS (3 major, 9 minor); log in §B.12) | branch: `chore/rust-r4-plan` (plan only); code later on `feature/rust-r4-pdf-core`, one merge
- spec: owner briefs 2026-10-17 "Préparation de R4" and "Autorisation de préparation R4.0" (arbitrations A1 to A13, §A.0); `docs/development/RUST_ARCHITECTURE_REVIEW.md` I.2, II.2 rows "pdf reader", "pdf writer", "report-compare", III.3, VI.1 to VI.4, D-R2, D-R3, D-R11, D-R12, D-R14; `RUST.md` §8.3, §8.7, §8.8, §9.4, §9.7; `PDF_IMPORT_HARDENING.md` §5; BLK-009, BLK-012; CLAUDE.md "PDF", "Schemas", archive-reader gate
- facts: Annex (inventory, measurements and experiments of 2026-10-17)
- status: R4.0 only. No code and no fixture generated; R4.1 starts on the owner's explicit go.
- status: validated by the owner 2026-10-18 with conditions (§A.6). R4.1 may be prepared once the plan branch is merged, the Safari fix has merged and `feature/rust-r4-pdf-core` is cut from the updated develop.
- not in scope: TTF fonts, `scope_disclaimer`, the planned collection caps, opening the import to external users (BDR-040 gate stays open), R5 (pipeline, `packages/anatomy`, `packages/domain`, `documentSha256`), the Safari download fix (separate bugfix), release 0.2.0, any deployment, any visible change on the documented browsers.
# Part A. For the owner
@@ -50,6 +50,23 @@ The application reads and writes archives with Rust only. An import, PDF or resc
WebKit on this machine: `sudo apt-get install libevent-2.1-7t64 libmanette-0.2-0` (Firefox 157 and WebKit 27.2 for Playwright are downloaded; Firefox runs headless with workers and wasm). The go for the Safari download fix. Real PDFs, if any (§B.5.2).
## A.6 Owner validation (2026-10-18)
OD-1 to OD-7 approved as recommended in A.2 (BDR-057), with these conditions, binding on the slices:
- OD-1: module workers, no second implementation for old versions. The import's support per browser is documented apart from the application's support, from real capability checks (P-W1, J1).
- OD-2: incremental export with bounded memory, cleanup on error and cancellation, offline export kept; release proven at R4.6 on success, error, cancellation and recovery.
- OD-3 (conditional): R4.2 sets the resource budgets from reproducible measurements covering upstream allocations (file buffer, inflation, decoded text, value tree), wasm linear memory, JavaScript objects (transfers, result parse), decoded images and the browser's peak (content-process RSS). If a budget cannot be shown or the preventive caps are insufficient: stop before R4.3 wires the import and present the results. A resource error never alters the original PDF, the bilan or the archives.
- OD-4: the overwritten-duplicate lone-surrogate case is refused; no JSON reader of our own; the source file stays intact, nothing is dropped silently.
- OD-5: messages as proposed; the outcome kinds keep technical errors, resource exhaustion and invalid files apart.
- OD-6: the J1 matrix of A.4 exactly; a device or browser not actually run is reported as not run, never as validated.
- OD-7: about 5 MB of fixtures; no real professional or confidential data in git (B.5.2).
- The A.3 differences stay under the oracles and are reported explicitly at each checkpoint; no other silent difference.
- The harness's 4 GiB RSS watchdog is not a guaranteed memory limit: every result that relies on it says so.
- Proofs owed in the slices, never assumed: png crate tolerance on historical files (R4.5, O6), loading the module in the worker per engine (R4.3), memory on hostile files (R4.2, R4.3, J1), incremental export without image accumulation (R4.6), v2/v3 compatibility (R4.2, R4.5), visual rendering (R4.5, final acceptance), import and export on the J1 browsers (J1, final acceptance), data kept when the engine fails (R4.3, R4.6).
- Goldens stay references, never regenerated to hide a regression; the TS engine is deleted only after parity is proven and every consumer has switched (R4.8).
- Checkpoint reports give concrete results, not plan repetition, and list the functional and graphical validations available. Manual priorities: FR and EN export, anatomical views and markers, a v3 import, real historical v2 PDFs, attachments and kept data, wrong and large files, the targeted browsers and phones.
- Order: R3 closed (checked 2026-10-18: merge 8df964b on develop, branch deleted locally and on origin); this plan merged; the Safari fix on a short branch, tested, merged after the owner's validation; `feature/rust-r4-pdf-core` from the updated develop. WebKit packages installed by the owner, then workers, wasm, imports, exports and memory protections checked on WebKit; WebKit results never replace a manual iPhone run. LAN DEV access kept. Excluded: R5, any deployment or production change, release 0.2.0, any graphical redesign.
# Part B. The plan
## B.1 Architecture and contracts