Commit Graph
61 Commits
Author SHA1 Message Date
bchanot 1b359598ab chore(workspace): R5.7 delete packages/anatomy and packages/domain
The TS pipeline, domain, upload script and legacy scripts leave; xmldom out of the
lockfile, Dockerfile copies trimmed. LEDGER.tsv (407 cases) and FILES.tsv (112 files)
record each disposition; r4 and r5 census tests guard the tree, lockfile and
production imports.
2026-10-25 04:00:07 +01:00
bchanot 9e87016399 feat(domain): R5.6 fingerprint switch to sha256-rfc8785-validated-v1
The Rust pipeline is the official seed writer (pnpm import:equine); sheet-ref.json
and report-migration-map.json carry 12d78872...74e2 and the v1 block, the only two
seed files changed. 27c7383c...2660 stays a registered alias, honoured only through
LoadedSheet::recognises_historical_stamp (verified v1, recomputed document). M1: the
snapshot of an old report keeps its stamp; export, archive reader strict. Historical
oracles run in their pre-switch context; equivalence is crate-private.
2026-10-25 02:02:42 +01:00
bchanot 3b9a395d43 feat(domain): R5.6 prepared, fingerprint convention and registry inert, switch patch
canonical_json (RFC 8785), sheet_fingerprint behind feature fingerprint,
TRUSTED_ALIASES (one equine pair), equivalence and check_declared; tests against
the RFC vectors, the V8 numbers, an independent Node reference and the archives.
No consumer wired: the switch is a rehearsed patch under .claude/tasks/plans.
2026-10-24 14:36:01 +02:00
bchanot fad85c0f92 fix(supabase): R5.5 round 2 nits, e2e INIT_CWD, final error wording 2026-10-23 21:43:30 +02:00
bchanot 56593af25c fix(supabase): R5.5 gate round 1, final errors, four attempts, keys off argv, runbook 2026-10-23 21:34:24 +02:00
bchanot 2c445063a4 feat(supabase): R5.5 upload-sheet-assets in Rust, R5.4 caps and FLOOR clarification
Core rules curation::upload (manifest, local destination, bytes through the SVG reader,
plan from observed state); binary upload-sheet-assets over ureq (handshake, no overwrite,
confirm after verify, bounded retries, key never printed); pnpm assets:upload repointed,
e2e:sheet-assets for the local stack. 4 MiB cap on changes.json and references.json.
FLOOR clarification for audit prose with its negative proof.
2026-10-23 21:15:22 +02:00
bchanot eb667ada57 docs(docs): R5.4 synthetic coverage and URL query rule stated exactly 2026-10-23 17:39:33 +02:00
bchanot e0f149b28a feat(anatomy): R5.3 curated draft in Rust (changeset applier, migration map, stats, seed SQL) and pnpm r5:import-equine
crates/core/src/curation/draft behind the curation feature: strict changeset and references parsing as JSON.parse + Zod, the six ops, rename cascades, the B/C review rule, the R2 shape and integrity gate, migration map, document stats, seed SQL. import-equine writes both folders; --check reproduces legacy-import/ and the R5.3 draft files byte for byte (12 files, 0 differences), --out claims an absent or empty, non-symlink destination and never deletes. Parity: 825 records, 46 changes, stats, 612 leaves 442/141/29, 58 synthetic TypeScript cases (oracle r5/curation-synthetic.json).
2026-10-23 00:10:55 +02:00
bchanot 03bdb5eaa0 feat(anatomy): R5.2 legacy importer in Rust (curation feature, import-equine --check/--out), Prettier JSON and table layout, JS semantics; parity oracles frozen from the TypeScript 2026-10-22 21:14:45 +02:00
bchanot aed6b1e300 fix(domain): js_number rounds exact decimal ties to even as ECMAScript (zmij digits); V8 oracle of 44,322 values, Zod oracle bytes checked against the core's printing 2026-10-22 20:50:32 +02:00
bchanot 60cc0f5fa8 test(anatomy): R5.1 freeze of the TypeScript pipeline (oracles r5: intermediates, ids, fingerprint matrix) and the D-R5 study scripts; RUST.md §11 2026-10-22 20:18:12 +02:00
bchanot 3ed8ebb79f fix(tests): harness results name the build relative to the repository; absolute local paths redacted from committed results 2026-10-21 16:30:11 +02:00
bchanot dcc79400de fix(ui): bundle the footer's ZenQuality logo (production CSP img-src 'self' refused the hotlink); CSP proof counts every violation; gitleaks allowlist carries the owner's [gated 2026-10-18] marker 2026-10-21 15:47:18 +02:00
bchanot baebb98bc6 fix(tests): serve.mjs marks immutable by the resolved file's folder, not the request prefix; offline harness kills its server when setup fails 2026-10-21 00:30:47 +02:00
bchanot 63034e10c4 fix(tests): recette server sends the nginx.conf Cache-Control lines (env.js no-store, /assets/ immutable) so an offline import reuses the cached worker chunk; r4-offline-import.mjs re-runs J1.7 on three engines and two network cuts 2026-10-21 00:26:06 +02:00
bchanot 49b812b9b4 docs(docs): R4.9 verifier and security follow-ups: §6 rows 19 (J2 device run, blocking before merge) and 20 (WebKit worker error trace); port 4173 in the exposure table as an owner-opened recette rule; serve.mjs post-bind check typed from the address; report-compare comment names the residual race 2026-10-20 22:05:04 +02:00
bchanot 854d988c07 fix(tests): serve.mjs post-bind wildcard check reads the 'IPv6' family of server.address(); report-compare checks the type before opening (a FIFO or device is never opened) and again on the handle 2026-10-20 21:56:03 +02:00
bchanot a17ae45ed1 fix(domain): the core builds with no feature again: restore_copy (worker import path) behind pdf-read, the layout test sink behind pdf-write; rust-check lints and builds the core alone (the workspace run unified the wasm crate's features and hid it) 2026-10-20 21:27:04 +02:00
bchanot 9965d7f0a0 fix(tests): serve.mjs resolves --host before listening and refuses any wildcard result (every spelling: 0, 0::, ::ffff:0.0.0.0, scoped ::), listens on the resolved address and checks the bound one; report-compare opens once and checks size and type on the handle 2026-10-20 21:22:22 +02:00
bchanot 80cc261c24 fix(tests): R4.9 security gate findings: serve.mjs refuses an empty or unspecified --host (an unset FAUNOSTEO_DEV_HOST bound every interface); report-compare reads at most the 50 MiB cap + 1 byte after its size check; recettes source dev-env.sh first 2026-10-20 21:16:48 +02:00
bchanot eeae015bc4 docs(docs): RUST.md §10.11 R4.9 record: memory bench by dimension (linear flat after init, objects and URLs released, Chromium per-export growth = the browser's raster path, bounded at a plateau, control without the core identical), full checks, report:compare dry run; Chromium 16-step series and raster control results 2026-10-20 21:14:36 +02:00
bchanot ecc8699074 test(tests): R4.9 memory bench: linear memory, renderer RSS, live canvases/images/blobs/object URLs, transient peaks and rest windows per export, three engines; raster-only control and Chromium pressure step; first run results 2026-10-20 21:03:56 +02:00
bchanot 9e6125b656 docs(docs): R4.9 J1 and J2 recettes re-issued on the R4.8 build: OD-6 device list, J1.13 data kept on a refused import, J2.12 views and markers, J2.13 attachment and properties, J2.14 report:compare; results cells untouched 2026-10-20 21:03:55 +02:00
bchanot e88769a707 test(tests): R4.8 ledger reads its 301 frozen cases from the committed TSV, re-derives the dispositions of the deleted suites, checks every cargo and vitest target; browser scripts cite the frozen N-1 inflate copy 2026-10-19 12:17:01 +02:00
bchanot 02ebf05195 feat(domain): R4.7 report-compare on the core: pdf::compare (feature cli, pure lines, runner over a Files trait), report-compare binary on the seed sheet, pnpm report:compare switched to it; O10 230 rows (158 exact, 72 declared A.3 closed lines), 11 cases as ledger targets, binary spawned; rust-check on cli 2026-10-19 11:13:35 +02:00
bchanot 264c5fa3fc docs(docs): RUST.md §10.8 R4.6 record (buffers, memory, parity, E3/E4 three engines, release series, W1, risks); ledger targets filled; compare-exports script; roundtrip raster-failure case; TODO R4.6 closed; memory BDR-062, LRN-063/064, journal 2026-10-19 02:49:42 +02:00
bchanot cdcdda8e1c docs(docs): R4.6 J2 recette (procedure, results grid, kit script), export harness phases and dist override, export series script, ledger targets of the app PDF suites, CLAUDE.md export flow; export driver publishes its User Timing split 2026-10-19 01:41:57 +02:00
bchanot ba6ac078be test(tests): R4.5 export-side security cases; ledger rows of the writer cases point at cargo (only the R4.7 compare rows pending) 2026-10-18 23:24:37 +02:00
bchanot 1550d2160a test(tests): R4.4 layout timing on L and CAP; ledger rows of the text and layout cases point at cargo 2026-10-18 21:51:40 +02:00
bchanot 70007e0c93 feat(domain): R4.4 layout to a draw log: text rules, AFM metrics, dates (O4, O5, O6) and the page layouts (O1)
pdf::write: text (safe_text with the frozen V8 classes, js_upper from the O4 tables,
js_trim, measure = Σ(WX || 250 + KPX) × size / 1000 over WinAnsi bytes, wrap_lines on JS
\s), afm_data generated by scripts/r4-afm-data.mjs from O5 and O4, dates (Date.UTC years
0-99 → 19xx, fr-FR / en-US long dates), input checks (branding and labels schemas,
snapshot gate with the R3 SVG reader, sheet mismatch, page caps), the header, footer,
observation and conclusion layouts into a DrawLog (per page, footers last, links by page).
cargo: O4 55,992 widths bit-exact, 1,168 wraps, safeText over every code point, upper
1,580, O6 6,468 cells + 22; O1 12 runs 2,124 ops equal at full precision; the Step 6 text
and image goldens (24) derive from the log. ts-rs: ExportInput, ExportErrorKind,
ExportWarning, LogoSlot.
2026-10-18 21:47:40 +02:00
bchanot 71bcb742c9 feat(domain): R4.4 scaffold of the pdf writer module (feature pdf-write, text contract, test targets) 2026-10-18 21:31:10 +02:00
bchanot d2647505b0 chore(memory): BDR-059 J1 authorised with the WebKit reserves; kit carries the L report 2026-10-18 20:23:56 +02:00
bchanot b08373a89b docs(docs): RUST.md §10.5 completed (application build results, residual risks); R4 J1 procedure and kit
docs/development/R4_J1.md: the two LAN surfaces (dev server, production build behind the
DEPLOY CSP through serve.mjs --host on the DEV origin), the kit folder generated by
scripts/r4-j1-kit.mjs (reference PDFs, the O8 hostile corpus with expected messages,
rescue copies), twelve checks per device, what to report.
2026-10-18 19:52:25 +02:00
bchanot 08f01ef363 test(tests): R4.3d browser proofs on the production build: app import baseline on the Rust path, CSP with and without the keyword, leak series, WebKit repetition
Same perimeter as the TS baseline (226 files, 3 engines, real Home page): 666/678 outcome
and message agreements, the 12 others the 4 declared files; W5 0 long tasks (TS 91 and
173 ms); 50 MiB file in WebKit 145/126 MiB against 324 with the worker read and 76 for the
TS. CSP: editor opens with the keyword, the engine message without, in 3 engines, the
worker's wasm-eval refusal reported by Chromium and Firefox. Leak series on the app:
Chromium ≤ 2 MiB per import after init, Firefox GC sawtooth reclaimed, WebKit grows with
same-tab navigations (control too) and levels off on one page; 20/20 WebKit workers closed.
2026-10-18 19:48:31 +02:00
bchanot 49591c53cd test(tests): R4.3a browser re-measure of large files, leak series, WebKit repetition (stream sink, BYOB)
Streaming into FileBytes removes the file's JavaScript copy in Chromium and Firefox
(50 MiB: 65 and 67 MiB summed growth against 56 and 79 for the TypeScript); WebKit keeps
about 180 MiB for any file read inside a worker (272 against 76), a main-thread BYOB read
feeding the worker's sink measured at 106. Corpus 666/678 on the stream path. Leak series
(3 engines × 3 documents × 3 repetitions): Chromium ≤ 0.5 MiB over the last 5, Firefox
within ±3 (idle only), WebKit copy +13 then level (12-import series −2.3). 20 dense
imports in WebKit: no worker error event.
2026-10-18 18:50:47 +02:00
bchanot c84186b032 test(tests): R4.2e browser measurements of the Rust import (module worker page, same perimeter as the TS baseline)
r4-import.mjs runs the 226 baseline files and the hostile classes through a disposable
module worker calling SheetHandle.import_pdf in Chromium 156, Firefox 157 and WebKit 27.2
under the RSS watchdog (not a guaranteed limit); compare-imports.mjs prints TS vs Rust;
serve.mjs gains opt-in mounts (/r4/, /pkg/). Results 2026-10-18-r4-import.json: 666/678
agreements, the 12 others are the 4 declared files; W4 met (max 68 MiB linear); the
1 GiB ceiling traps in every engine.
2026-10-18 16:58:42 +02:00
bchanot 1695fbb408 chore(chore): wasm-build refuses any *_for_test export in the shipped module 2026-10-18 16:18:26 +02:00
bchanot ebcae06ac1 test(tests): R4.2 ledger: reader rows point at their cargo tests, census checks they exist
69 ported rows of scan, inflate, read and the security import cases now name the O7/O9
cargo tests; r4-ledger.mjs refuses a ported cargo target absent from cargo test --list.
2026-10-18 16:14:10 +02:00
bchanot f8579bc19a feat(domain): R4.2d attachment probe, import_pdf and SheetHandle.import_pdf on the wasm facade
locate_attachment (shared 16 MiB budget, JS-path steps in the TypeScript order, OD-3 cap
hook off until measured), pdf::import, facade import_pdf with the PdfImportKind kinds
(ts-rs exported). cargo: O7 144 inputs (locate, read, archive rows) and O8 51 cases equal
to the R3 path, 3 OD-4 differences declared (lone surrogate in an overwritten duplicate
value). Node through the shipped module: the same O8 outcomes, every reference PDF.
Module 421.7 KB gzip (W1 budget 600 KB).
2026-10-18 15:55:46 +02:00
bchanot 9850a8341a feat(domain): R4.2c json_js: JS-path side effects of the attachment probe
starts_json_object, depth and value prescan (OD-3 proxy), TextDecoder-parity lossy decode
(400-case oracle generated by scripts/r4-utf8-oracle.mjs, 0 difference), overflow → null
rewrite with the JSON number grammar, lone-surrogate neutralised probe (OD-4).
2026-10-18 15:44:54 +02:00
bchanot 21d34fb9a7 feat(domain): R4.2 scaffold of the pdf reader module (feature pdf-read, miniz_oxide)
Module layout of plan §B.1.1 for the reader (read/{scan,strings,stamp,inflate,probe},
json_js), shared constants and types, index_of; feature-gated test targets; the wasm
facade enables the feature; rust-check runs the gated clippy and tests.
2026-10-18 15:29:58 +02:00
bchanot 4439fd2420 test(tests): R4.1e browser harness and TS baselines (Chromium, Firefox, WebKit)
Playwright harness under scripts/browser: 127.0.0.1 server with the DEPLOY
CSP, export and import baselines of the TypeScript engine under a 4 GiB RSS
watchdog (not a guaranteed memory limit), O9 browser columns in
inflate.browsers.json (26 rows agree with Node in all three engines).
Results of 2026-10-18 committed; the O9 Node test no longer expects browser
columns in inflate.json.
2026-10-18 15:05:28 +02:00
bchanot 4bdfda59ba test(tests): R4.1f O10 report:compare outputs and the R4 test ledger (299 cases) 2026-10-18 06:00:34 +02:00
bchanot c0a5c8c7ce feat(editor): the canvas tells an engine failure (retry) from a view it cannot draw (no retry) 2026-10-15 01:03:16 +02:00
bchanot 967c71c31e test(tests): visual-canvas dom and perf modes (Chromium DOM vs O1, timings, memory) 2026-10-15 00:03:50 +02:00
bchanot 47c5f49014 test(tests): R3 freeze O1 canvas trees and the visual comparison script 2026-10-14 23:26:20 +02:00
bchanot e49009e363 fix(domain): security audit follow-ups — deserialise JSON by reference, literal delete paths in the wasm build
The security gate (PASS, 0 blocking) reported LOW items: an imported
attachment's Value was copied for the wrapper and the snapshot gate (a
hostile 16 MiB attachment multiplied linear memory), and wasm-build.sh
deleted its outputs through a variable. Every JSON input is now read with
T::deserialize(&Value) (same errors, no copy); one deserialiser instead of
two also shrinks the shipped module from 1,180,281 to 1,046,498 bytes raw
(372,132 → 340,929 gzip). The two outputs are removed on their literal
paths. RUST.md records the numbers, the quarantine retention and the
base-image tag residual.
2026-10-14 01:02:30 +02:00
bchanot 7be94d4ce6 chore(docker): R2 application image with the Rust core — wasm stage, precompressed module, CSP proof on the image
Dockerfile stage 0 (rust:1.99.0-bookworm, wasm32 target, wasm-bindgen-cli
at the builder's pinned version, cargo cache mounts) builds the shipped
module with scripts/wasm-build.sh (WASM_BUILD_SHIPPED_ONLY=1); the Node
stage copies packages/core-wasm (manifest + pkg/); the runner gzips the
module and nginx serves it with gzip_static (application/wasm, 1,180,153
bytes raw, 372,275 served). docker/csp-proof/app-image.sh runs the real
image behind the DEPLOY.md CSP in headless Chromium: with
'wasm-unsafe-eval' a report is created and a zone click is applied by the
core with no script or wasm violation; without it the editor shows the
degraded notice, stays put and leaves the draft untouched; /login,
/app/account and / never request the module (15/15 checks).
2026-10-14 00:45:51 +02:00
bchanot 343d6f4c1f feat(workspace): R2.4 core runtime — lazy load, poison on trap, offline re-instantiation, per-generation sheet handles
packages/core-wasm: browser-safe CoreRuntime (synchronous calls once ready;
a WebAssembly.RuntimeError poisons the instance, the call answers internal,
a fresh instance comes from the kept compiled module and a glue record
imported in advance; at most 3 recoveries per page; retry after a load
failure), SheetSession (handle rebuilt per instance generation, never
called on a dropped one; invalid_sheet without poisoning), Node source.
crates/wasm: SheetHandle (sheet held in the module memory). Two builds:
pkg/ shipped without trap exports (checked), pkg-proofs/ for the trap
tests; BUILD_STAMP (hash of the Rust sources) refused when missing or
stale by the vitest global setup instead of skipping. Failure envelope
carries a numeric found version; compact JS-number output.
2026-10-14 00:12:04 +02:00
bchanot e633169a00 fix(workspace): LAN exposure via host firewall — the Supabase CLI forces 0.0.0.0, so PostgreSQL / Studio / raw Mailpit close by UFW rules on the LAN interface; gateway reduced to Mailpit behind basic auth on 54325
Owner run: the CLI prints 'All services bind to 0.0.0.0' and ignored the
rootless daemon's default address; the gateway could not share 54321/54324
with 0.0.0.0 listeners. Now: Kong serves the API directly; the DEV gateway
serves only Mailpit with basic auth on <DEV host>:54325; ENVIRONMENTS.md §3
gives the exact UFW rules (interface-scoped deny on 54322-54324, two cases
by current UFW state), rollback and impact; dev:net-check proves the
allowed surfaces from a distinct Docker network (5/5 OK) and prints the
refusal checks to run from another device, since a rootless container's
traffic to the host is delivered locally and cannot see the LAN firewall.
LRN-053 corrects LRN-052.
2026-10-13 23:01:19 +02:00