wai-web: reach builds — L1, L2, J and an ES5 loader (CI verdict pending) #205
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/reach-builds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The shipped wai-web package needs WebAssembly with sign-extension, non-trapping float-to-int and bulk memory, a 64-bit integer that crosses the JS boundary as
BigInt, and ES modules. This PR adds three builds derived from that package, and an ES5 loader that picks between them, inwai/wai-web/reach/. The Rust does not change.CI verdict: pending. The forge run of
wai-web-reach.ymlfor the head3a8a2161is run #2640 (id 3740), queued behind the linux runner's backlog. Until it, or a later run, finishes green, nothing here is CI-verified; the executed equivalent below is a local run of the same workflow, not a forge verdict. This description will name the green run.What is built
wasm-opt --legalize-js-interface, binaryenversion_123)BigIntat the boundary--signext-lowering --llvm-nontrapping-fptoint-lowering --llvm-memory-copy-fill-lowering), then legalisedwasm2js, one ES5 script per profileL2 and J come in profiles:
full,verify_decode,verifyandreceipt.profiles.jsonlists the exports each keeps, andwasm-metadcedrops the rest.The J and L1/L2 scripts share an ES5 runtime (the builtins an old engine lacks, and i64 joined and split at the boundary: a
BigIntwhere the engine has one, aNumberexact below 2^53 where it does not) and the shipped glue compiled to ES5 with a fixed, counted set of changes (manifest.jsonrecords the counts).wai-load.jschooses a rung from feature probes alone, never the user agent:WebAssembly.validateon probe modules, one instantiated module that returns its i64 argument, and checks for typed arrays andBigInt. An early WebAssembly engine line (WebAssembly and the stack-trace capture API, but no RegExpdotAllflag: the featurenoDotAll) gets J, or the L2 receipt build, because the full MVP module has crashed an engine of that line on arm64. A rung can be forced, and detection never throws.The package of record, and CI
reach/record/keeps the package the site serves under/wai/pkg/:wai_web_bg.wasmc2b63f74…050eandwai_web.jsf63605f0…6f6a, built fromwai/wai-webat248846f1(manifest.jsoninput.commit;input.sourcesays how).wai-web-reach.ymlruns a leg per package on the linux runner:build.shruns withWAI_REACH_REQUIRE_RECORD=1, which refuses any other package, so all 11 outputs must have the manifest's SHA-256 and size: the bytes the site serves under/wai/pkg/reach/. Thenrun-modern.mjsand the engine images run on those outputs.The package is kept, not rebuilt in CI: built in the linux runner's image from the same commit, with the export at the same physical path and every remap, its glue is the same and its wasm is not (the code section differs; measured twice).
J's
wasm2jsis binaryen's WebAssembly build of the same release (npmbinaryen123.0.0, pinned with its integrity hash inpackage-lock.json), run on Node. The x86_64 Linux archive's nativewasm2jsallocates the translation's locals differently from the macOS archive's; the WebAssembly build gives the macOS archive's output on every host, for every profile, so no recorded output changed.Artifacts
From
reach/manifest.json. Brotli is quality 11.wai-load.jsc3dc79392e6bf75d6cc190cd38eabab94f449d0d3687585cae6c3e03fe6775a2wai_web.j.full.js1af5b5917ecb3097e8eb3c79342dd087bd3febeef58bd2222b623e0099b17848wai_web.j.receipt.jsb6c52b020c3daef6f0dc5a7ccbbd8e7134a951012987ceaaf66fdfaad9e2d77bwai_web.j.verify.js4862fb576c72bb12bffe4799684450c81a3181a34db134118a44e12b9204ab76wai_web.j.verify_decode.jsd2bb946fbab8dbcc5fb7ca101b6c4615881d3f1f1de47813a0b3c9e080f1b1bfwai_web.reach.js747db637684c8ffed24aab175a3dc1a399901c1d9699dd99c86a090b4b78bf0cwai_web_bg.l1.wasm25e728714bcc67ccb133042012860a53c881ea6c26c3dc7538bf378c0598b3b8wai_web_bg.l2.full.wasm5af77d42fbd2e2e6023789aca42dcb62c6bcf1ccb29e7303b31de5e6251fa88ewai_web_bg.l2.receipt.wasm89ad094a90fbc31aa3399d0e4db41728c742c110a90480952f3c2527310fb821wai_web_bg.l2.verify.wasmcbf4d3705f566b76ea1aab6d4513a51632df0373338e0e206cceff9d4b7c6a00wai_web_bg.l2.verify_decode.wasmefe0033b1cfc151054baf6282bd6cd9b2a264cf5df8321586cdbcf1f62928b87No output holds a host path or a toolchain folder: the package of record was rebuilt with the standard library's sources remapped to
/rustc/<the compiler's commit>(the earlier package carried the build host's toolchain folder in its panic locations, and every reach binary and J bundle with it). The J bundles' base64 data segments were decoded and checked too.Results at
3a8a2161wai-web-reach.yml, both legsforgejo-runner execofwai-web-reach.ymlin the runner's image (an executed equivalent, not a forge verdict)build.sh"all 11 outputs equal reach/manifest.json", run-modern green (every rung and profile forced, the ES5-stripped engine, the demo verify scripts on shipped, L1, L2 and J, the measurement's written files equal), and every engine image green. Tree leg: the same steps green on the tree's own buildbuild.shalone withWAI_REACH_REQUIRE_RECORD=1build.shwithWAI_REACH_RECORD=1build-wasm-pkg.sh … wai/reachfrom3a8a2161What the engine images cover, by Node image and the engine features each has:
node:0.12(no WebAssembly) → J;node:8.0.0(WebAssembly without thedotAllflag) → J for the full build, L2 for the receipt profile;node:8(MVP WebAssembly, noBigInt) andnode:10(MVP WebAssembly withBigInt) → L2;node:12andnode:14(the shipped build's WebAssembly features, noBigIntat the boundary) → L1. The README says which device classes each stands for, by capability. No real old device has been run. These proxies do not cover 32-bit ARM code generation, engines with the JIT off, small memories, or engine families other than the proxied one.Falsifications (earlier heads, unchanged code paths)
Each break was made on committed code and built with
build.sh; the named test was run, the file restored, and every break also madebuild.shrefuse its outputs againstreach/manifest.json.--legalize-js-interfaceL1/full receipt_verifyandi64_boundaryFAIL on current Node,node:12andnode:14L2/full receipt_verifyandi64_boundaryFAIL on current Node,node:8andnode:10J/full: most workloads FAIL on current Node andnode:0.12; the control, L1 onnode:12, passesreceipt_verifyFAILnode:12; the control,node:0.12, still gets JBigInt, an i64 result's low half is read as signedi64_boundaryFAIL on the ES5-stripped engine,node:0.12andnode:8; the control,node:10, passesAt this head the record leg itself was the falsification of the J translation: before the WebAssembly
wasm2js, it refused the four J bundles on the linux runner's image.Review fixes in this round
wai-load.js: the featurenoDotAll(was named after one engine); its reasons and comment say what the engine lacks.wai/README.md: the proxies by Node image and engine features, the device classes by capability, no engine, browser or OS family names; no counts that drift. The CHANGELOG claims no CI result.🤖 Generated with Claude Code
wai-web: reach builds — L1, L2, J and an ES5 loader, byte-identical to the shipped buildto wai-web: reach builds — L1, L2, J and an ES5 loader (CI verdict pending)wai generateandwai score build|render, with native pins a sink checks against a220d16a48Form v0 names the model inside the payload by the SHA-256 of one file, and SPEC §5 never said how that relates to §3.1's parameter-set pin, which governs every GenerativeDeterministic capability: whether a generate envelope carries a pin, or which wins when a pin and `model` disagree. The library registers the set as several files, so a form-less pin over the very file `model` names would be refused form_required. SPEC §5 now states the relation: the model file is the parameter set and `model` its identity; an envelope that names the generator carries no `prior` and a sink refuses one that does, whatever it names. §3.1 says so beside the pin rules, the non-conforming list names it, and prior-carriage §7's row says the set is never pinned and names the file. No library source changes. `wai inspect` and `wai unwrap` reported a generate envelope with a corrupt payload as conforming ("component roles ✓", no payload line). They now report the payload (form v0, with the reader's reason), the intent and any pin of every envelope or WAI2 component that names the generator, ✓ or ✗; inspect's verdict says the envelope does not conform. inspect_and_unwrap_report_the_generators_envelope covers a prompt byte changed in place, the intent improve, a pin over the model file itself, and a WAI2 component with and without a pin. Co-Authored-By: Claude Opus 5.5 <[email protected]>