Commit Graph
78 Commits
Author SHA1 Message Date
bchanot 34a49f5769 fix(supabase): branch-neutral refusal message of the sheet-assets runner 2026-11-02 00:24:01 +01:00
bchanot f924ad056d test(supabase): sheet-assets e2e on the sandbox only
pnpm e2e:sheet-assets is now an alias of pnpm db:sandbox sheet-assets-e2e:
gateway on 127.0.0.1:57800 (occupied port refused), the runner refuses any
URL but the sandbox gateway and any key not issued by the sandbox, before
building or any request; no DEV URL, port or key remains.
2026-11-02 00:09:02 +01:00
bchanot 3c141c942b fix(supabase): targeted review LOWs on retry and sandbox isolation
fail_sheet_verification refuses lease_expired (the claim's record, never a
worker report); the sandbox state dir guard resolves the repository path; the
avatar suite also refuses keys not issued by the sandbox. pgTAP 021: 90.
2026-11-01 23:13:42 +01:00
bchanot cdd43ac431 test(supabase): avatar e2e on the sandbox only, per-session seed secret
pnpm e2e:avatar is now an alias of pnpm db:sandbox avatar-e2e and the DEV
script scripts/avatar-e2e.sh is removed; the suite fails on any target but
the sandbox gateway and database; an occupied port 57800 stops the run before
anything starts. The sandbox replaces the seed accounts' DEV password by a
per-session secret.
2026-11-01 22:55:23 +01:00
bchanot 2a84e3702e test(supabase): avatar suite on the sandbox, per-run sandbox passwords
pnpm db:sandbox avatar-e2e runs tests/e2e/avatar-flow.e2e.ts with the real
worker (default mode) on the throwaway stack; the suite now requires its
database container by name, makes both accounts per run and expedites only
its own purges. Throwaway sandbox accounts get random passwords per run.
2026-11-01 21:02:59 +01:00
bchanot 6aa85fe7e4 fix(worker): V1-2.3 hostile corpus through verify, verdict and memory caps aligned 2026-11-01 17:55:49 +01:00
bchanot 5afb34ed0f test(supabase): V1-2.3 verification worker end to end on the sandbox 2026-11-01 17:34:33 +01:00
bchanot 661212a852 chore(ci): drop the debug name section from the shipped wasm module
wasm-bindgen --remove-name-section: 279 KB raw of function names no code
reads, 30.7 KB gzip; the 600 000-byte budget and its test are unchanged.
2026-10-29 16:24:18 +01:00
bchanot 77e5fa4cf5 feat(supabase): V1-2.1 M4/M5 secure sheet access and review workflow
M4 20261028100000_sheet_access_hardening + M5 20261028110000_sheet_review_workflow
(applied together; no unprotected window). Implements contract §5-§14.

- Catalogue rights table + owner RPCs; has_mfa / has_aal2_session (live
  auth.sessions check); grant_active vs caller_has split; catalogue reader
  predicate; can_edit_sheet on the sheet_editor capability (F14).
- AR-1 B: aal2 required on every platform role change, target verified factor,
  race-free last-owner guard (F18/F19); service_role loses table privileges on
  the catalogue + profiles/profile_roles and EXECUTE on the role RPCs (F12/F17).
- Reviewed lifecycle: version provenance + review columns, content/freeze/
  author triggers, rounds/comments/acknowledgments, save/submit/withdraw/
  comment/acknowledge/decide, atomic publish_sheet_version(review_id) on the
  stored verdict, deprecate/archive/restore, species RPCs, equine working copy,
  uploads with the storage check (F7) + editor INSERT policy + 2 MiB bucket.
  F1-F3,F5,F6,F8,F9,F13,F15,F16 closed. Verdict is a fixture until M6 (V1-2.3).
- O22: SQL business mirror removed, declared status check kept; pgTAP 011 and
  the Rust generator's SQL parts deleted, ledger retargeted.
- Access layer sheets.ts (closed SheetFailure kinds); old client publish gate
  deleted; types regenerated; upload tool reads via get_sheet_asset_state.

Tested on the throwaway sandbox only; DEV untouched. pgTAP 850 (real stack) /
122 (PGlite) green; real-GoTrue AR-1 B + F18 race green; fresh install and
M3->M5 upgrade green; V1-1 regression green; rust:check, typecheck, lint,
build, types drift clean. BDR-084, LRN-095.
2026-10-28 15:52:49 +01:00
bchanot 3e968eeeab test(app): Playwright animal and relation journeys on the sandbox
Ten journeys, FR and EN, desktop and 375 px, axe on every state. Seeds go
through quoted SQL literals; db:sandbox e2e-shell passes its arguments to
Playwright.
2026-10-26 17:11:29 +01:00
bchanot d7845b7339 chore(ci): check:all names each browser suite PASSED, SKIPPED or NOT RUN
A failing stage prints FAILED with its name and exits non-zero; e2e:shell is
reported NOT RUN (it needs the isolated stack); both suites keep their own
commands.
2026-10-26 01:02:54 +01:00
bchanot 2dc04bcfba chore(supabase): sandbox upgrade can stop at an intermediate migration
`pnpm db:sandbox up upgrade <version> <then>` applies the migrations before
<then> over the seeded older base, reports the workspaces, then the rest: the
path of a DEV database that took M1 first and M2 + M3 later.
2026-10-26 00:52:21 +01:00
bchanot 9b2a4bc6fc chore(ci): run the Chromium UI suite in check:all when installed
pnpm check:all runs pnpm e2e:ui after the node stage when the Chromium of the pinned Playwright is present, and prints a SKIPPED line with the install command otherwise. The shell suite needs the isolated stack and stays a separate run.
2026-10-25 23:37:00 +01:00
bchanot e3a2b3e114 test(app): authenticated shell suite on the isolated stack
pnpm e2e:shell (db-sandbox e2e-shell) builds a Vite server on 127.0.0.1:5192 against a Supabase URL that resolves nowhere and replays its calls on the sandbox. Per-test fictitious accounts through the admin API, a clean avatar seeded: sign-in, dashboard, the photo confirmation with a slow removal, the phone drawer, FR and EN, axe. No trace kept, fixture values masked in reports.
2026-10-25 22:46:19 +01:00
bchanot 57922e0902 fix(supabase): refuse bad sandbox arguments before starting anything
pnpm db:sandbox up with an unknown mode or a missing or malformed upgrade version started four containers and wrote the secrets before refusing. The mode and the version (fourteen digits) are now checked first.
2026-10-25 22:20:55 +01:00
bchanot a945e79131 fix(supabase): keep sandbox secrets off command lines and DEV out of reach
Security gate findings on db-sandbox.sh: containers get secrets from 600 env files, psql and the CLI read PGPASSWORD (no password in --db-url), an incomplete secrets file stops the script before any CLI call, the state folder is refused inside the repository.
2026-10-25 21:27:29 +01:00
bchanot 08abe42c48 test(supabase): isolated Supabase stack and real-stack suite for M1
scripts/db-sandbox.sh (pnpm db:sandbox): DEV images on an own network, loopback ports distinct from DEV, no volume, secrets generated outside Git; fresh and upgrade modes through the CLI's migration up, test db and gen types with --db-url. packages/supabase/tests/sandbox: M1 sign-up and confirmation, reads and refusals per role, residual GoTrue admin path, correlation cap, concurrent sessions.
2026-10-25 20:57:09 +01:00
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