wai-vector: the independent checker, written from the extension text alone, and a text fix (D7-4) #219

Merged
dcharlot merged 5 commits from wai/d7-4-vector-checker into main 2026-10-11 16:59:32 -04:00

2026-10-11

Transaction Science
ci(wai-vector): the independent checker as its own job (D7-4)
All checks were successful
standards workspaces build + test / arl-rs (pull_request) Successful in 1m11s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m5s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m31s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m12s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m10s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m17s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m14s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m24s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 2m32s
WAI section references / cited sections exist (pull_request) Successful in 10s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 4m21s
wai-vector vector graphics / linux-x86_64 (pull_request) Successful in 54s
wai-vector vector graphics / wasm32 under Node (pull_request) Successful in 22s
wai-vector vector graphics / wasm32-wasip2 (wasmtime) (pull_request) Successful in 31s
wai-vector vector graphics / fuzz, peak allocation, comparison count (pull_request) Successful in 16s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 4s
wai-vector vector graphics / independent checker (Python) (pull_request) Successful in 2m19s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 5m13s
standards workspaces build + test / aac-rs (pull_request) Successful in 3m48s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 1m30s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 43s
standards workspaces build + test / map-rs (pull_request) Successful in 43s
standards workspaces build + test / mesh-rs (pull_request) Successful in 45s
standards workspaces build + test / openpay (pull_request) Successful in 3m18s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 3m11s
wai-vector vector graphics / linux-aarch64 (pull_request) Successful in 1m12s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 3m18s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 8m22s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 3m45s
wai-vector vector graphics / macos-arm64 (pull_request) Successful in 1m43s
The job `checker` runs wai/tools/wai_vector_check.py under Python 3.11 on the linux
runner: every expected file of vector-conformance/ recomputed byte for byte, every
frame rendered, every payload and set rewritten to its own bytes, every digest of
sha256.json recomputed. The path filters already name wai/tools/wai_vector_*.py; the
concurrency block is unchanged, and the job runs check-workflow-concurrency.sh.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 08:46:49 -04:00
Transaction Science
wai: graphics-vector text fix: five places the checker had to infer
Found by writing the independent checker (D7-4) from this text alone. In each
place the corpus already pins the reading the checker took; the text now states it.

  - section 2.7 step 1 and section 2.1 check 1: a payload shorter than its 80-byte
    header, and a set shorter than its 32-byte header, are refused at the first
    step (refusals/s1-short and wos1-short pin this). The text named only the
    fields such a file cannot hold.
  - section 2.1 check 2: the counts are taken one at a time, each against its whole
    range, so n_glyphs = 0 with points_total past its cap is outline_malformed
    (wos1-zero-glyphs-before-points-cap). The sentence listed the cap rule and the
    zero rule apart, which reads as two passes.
  - section 2.3 PATH: n_contours' upper bound n_points is a later field, which step
    4 says no field's rule reads. It is now stated as n_contours >= 1 at n_contours
    and n_contours <= n_points at n_points, as section 2.0 places it.
  - section 2.4 ITEM, group begin: 'rule 0 with no clip' is checked at ref, the
    later field (refusals/s4-item-rule-no-clip pins 'at ref').
  - section 2.10, the probe set: level 1 took the first and last frame even for a
    rate at which the document has none (the first exceeding the last), and the
    sidecar's own range check then refuses the tool's sidecar. No corpus vector has
    an empty range, so this one was found only by construction: canonical/minimal
    with t0 = 1 and dur = 100 at 25 fps loads, and gets level-1 probes g = 0 and 1.
    Level 1 now applies when the document has a frame at the rate, and a document
    with no frame at any covered pair has no sidecar, since probes holds at least
    one entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 08:46:23 -04:00
Transaction Science
wai-vector checker: two fixes from the first comparison; the per-fill density bound; the sidecar exercise
The first comparison run found two faults in the checker, both mine; the text is
clear on each:
  - text_hash hashed from the TEXTS offset up to STRINGS, taking in ITEMS, GLYPHS
    and CLUSTERS. Section 2.11: the TEXTS table followed by the STRINGS area. Fixed.
  - the Wos1 record lacked the slot the load stores a set's bytes in (a crash).

Also:
  - section 3.7's per-fill bound D_r <= 256*p is asserted for every fill, with p its
    stored point count; fills/comb-16382 attains it (gap 0);
  - the corpus carries no section 2.10 sidecar, so for every accepted payload that
    renders, the driver builds the authoring tool's sidecar from the frames, parses
    and rewrites it, checks every probe and clip, and requires sidecar_malformed,
    sidecar_mismatch and layer_mismatch from three corruptions;
  - the probe set's level 1 takes the first and last frame only when the document
    has a frame at that rate, per the text fix that follows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 08:45:34 -04:00
Transaction Science
wai-vector checker: the corpus driver (D7-4)
Maps each file under vector-conformance/ to the computations of the previous
commit, from the corpus README's layout: the expected file's JSON for every
payload, outline set, arithmetic input and curve list, written canonically and
compared byte for byte; the rewrite of every payload and set to its own bytes;
each refusal's step where the vector's name or description pins one; and every
digest of sha256.json. Committed before the first comparison run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 08:41:40 -04:00
Transaction Science
wai-vector: the independent checker, written from graphics-vector.md alone (D7-4)
wai/tools/wai_vector_check.py, Python 3.11+, standard library only, run with
python3 -I. Written from wai/extensions/graphics-vector.md sections 1-3, the
notation of integer-operators section 2 and SPEC section 7's digests, before any
comparison with the corpus and without reading the reference crate.

It parses and rewrites WOS1 and WVG1 from their fields, applies section 2.7's
refusal order with the code and step of the first failure, computes section
3.4(a)'s interval check and 3.4(b)'s cost, renders R(P, S, z, r, g) by the
closed-form crossings in big integers, checks the digest sidecar, and asserts
section 3.12's bounds on every value it forms. The corpus driver follows in its
own commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 08:39:07 -04:00