Commit Graph
147 Commits
Author SHA1 Message Date
bchanot a5844b9d56 feat(supabase): verification retry by effective cause
resource_limit (intrinsic to the frozen input: frame, input or output cap,
SIGXCPU, SIGABRT, SIGSYS) and verdict_refused close the round at the first
occurrence; timeout, unavailable (now also an external SIGKILL) and
lease_expired keep the 2/5/10/20 s retries up to five attempts. pgTAP 021: 89;
sandbox case k closes at attempt 1.
2026-11-01 23:01:30 +01:00
bchanot e967ce6736 test(worker): verify child at the input caps, brk bounded by the limits
Max frame (document and base 2 MiB, drawings 6 MiB) passes through the full
sandbox; refusals just beyond give caps verdicts; RLIMIT_AS and the argument
filters still stop the verify child; seccomp traced on the max input; the two
tracked misclassifications asserted as current behaviour.
2026-11-01 21:07:23 +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 7043d39ae0 docs(docs): V1-2.3 verification worker, M6, sandbox e2e and rehearsals 2026-11-01 17:38:07 +01:00
bchanot 31fbb0317f feat(worker): V1-2.3 sandboxed verify child and sheet-verify job mode 2026-11-01 17:20:07 +01:00
bchanot c73415abef perf(anatomy): V1-2.2 skip arc spread sampling where unused
Third security review LOW: the f32 spread of an arc is sampled only
when an outline is drawn and under its vertex cap; the variants'
extremes still join the bounds.
2026-11-01 13:31:39 +01:00
bchanot 86dce16b09 fix(anatomy): V1-2.2 model arcs as browsers store them
Second security review: endpoints equal in f32 draw no arc, as in
browsers; an arc carries the spread of its f32 variants (endpoint or
radius moved one ulp) in its deviation and their extremes in its
bounds. Probe and mutants extended.
2026-11-01 13:04:43 +01:00
bchanot 03be75beed fix(anatomy): V1-2.2 refuse arc radii browsers read as zero
Security review of the interior rule: an arc radius below f32
precision was scaled by the core to a half disc the browser never
fills. Nonzero radii below 2^-20 make the path unreadable; arcs add
their f32 drift to the chord deviation; tracing stops past the vertex
cap; a path without outline is refused.
2026-11-01 12:40:14 +01:00
bchanot 8dd2d78d38 fix(anatomy): V1-2.2 refuse zones without a usable interior
A polygon or path zone or trigger must fill a disc of 4 CSS px on the
320 x 568 preview under the layer's nonzero rule, stroke left out:
conservative widest-disc search on the flattened outline, caps and a
per-sheet budget, closed codes interior_too_small and
marker_interior_too_small. Browser probe on six projects.
2026-11-01 12:19:08 +01:00
bchanot 76ead9567c fix(anatomy): V1-2.2 path numbers bounded by the frame magnitude
Fresh security review and verifier (MEDIUM): browsers read path data in
f32 and draw nothing for an arc radius or rotation past f32::MAX (WebKit
from 1e30) while the endpoints kept the verdict green. Every path and
viewBox number is now read within 2^20, else the path is unreadable.
Docs: section 12.12 transform table, mutation record, open zone finding.
2026-11-01 01:49:49 +01:00
bchanot 96b99784b5 fix(anatomy): V1-2.2 refuse markers too small on the phone preview
Owner decision 2026-11-01: the scale bypass (viewBox blown up, drawing
scaled back) is closed by the visible size, 4 CSS px on the editor at
320 x 568 (equine junctions 4.97 px), verdict marker_too_small. A frame
is usable only where browsers draw it faithfully: edges within 2^20,
span from 1 unit, aspect 100, offset 256 spans; measured in 3 engines.
2026-11-01 01:28:48 +01:00
bchanot 9c606aa567 fix(anatomy): V1-2.2 the visible wins on the editor canvas
Owner decision 2026-11-01. The canvas paints and hits every point hitbox,
then every zone and trigger, then every visible twin, which captures on
what it paints; a junction's disc is no longer taken by the zone drawn
after it. The PDF view keeps the document order and its bytes. Click
spec: the five fixme run unmarked, six projects incl. a 320 px phone.
2026-11-01 00:56:11 +01:00
bchanot 4f52f5e1c4 fix(anatomy): V1-2.2 marker layer and halo outside the drawing's group
Owner-approved lot B (brief 2026-11-01). The composition root is the
engine's (namespaces and frame); the drawing's root becomes a group and
the marker layer and halo are its siblings, so no root property reaches
a marker. Point hitboxes declare stroke none and visibleFill. Census over
the reader's whole allowlist; R3 references compared under the declared
transform; click proofs in three engines.
2026-11-01 00:39:57 +01:00
bchanot 9e49ed1b4d fix(anatomy): V1-2.2 frame slack on the span only, non-finite bounds refused
Security review: the edge slack grew with the frame's offset (a frame at
1e15 accepted a circle 4000 units past its edge) and f64 min/max drop a
NaN bound. The slack now follows the span only; a non-finite bound is
unreadable, never in frame.
2026-10-31 23:36:18 +01:00
bchanot 0c87c7f6c3 fix(anatomy): V1-2.2 refuse annotations outside their view's frame
A view without view_box was framed by the drawing's viewBox: moving it and
translating the drawing back left the horse identical and its 19 main-view
markers out of frame, accepted. One frame definition (view_box, else the
drawing viewBox read with the SVG grammar) now frames both composers and is
measured by the verdict (verification.validation.out_of_frame) and the
preview; curves and arcs on their shape. The document is never rewritten.
2026-10-30 20:54:46 +01:00
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 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 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 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 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 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 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 a21866e25c docs(docs): drop stale references to the removed SQL mirror and client gate 2026-10-28 18:14:10 +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 475a41d705 fix(tests): R5.7 gate findings, digest typo, census needs #[test] fns
RUST.md and FILES.tsv carry ba79698c...fde7; ledger cargo targets must name a #[test]
function. Verifier and security reports recorded, journal entry.
2026-10-25 04:18:52 +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 0da7d3ab9f test(domain): R5.7 port the contracts only the TS suites checked
612 leaves and 26 legacy ids (curation_leaves), region inference, R5.1 ledger rows,
generated folder lists, migration-map oracle entry by entry, overlay removal, halo
filter, CHG-000 and dollar-tag refusals; report-v2 fixtures moved to crates/core/tests
(sha256 unchanged).
2026-10-25 03:59:49 +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 943a25a98f fix(domain): R5.6 prep gates, strict declared block, patch builds, docs corrected
v1 refuses a non-hex or historical value (NotCanonical); the switch patch now builds
report-compare and refuses unknown block keys; RUST.md 11.19 states the measured
rehearsal (4 + 3 expected failures) instead of a green claim.
2026-10-24 14:57:44 +02: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 1ec9e1bea6 fix(domain): shape check sees positional parents, multicast never an own address 2026-10-24 03:47:07 +02:00
bchanot d502dfa923 fix(domain): refuse three non-canonical v3 shapes, R5.5 LOW fixes, R5.6 plan
check_v3_shape at read_report_document v3 and parse_envelope (sheet, practitioner
as non-objects, severity as non-string); Protocol errors final; DEV address must be
an own unicast address. SQL confirm function and DEV keys characterised, no change.
2026-10-24 03:34:38 +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 a481af52c7 docs(docs): R5.5 upload tool runbook, caps, serde tolerance characterisation, contract 2026-10-23 21:16:59 +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 c4e717da86 fix(anatomy): R5.4 drawings projection charges each drawing's fixed parts 2026-10-23 16:38:06 +02:00
bchanot 411e1058c0 fix(anatomy): R5.4 review drawings bounded per annotation, report tables summed, docs counts 2026-10-23 15:59:19 +02:00
bchanot 29eb499539 fix(anatomy): R5.4 records weigh every cloned string with its header 2026-10-23 15:34:38 +02:00
bchanot 8bdb079f70 fix(anatomy): R5.4 records charged at each record, review drawings bounded before rendering 2026-10-23 15:21:31 +02:00
bchanot 5880dfa959 fix(anatomy): R5.4 records bounded in total, CHANGELOG tables projected before they are joined 2026-10-23 14:58:40 +02:00
bchanot 777c8000b8 fix(anatomy): R5.4 aligned report tables bounded before they are built, declared case fully held, docs 2026-10-23 14:39:51 +02:00
bchanot aeb5050502 fix(anatomy): R5.4 field segments and code spans on the generator alphabet, wiki and liquid brackets refused in list items, linear guard 2026-10-23 13:58:14 +02:00