D2c M6: wai.world.model's integer renderer renders through wai-ops/1 (world/1), goldens unchanged; run_net and the convolution dispatch leave production #274
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/d2c-m6"
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?
D2c M6:
wai.world.model's integer renderer (int_world, in wai-rs and in wai-web) renders through the integer operator setwai-ops/1, lowered byworld/1. Every golden is unchanged. The renderer stays informative (O11).What changes
The renderer.
int_world::{decode, decode_deltas, decode_planes}now render throughworld/1(integer-operators §13.5), and so does the browser'sWorldModel.Tandg_sare lowered and loaded underacc64once, with their certificates (int_world::loadgives anint_world::World).Avalues;z_0must be[C, lat, lat]; both graphs are planned on that shape, andTmust give the shape back.Result, andWorldModel's methods throw on a refusal.step,step_deltaandstep_planesof a parsed model are replaced byWorld::{step, step_delta, step_action, render}. The browser holds aWorldfor its session.Acomes fromT.AisT's input channels lessC: 3 for the one-agent vector, 4 for the two-agent vector. A row of any other length is refused. Both networks'afracare checked: each must lie in1..=30, and the two must be equal.wai-ops gains
lower::world_netandlower::world_net_loaded:world/1of the networks already parsed, loadingTbefore it lowersg_s. They write and refuse exactly whatlower::worlddoes from the bytes, so no committed graph or certificate changes.The direct renderer is
int_world::legacy, test-only (legacy_int). The direct renderer never checked any value.int_world::legacy::checkedis that renderer with the guard every other integer decoder ran (run_net_checked), and it is the reference for refusal parity.Gate 7. With the renderer switched, nothing in production calls the following (wai-web included):
int_hyper_synth::run_net,decodeandto_rgb8;run_netused.They move into the test-only
int_hyper_synth::legacy, on the scalar kernels, with no dispatch, andint_hyper_synth::kernel_equivalencegoes with the dispatch it tested. The callers that were not production now go through the lowering:tests/int_kernels_geometry.rs;tests/int_hyper_synth.rs.No
opsmember forwai.world.model. The capability's registered payload is its signed action trace, and no payload text yet binds a trace to a renderer's set. The registry test asserts that it has noopsmember. SPEC §5's row cites §13.5.Text:
Planned breaks (integer-operators §15.3 item 2, SPEC §8)
The direct renderer checked nothing: it computed past its exact range, rendered frames from inputs that do not fit, or panicked. The renderer through
world/1refuses each of these before the first frame:afracis outside1..=30or unequal, a set with no action plane, or a set that breaks aWHM1network's rules (model_mismatch);Torg_sthat does not fit the latent (model_mismatch);C·lat·latvalues (geometry_mismatch), a latent side of 0, a latent past2^26values, and a move whose plane value leavesi64.A value outside a
checkrange is refused (field_range). No committed set or clip is affected (the_new_rules_affect_no_committed_set). Each break is shown on a hand-made fixture, with what the direct renderer did there (the_renderers_own_checks_refuse_before_any_frame,int_world_planned_breaks_are_new_refusals).Gates, each red once and restored
3d950d98int_world_ops: "the lowering of the bytes differs from the committed T.whg1"; wai-opsworld_sets_reproduce_every_frame(frame 0 unchanged, frames 1–8 differ);vectors verify, all three T graphsaeccbd41leakytruncates toward zero (Part 3.5)world/1builds three planes for a two-agentT(Part 3.5)85becdd4,407cadd9,6cc62060X_ℓ + 1as the check bound (Part 3.5)ad83e237,f1f21d925ceceeb5--lib int_ops::equivalence8 of 11 (the world renderer's among them);int_world_ops4 of 7dcb1505c,f57e07e2rqfloor → half_up inwhm1/1int_world,int_world2,int_kernels_vectors::int_world_clips,int_world_shared("shared world clip hash"), and all four wasm32 clips, frames [0..8]int_world_memory: "held 677856; the direct renderer held 578520"24539d2b,5ed8213f,e9a62368run_net's leaky ReLU truncatesint_world,int_world2,int_kernels_vectors,int_world_shared, wasm32); the comparisons red:int_world_ops3 of 7, the memory test's frame check, the differential ("the latents after transition 1 differ")Gate 7's falsification found a gap, which is now closed. At first the random differential stayed green under that fault. Random transitions saturated
T's clamp, so a ±1 inTvanished from both the latents and the frames. Two changes fix it:Tlayers have near-unit-gain multipliers and leaky slopes below 1.With both changes, the differential goes red under the same fault.
Differential (
tests/int_ops_differential.rs, the world half)There was no disagreement in any run. Outside the planned breaks, the renderer through the operator set and the direct renderer with its guard either render the same frames, through the same latents after every transition, or refuse a value in the same network, at the same step and the same layer. Under a planned break, the renderer through the operator set refuses.
Per push, the refusals both renderers made were in
T's layers 0, 1 and 2 (114, 39 and 28) and ing_s's layers 0, 1 and 2 (203, 104 and 21).The planned breaks were:
Avalues, 459;Torg_snot fitting the latent, 394;afracrule, 186;i64, 136;A < 1, 73;shiftorgfof 128 or more, 34;The runs before the generator change (gate 4's commit) were green too: 687 of 3,000 alike per push; 47,691 and 2,471,671 cases in the timed runs.
Coverage. Both networks' check ranges are reached at every layer. All nine break kinds are reached, each also on a hand-made fixture.
The bounds-pass oracle test now also covers the world graphs. Per push: 3,000 cases, 24,616 graphs (21 refused, 2,580
acc32, 22,006acc64only, 9 neither), with no disagreement.Memory (
tests/int_world_memory.rs, reference kernels)The renderer declares no cost, because it has no payload. So it is held to the direct renderer it replaced. The one-agent and two-agent vectors give the same figures:
Wasm32
demo/verify_int_world_wasm.mjsis new, andwai-web-wasm.ymlruns it.WorldModel, built for wasm32, renders both vectors frame by frame to their sidecars' SHA-256s: one agent bystep,stepDeltaandstepPlanes, two agents bystepPlanes.Checks
gate.shon the merged headc75fa9af: GREEN, twice: build, lib-tests, carriage, corpus loop 21/21, fast-kernels, byte-exact, wai-web wasm32 and neural gates. The second run usedrb --pull, and there was nothing to pull.check-lockfiles.sh(1.98.0: 38 current),registry export --check, and wai-ops in debug and release.world_intadded;WAI_REQUIRE_SOTA_VECTORS=1, with no skip);int_world_shared;int_world_decodeexample (clip1cc16522e5d57982);g_scase;wai-verify vectors verify;wai_ops_check.py;verify_int_world_wasmandverify_int_payload_wasm.include/wai.his untouched.Not in this PR, and left
jpegai-int/1). It is the firstacc32segment; mANS becomes total.WIV1andWIR1(stage operators only; the 32-bit identity forms go behind a feature).WHM1/WAM1network a decoder runs goes through the operator set.int_hyper_synthkeeps only its plans, itsopsmodule and the test-onlylegacy: the guard, the uncheckedrun_net, the scalar kernels,decodeandto_rgb8.WorldModel. On success they get the same frames, and a refusal now throws; they pick this up with their next wasm build.opsmember.int_payload::unpinned_readis unused withoutneural. Everycargo check --libwith a single integer feature warns about it. The warning dates from the loaded-set store (e0a741db), and this PR does not touch that code.🤖 Generated with Claude Code
wai-ops: lower::world_net (world/1 of two networks already parsed) and lower::world_net_loaded (T lowered and loaded, then g_s), both through the one world_t that lower::world uses, so the bytes and the refusals are world's. wai-rs: int_world::ops::{lower, load, World}. tests/int_world_ops.rs (world_int, both fast-kernel steps): every committed world/1 set (one agent, two agents, synthetic) lowers to its committed graphs from its bytes and from the models this crate parses; the certificate is those graphs'; the load gives acc64 and not acc32, first acc32 failure T's input range at 64 bits (Appendix C); A is T's input channels less C (3, 4). Co-Authored-By: Claude Opus 5.5 <[email protected]>int_ops::equivalence: - the_world_renderer_runs_its_networks_on_the_fast_kernels (world_int): both committed world sets; under every fast policy each convolution of T at every step and each transposed convolution and inverse GDN of g_s at every frame run on the fast kernels, and every frame is the interpreter's; - padding_beyond_the_pad_factor_runs_on_the_interpreter: int_hyper_synth's pad-factor test held to the interpreter: at the factor the fast kernel runs, beyond it the interpreter computes, to the same integers. tests/int_world_ops.rs: every kernel policy renders both vectors alike, and alike refuses or renders at and past the check ranges. The rest of int_hyper_synth::kernel_equivalence needs no retargeting: its random convolution equivalences are whm1_convolutions_equal_the_interpreter (M4), and its overflow, cropped-border and malformed-geometry cases cannot reach a loaded graph (the certificate excludes the overflow; the plan refuses the geometry). Green (build host): --lib int_ops::equivalence, 11 passed, and int_world_ops, 7 passed, in debug and release. Falsified (M1's row for this gate): channel-0 requantisation on the fast path (int_ops::conv). --lib int_ops::equivalence red, 8 of 11, among them "int_world Policy { path: Fast, threads: 1 }: the frames differ from the interpreter alone"; int_world_ops red, 4 of 7: the edge test, "world: frames [0..8] through the lowering differ from the direct renderer's" (the production policy is fast), the guard parity, and "world committed: Policy { path: Fast, threads: 1 } renders other than the interpreter alone". Restored with git. Co-Authored-By: Claude Opus 5.5 <[email protected]>int_world::{decode, decode_deltas, decode_planes} render through world/1 and return a Result; int_world::{load, World} hold the set lowered and loaded once, with step, step_delta, step_action and render for the live path, which replace the per-row step functions of a parsed model. int_world::legacy is test-only (legacy_int). wai-web's WorldModel loads its set once and renders through it; its methods throw on a refusal. Callers moved: tests int_world, int_world2, int_world_shared, int_kernels_vectors; the int_world_decode example; the decode bench's world row. tests/int_world_memory.rs (its own binary; both fast-kernel steps): a clip, a step and a frame hold no more than the direct renderer's. Text: integer-operators' status note, §13.5 (before the first frame: the plan, T giving the shape back, the informative codes), §15.3 items 2 and 3; SPEC §8's planned breaks; CHANGELOG. Co-Authored-By: Claude Opus 5.5 <[email protected]>The first measurement had the clip through the operator set, its set loaded, at 579,168 bytes against the direct renderer's 578,520: the interpreter's per-run bookkeeping, at the last frame, while the clip still held a latent nothing reads after that frame. The last frame now takes it. Green (build host), debug and release: int_world_ops (8), int_world_memory, int_world, int_world2, int_kernels_vectors (int_world_clips among them); int_world_shared (world_model, world_int); cargo check --lib with world_int alone (one warning, unpinned_read in int_payload, which this branch does not touch); the int_world_decode example (frame0 f67d2e64624d6358, clip 1cc16522e5d57982); the decode bench builds; wai-web native lib (32 passed), wasm32 check, wasm32 release + wasm-bindgen 0.2.127, then under Node verify_int_world_wasm.mjs (step, stepDelta, stepPlanes; one and two agents: clips e97bad20..., 8caa2540...) and verify_int_payload_wasm.mjs; the registry tests (15). Comparative prose, vanity metrics, public names (host list, not printed) and section refs, all clean. Memory (reference kernels; tests/int_world_memory.rs), one agent and two alike: a clip of 9 frames with its set loaded held 566,880 bytes, the direct renderer 578,520; one step 39,193 (direct 39,936) and 39,786 (40,960); one frame 468,360 (480,000); loading the set held 505,310 and 507,290; the call that loads the set and renders held 826,538 and 828,518. Falsified, each restored with git: - rq floor -> half_up in whm1/1, after the switch: the file-based goldens go red: int_world ("generated frame 0 must reproduce its committed hash"), int_world2, int_kernels_vectors (int_world_clips among 6), int_world_shared ("shared world clip hash", 063b666d305f02c2), and in wasm32 all four of verify_int_world_wasm.mjs's clips, frames [0..8]. - The memory claim: the clip keeps a copy of every latent. int_world_memory red, "int_world, set loaded: held 677856; the direct renderer held 578520"; int_world_ops green. Co-Authored-By: Claude Opus 5.5 <[email protected]>Three cases in four, T's convolutions have multipliers about 2^shift over their terms and largest weight, and a leaky ReLU's slope is below 1, so a random transition leaves the latent mostly inside T's clamp, where a difference in T's arithmetic shows. Gate 7's falsification, the test-only run_net's leaky ReLU truncating: - production green: int_world, int_world2, int_kernels_vectors (8), int_world_shared, and in wasm32 verify_int_world_wasm.mjs; - the comparisons red: int_world_ops 3 of 7 ("world: frames [1..8] through the lowering differ from the direct renderer's", the edge test, the guard parity) and int_world_memory's frame check; - the random differential stayed green at first: random transitions saturated T's clamp and hid the difference. With the latents compared (5ed8213f) and this generator, it is red: "the latents after transition 1 differ". Restored with git each time. Green (build host): each integer feature alone (neural_int, video_int, audio_int, splat_int, world_int, staged, stage_measure; the one warning is unpinned_read, which predates this branch); both fast-kernel steps in full; byte-exact release (97); the pretrained-set step with WAI_REQUIRE_SOTA_VECTORS=1 (no skip; synthesis fd9ca73af62d40d8, h_s 9b98e6809b3913c6, conditional eb1acd2159f8a966); the decode bench built and run on the world clip and the g_s case. The differential on this generator: per push 3000 cases, debug and release, 711 rendered alike, 13 tests; timed 300 s seed 20261016: debug 54,462 cases (13,150 alike), release 3,081,649 (752,038 alike); no disagreement. Co-Authored-By: Claude Opus 5.5 <[email protected]>