Commit Graph
803 Commits
Author SHA1 Message Date
bchanot d8562f60f5 fix(anatomy): V1-2.2 refuse a root visibility that hides the markers
Both composers append the marker layer as the root's last child, so a
root visibility="hidden" whose children set visible back drew the
drawing without a marker (0 marker pixels in Chromium and Firefox, PDF
and canvas). The reader refuses any root visibility but visible
(root_visibility); cleaning, verdict, preview, PDF gate and both
composers answer it.
2026-10-30 18:56:48 +01:00
bchanot 81f7639c75 chore(memory): V1-2.2 reserved ids evidence, mutations, contract, TODO 2026-10-30 17:31:01 +01:00
bchanot 6ed4d21eb3 docs(docs): V1-2.2 reserved ids in RUST.md 12.9, contract, Illustrator steps 2026-10-30 17:31:00 +01:00
bchanot 08efd9a792 fix(anatomy): V1-2.2 reserve the PDF halo id in the reader and composers
A drawing defining filter#osteo-halo replaced the PDF halo (a transparent
filter erased the marker); an element holding the id before the first
defs won its resolution. The reader refuses the id in any letter case
(reserved_id), both composers refuse such a tree, the halo is always the
engine's. Exact name only: osteo-overlays stays.
2026-10-30 17:30:48 +01:00
bchanot 2f1f0764bf docs(docs): V1-2.2 finalisation review drift, canvas size cap, TODO 2026-10-30 15:21:05 +01:00
bchanot f976f33307 chore(memory): V1-2.2 finalisation, A6 scope, BDR-088, LRN-101, floor wording 2026-10-30 15:05:56 +01:00
bchanot 7d9ab8cf2f fix(anatomy): V1-2.2 glued url( removed everywhere, Figma exports, mask units
The reader removes any attribute holding a url( that url_openings does not read, so reader, verdict, preview, canvas and PDF view accept the same drawings. maskUnits, maskContentUnits, clipPathUnits allowed with their two keywords (owner go). The owner's two raw Figma exports committed as fixtures with fixed expectations.
2026-10-30 15:05:56 +01:00
bchanot 98060d74a3 chore(memory): V1-2.2 owner decisions, BDR-087, LRN-100, final review 2026-10-30 12:50:01 +01:00
bchanot 05de816962 chore(memory): V1-2.2 final module size, check:all on f1ef6a4, journal 2026-10-29 17:22:03 +01:00
bchanot f1ef6a466f fix(anatomy): V1-2.2 review LOWs, owner export procedure, evidence
Composer check counts url( openings apart from the reader; tab and
newline character references tested; RUST.md sizes and counts of the
final build; owner procedure for Illustrator, Figma and Affinity.
2026-10-29 17:15:02 +01:00
bchanot a678faaa23 fix(anatomy): V1-2.2 read url() references in their strict spelling only
Security review BLOCK(1): url(#%61) passed the dangling check and the
per-view scoping and resolved in browsers. One strict reading now, other
spellings are active content; glued names are other functions; the
composer refuses an unscoped reference; owner export procedure.
2026-10-29 16:49:15 +01:00
bchanot 5281337412 chore(memory): V1-2.2 arbitration criteria, mutation script, TODO 2026-10-29 16:24:30 +01:00
bchanot 93e4e81bda docs(docs): V1-2.2 owner arbitrations in the contract and RUST.md
Contract §6.5, §6.7, §8.1, §9.2, §9.3, §10, §13, §15 and §17.4 for the
SVG references, the stored form, colours and removals; RUST.md §12.7
records what was built, the declared oracle changes and the size audit.
2026-10-29 16:24:19 +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 bb5efa0f00 fix(domain): V1-2.2 refuse a removal while another element names it
sheet.edit remove answers has_dependents, the document unchanged, while
dependents lists anything but descendants (owner decision 2026-10-29);
the property test checks no removal adds a referential issue.
2026-10-29 16:24:17 +01:00
bchanot e823655f09 fix(anatomy): V1-2.2 owner arbitrations on SVG references and bytes
Refuse local references to ids a drawing does not define, scope canvas
ids per view, upload every drawing in one stored form checked by the
verdict and the preview, keep strict numeric rgb() colours, and commit
real Inkscape 1.4.3 exports with their generator.
2026-10-29 16:24:07 +01:00
bchanot 17d919971e chore(memory): V1-2.2 checkpoint, evidence, BDR-086, LRN-097/098, TODO 2026-10-29 14:05:28 +01:00
bchanot ca31b787b6 fix(domain): V1-2.2 second review round, linear walks, bounds, CSS loaders
Verifier ECARTS(3) and security PASS on 8294d54: one indexed walk per
view chain in sheet.edit, a set for referenced drawings, released
preview parses, xml:base and CSS loaders refused, fail-closed PI scan,
PI drawings rejected by the preview, the builder naming its cap.
2026-10-29 13:58:32 +01:00
bchanot 8294d5471c fix(anatomy): V1-2.2 review findings, PIs and HTML refused, bounds
Security audit (PASS, 2 MEDIUM, 2 LOW) and verifier (ECARTS 6) on
741c25c: processing instructions and HTML fetchers refused, active
content under a long title classified, linear review groups, full
fixpoint check, bounded preview drawings, missing cap fixtures and
property checks, record wordings.
2026-10-29 13:38:33 +01:00
bchanot 741c25c464 docs(docs): V1-2.2 RUST.md §12, contract decisions, core pointers
RUST.md §12 records the authoring core, its proofs, measures and
residual risks. The contract records the owner's V1-2.2 answers
(§17.4): editor exports supplied by the owner, the strict-parse code,
the draft load rule; CLAUDE.md and the sheet-model rule point to it.
2026-10-29 13:14:23 +01:00
bchanot 8ae756534c feat(domain): V1-2.2 wasm facade, contract types, module proofs
PreviewBuilder, PreviewSheet and clean_svg on the browser module, the
31 ts-rs types and their index, the glue interface, and the proofs on
the shipped module; the module stays under its 600 KB budget.
2026-10-29 13:14:22 +01:00
bchanot cf37aa265a feat(anatomy): V1-2.2 classify and clean drawings before upload
The sanitiser walk names removals that carried active or external
content; clean_svg answers clean, cleanable or rejected, the cleaned
text reading back with no removal. Committed cairo and ImageMagick
exports; the owner's editor exports go under exports/owner.
2026-10-29 13:14:22 +01:00
bchanot 64a43840ce feat(domain): V1-2.2 document measure, review groups, verdict, preview, edits
The core's authoring surface of contract §16.3: the server's document
measure, review groups with digests and removal groups, the change list,
the pure server verdict in the shape M5 reads, PreviewSheet with draft
and published modes, and the editor's commands with the §6.6 markings.
2026-10-29 13:14:21 +01:00
bchanot ac71c5b662 chore(memory): V1-2.1 final checkpoint, TODO, journal 2026-10-28 21:21:09 +01:00
bchanot 532c61e087 docs(docs): V1-2.1 measured equine size, e2e:sheet-assets citers, logs
The M5 row gives the measured content::text size; §15 and §16.4 point the
e2e:sheet-assets rerun to the owner; the walk log carries its script and
the HTTP timing lines are committed.
2026-10-28 21:15:08 +01:00
bchanot 9350366913 docs(docs): V1-2.1 M5 row, e2e:sheet-assets as an owner step, walk log
Contract §12.3 M5 row names the size CHECK swap and its validation on DEV
rows; §9.5 and §16.11 move the e2e:sheet-assets rerun to the owner (DEV
target). Evidence: 017 count, raw number-walk timings committed.
2026-10-28 21:08:23 +01:00
bchanot 1f9fa8b835 chore(memory): V1-2.1 raw old-schema repro log, evidence, LRN, TODO 2026-10-28 20:51:17 +01:00
bchanot 2379d28d9b test(supabase): V1-2.1 number-walk timing on a small base document 2026-10-28 20:42:52 +01:00
bchanot f9e40ba6aa docs(docs): V1-2.1 the size guard's number walk is linear 2026-10-28 20:34:36 +01:00
bchanot 538d10369f fix(supabase): V1-2.1 walk the document's numbers in linear time
jsonb_path_query row by row is quadratic on PostgreSQL 17: a document of
200k numbers under the cap ran into the statement timeout. One
jsonb_path_query_array call, then its elements. pgTAP 017 saves 600 000
numbers; the perf suite times 600k (saved) and 1M (closed code) over HTTP.
2026-10-28 20:34:35 +01:00
bchanot 7c4bf124f4 chore(memory): V1-2.1 review findings fixed, evidence, TODO, journal 2026-10-28 20:16:34 +01:00
bchanot 5620399492 docs(docs): V1-2.1 size bound on numbers, M7 note in 9.5, old measure
Contract §1 and §9.5 aligned with the text measure and the Git fixture,
§12.2 says where the size vectors live and how numbers are bounded.
2026-10-28 20:08:19 +01:00
bchanot 3eba6d89b2 fix(supabase): V1-2.1 bound printed numbers before the size measure
check_document_structure sums the numbers' printed digits one at a time
before building the whole text, so huge exponents answer
document.too_large instead of an out-of-memory error. pgTAP 020: the
full AR-1 B matrix and the rights RPCs refused to every non-owner; 017:
exponent vectors, the number bomb, publish.species.other alone.
2026-10-28 20:08:18 +01:00
bchanot 12816671e4 chore(memory): V1-2.1 final decisions evidence, BDR-085, TODO, journal 2026-10-28 19:41:17 +01:00
bchanot 7eca44167b docs(docs): V1-2.1 owner decisions M6, M7 fixture and the size measure
Contract §5.2, §5.5 (owner may review others' drafts), §12.2 (one text
measure for SQL, TypeScript and Rust), §12.3 and §16.2 (Git fixture for
the upgrade, live DEV object not read), §15 tests, §17.3 decisions.
2026-10-28 19:32:57 +01:00
bchanot b1de87b5d0 fix(supabase): V1-2.1 owner self-review grant and the text size measure
M6 option A: grant_catalog_right no longer refuses an owner granting
itself sheet_reviewer; authors stay refused at acknowledgment, approval
and publication. The document cap is the UTF-8 bytes of the JSON text:
check_document_structure drops pg_column_size and M5 replaces the base
table CHECK by octet_length(content::text). pgTAP 015 and 017 cover the
owner-reviewer journey and cap - 1, cap, cap + 1, multi-byte, dense.
2026-10-28 19:32:57 +01:00
bchanot 2af61e72cc chore(memory): V1-2.1 portable M7 rehearsal, final evidence 2026-10-28 19:02:12 +01:00
bchanot b9470b4d2d fix(supabase): V1-2.1 take the write budget after the foreign-key locks 2026-10-28 19:02:11 +01:00
bchanot f80f325fd6 chore(memory): V1-2.1 evidence update, M7 rehearsal scripts, TODO, journal 2026-10-28 18:44:00 +01:00
bchanot 961995804a fix(supabase): V1-2.1 close the second verifier and security findings
Save and submit lock the sheet before the version; change_note length and a
blank FR name answer closed codes; pgTAP for a capability refused to a
factorless account and the five remaining historical-sheet RPC refusals.
2026-10-28 18:44:00 +01:00
bchanot 4a829416c6 chore(memory): V1-2.1 corrections evidence, TODO 2026-10-28 18:14:11 +01:00
bchanot a21866e25c docs(docs): drop stale references to the removed SQL mirror and client gate 2026-10-28 18:14:10 +01:00
bchanot ef1f4b593f test(supabase): V1-2.1 re-runnable sandbox suite, two-session cases, caps timing
F18 and workspaces no longer leave the seed owner changed. Ten two-session
scenarios with a blocking session, seed-owner AR-1 acceptance, shim columns
against the image, save/submit/approve/publish timed at the caps.
2026-10-28 18:14:10 +01:00
bchanot d05f75da84 fix(supabase): V1-2.1 audit M1 M2 M3 and LOW fixes in M5
Approval needs an active sheet (lock sheet, version, round); a base only
from a still-published round version; rights.mfa before rights.capability;
withdrawal of a published round refused; approver separation at publish;
deprecate and working copy serialised; closed codes; append-only acks;
upload policy bound to the registering editor. pgTAP 017-019 added.
2026-10-28 18:14:09 +01:00
bchanot 3914eaa866 fix(supabase): V1-2.1 harden M5 after the security and verifier gates
Fresh security audit PASS; verifier ECARTS(10) addressed:
- publish re-checks the approver's sheet_reviewer grant (publish.approval.invalid)
- scope disclaimer enforced at approve and publish (publish.disclaimer.missing, O6)
- to_confirm split from inherited (publish.to_confirm.open distinct from publish.inherited.present)
- save_sheet_draft requires an active sheet; working copy adds the 2 MiB octet_length check
- delete_sheet_asset EXECUTE revoked from service_role (§5.4 surface)
- species table comment updated (§7.2); lease columns dropped from the reviews grant
- lock order sheet->version->round in decide/publish; conflict_retry kind (40001/40P01) in sheets.ts
Tests: pgTAP 016 (omitted status, separation, revoked-reviewer + renewal, ack carry,
inactive-species publish refusal, deprecated-delete, schema_version 1, content-write
without actor, working-copy positive), 001 census (no other writer of profile_roles).
871 real-stack pgTAP / 122 PGlite / 4 sandbox green; typecheck, lint, types drift clean.
2026-10-28 16:20:51 +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 9c13bae4bc docs(security): ratify AR-1 MFA for platform roles
AR-1 option B (BDR-083): aal2 for every platform role change. Contract 5.7 rule, path inventory, bootstrap, factors, recovery, sessions; F17-F19; M4 scope, tests, DEV preconditions; fresh security review integrated (19.4).
2026-10-28 12:20:11 +01:00
bchanot 41d3b09120 chore(memory): BDR-082 V1-2 decisions ratified, TODO, journal 2026-10-28 11:35:52 +01:00
bchanot 7fec2ce86f docs(docs): consolidate V1-2 contract with ratified O1-O23, open AR-1 2026-10-28 11:35:51 +01:00
bchanot 397d6007b4 chore(memory): V1-1 closed in TODO, V1-2.0 plan line, BDR-081, journal 2026-10-27 22:36:49 +01:00