chore(memory): BDR-061 R4.4 validated, R4.5 go; R4.5 subtasks

This commit is contained in:
bchanot committed 2026-10-18 22:37:41 +02:00
1 parent 4874913669
commit e0540ed006
3 files changed
+14 -1

No files matched your search

+6
View File
@@ -463,3 +463,9 @@ Status: active. Kit generated at ../faunosteo-j1-kit; results template docs/deve
Context: J1 partial (computer run, no failure; iPhone unavailable, deferred). Owner decision 2026-10-18.
Decision: R4.3 provisionally accepted on the branch, only for scenarios actually run; Safari iOS J1 mandatory before any merge of R4 into develop; BDR-058/059 WebKit memory reserves stay open; headless ≠ device. R4.4 authorised on the same branch per plan: layout, text, AFM, dates, DrawLog, validated against O1, O4, O5 and the Step 6 goldens. No regression on R4.3: reader, worker and memory guarantees untouched unless demonstrated need + prior validation. Automated tests and parity checks at every step; TS reader kept until R4.8. End of R4.4: detailed report (changes, tests, parity, performance, risks, decisions), stop before R4.5.
Status: active.
## BDR-061 | 2026-10-18 | R4.4 validated; R4.5 serialiser authorised with parity, tooling and compatibility gates
Context: R4.4 report (RUST.md §10.6: O1 12 runs 2,124 calls, O4/O5/O6 exact). Owner decision 2026-10-18.
Decision: R4.5 on the branch: content emitter + numberToString, pdf-writer, PNG gate and decode, links, Info, attachment, self-check, from_envelope. Gates: parity with O2, O4, O6 and applicable goldens (declared differences kept, oracles never edited to hide a gap); `qpdf --check`, poppler 150 dpi 0 px vs R3, O11 reads; restoration compat: R4 PDF read by Rust reader + kept TS reader, envelope/N-1 copies, no bilan data loss on export → import; PNG and PDF structure protections before large allocations (plan caps), invalid cases and messages checked; measure performance, allocations, real wasm size with the writer linked (W1 600 KB per plan), compared with TS baselines on same files/conditions; R4.3 import and worker guarantees untouched; WebKit reserves and iOS recette still blocking merge; gates green; RUST.md documented. Stop at R4.5 checkpoint: components, oracle/golden results, compat, perf/memory, wasm size, gaps/risks, R4.6 recommendation.
Status: active.
+1
View File
@@ -290,3 +290,4 @@ Owner validated R4.0 plan with conditions (BDR-057, plan §A.6, LRN-059/060). R3
- 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.
- 2026-10-18 J1 partial: owner ran the functional checks on a computer, no failure (browser/version, timings pending); iPhone not available, deferred → stays NON TESTÉ, blocks final R4.3 acceptance (OD-6). Proposed: continue R4.4 on the branch with the iPhone J1 as a blocking item before any merge; waiting for the owner's decision. No merge, no R4.4 started.
- 2026-10-18 R4.4 done (70007e0, 1550d21): pdf::write text/afm_data/dates (O4 55,992 widths bit-exact, 1,168 wraps, safeText every code point, upper 1,580 = Rust to_uppercase, O5 tables, O6 6,468 cells), input checks, layouts → DrawLog; O1 12 runs 2,124 calls equal, step6 text/images 24 derived. Layout L 3 ms, CAP 24 ms release. Nothing wired, module size unchanged. STOP before R4.5.
- 2026-10-18 owner validated R4.4; R4.5 go (BDR-061). Subtasks R4.5a-f in TODO. Tooling present: qpdf 12.3.2, poppler 26.01 (pdftoppm, pdfdetach), crates.io reachable.
+7 -1
View File
@@ -234,7 +234,13 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo
- [x] R4.4a `pdf/write/{text,afm_data,dates}.rs`: safe_text (O4 ranges), js_upper (O4 runs/special), js_trim/whitespace, measure = units × (size/1000) with WX||250 + KPX over WinAnsi bytes (O5 tables generated by scripts/r4-afm-data.mjs), wrap_lines (JS \s+), format_date fr/en (O6 grid, years 0-99 → 19xx per A3); cargo tests on O4 measure groups, wrapLines, safeText, upper, O5 widths, O6
- [x] R4.4b `pdf/write/{mod,input,draw_log,layout/{header,footer,observation,conclusion}}.rs`: ExportInput (ts-rs) checks (branding/labels, assert_snapshot + read_svg per asset, sheet mismatch, caps), rasters by key + PNG dims (IHDR only; gate at R4.5), DrawLog ops at full precision in TS call order (footers after all pages), links, embeds, warnings; cargo O1 12 logs exact, step6 text/images goldens (24) derived
- [x] R4.4c (done 2026-10-18, STOP before R4.5) record RUST.md §10.6 (modules, parity, declared differences, performance), ledger targets, suites green, STOP before R4.5
- [ ] R4.5 serialiser (pdf-writer, self-check, from_envelope)
- [ ] R4.5 serialiser (pdf-writer, self-check, from_envelope) (owner go 2026-10-18, BDR-061; stop before R4.6)
- [ ] R4.5a `pdf/write/content.rs`: pdf-lib operator sequences for text/image/line/rectangle + `numberToString` (O4 cases, exponent quirks); `pdf/write/png.rs`: branding PNG gate (`pngIssue` port) + UPNG-rule decode to RGBA8 (O6 108 cases: gate verdicts + plane digests), alpha plane only when an alpha < 255; caps before allocation
- [ ] R4.5b `pdf/write/serialize.rs` on pdf-writer: catalog, pages, 3 Type1 WinAnsi fonts, image XObjects (DeviceRGB + DeviceGray SMask Decode [0 1]), Link annots (Border [0 0 0], URI hex ASCII), Info (Producer/Creator Faunosteo, Title/Author/Subject/Keywords UTF-16BE hex, dates literal), attachment (EmbeddedFile Flate + Params, Filespec, Names, AF), classic xref; `export.rs` (checks → layout → serialise), `self_check.rs` (re-read with R4 reader, attachment == envelope), `from_envelope.rs`; errors `self_check_failed`
- [ ] R4.5c cargo O2: 12 R3 PDFs + real raster + store path: streams equal after B3 name resolution (lopdf dev-dep), image planes equal, links equal, Info equal but Producer/Creator, attachment bytes equal (store-path: D-R11 order only); goldens/r4/pdf.*.sha256 of the R4 outputs; export-side security cases (PNG budget 28, SVG hostile, URL injection, size E2, reexport)
- [ ] R4.5d external checks: `qpdf --check` clean, `pdfdetach -list` osteo-report.json, `pdftoppm -r 150` R3 vs R4 0 px (12 + real raster), O11 frozen scanner + N-1 Zod copy read every R4 PDF, stripped R4 PDF → attachment_stripped; TS reader (packages/pdf) reads R4 PDFs; R4 PDF → Rust import → same report (no data loss)
- [ ] R4.5e wasm: proofs export `export_pdf_for_test` (input JSON + rasters) → wasm digests == native digests; module size with the writer linked (W1 ≤ 600 KB gzip); Node timings/allocations on demo, L, CAP vs TS baseline (same files)
- [ ] R4.5f record RUST.md §10.7, ledger targets, suites green; STOP before R4.6
- [ ] R4.6 app export (session in main instance, owner phone check of L)
- [ ] R4.7 report-compare in Rust
- [ ] R4.8 deletions + docs + ledger census