Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/compare/c7acd2607139eedfabeac16b6042cefe8ede431f...43fd09c24a05e9970d0872ee69d21696812a810c # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers ## Comparing `c7acd2607139eedfabeac16b6042cefe8ede431f` ... `43fd09c24a05e9970d0872ee69d21696812a810c` - Feed Flash-Next's first decoder block from the published vocabulary weights `43fd09c` · Drake Stapleton · 2026-11-18 20:01 · Browse - Read Flash-Next n-gram embeddings directly from the FP8 checkpoint `bb323c6` · Drake Stapleton · 2026-11-18 19:27 · Browse - Replay recorded model responses after restart and journal rollback `c4bf9d0` · Drake Stapleton · 2026-11-18 18:53 · Browse - Publish an objective result only after its journal commit succeeds `74b2d04` · Drake Stapleton · 2026-11-18 18:43 · Browse - Require durable results when qualifying node memory limits `1bd47c2` · Drake Stapleton · 2026-11-18 18:41 · Browse - Make the four recorded operator-control scenarios reproducible from source `0df0078` · Drake Stapleton · 2026-11-18 18:38 · Browse - Recognize the refused-tool regression at its actual failing check `ace307d` · Drake Stapleton · 2026-11-18 18:29 · Browse - Keep operator control responsive while a native Omega worker is blocked `177c26e` · Drake Stapleton · 2026-11-18 18:24 · Browse - seed/node README and CONTRIBUTORS: name the Cursor commit by subject, credit it with the ra40 stand-in, 'a cap at which its tools cannot run', one non-pass CWO line, unexercised guards (review V1 V2 V4 V5 of `eb47734c`, DRA-590) `e72eec3` · Drake Stapleton · 2026-11-17 01:12 · Browse - seed/node README and CONTRIBUTORS: how capped trials fail in fake mode (FAIL 17 tool, FAIL 16 recording miss), the check does not read the job file, credit the model that ran the B5b lane (review F1-F3 of `3474d0d9`, DRA-590) `bf7c6b4` · Drake Stapleton · 2026-11-17 00:32 · Browse - seed/node README and CONTRIBUTORS: the passing memory cap is set by execpure's address-space ceiling for the tools, not the node's need; credit the Cursor lane's first commit (review F1, F2, F4 of `5b9c3977`, DRA-590) `9f0412c` · Drake Stapleton · 2026-11-17 00:17 · Browse - seed/node release-accept: drop the unused ra_capwait; README says how a silent signal death is classed; CONTRIBUTORS and MAPPING say the cap check and prlimit 235 are on main (review R1-R3 of `025df1aa`, DRA-590) `3dcdc02` · Drake Stapleton · 2026-11-16 23:20 · Browse - seed/node release-accept: a crash after code-main started fails the memory-cap check; the cause line must name the exit; wait errors are harness failures (review N1-N5 of `268e5a37`) `67037d3` · Drake Stapleton · 2026-11-16 22:45 · Browse - release-accept memory caps: count only explicit fails, require a passing baseline and journal `f36aa2d` · Drake Stapleton · 2026-11-16 22:45 · Browse - Enable the release-accept memory-cap check with the prlimit host word. `8517b6a` · Drake Stapleton · 2026-11-16 22:45 · Browse - L180 review fixes (verdict l180-batch1): keep dated history as written; name-check: exact ADR 0038 path, length-matched backtick runs, digit labels documented, pin by pointer `3086ed3` · U1Branches · 2026-11-17 00:32 · Browse - docs: Aienux for the kernel, AienOS for the whole system (ADR 0038) `00a662e` · Drake Stapleton · 2026-11-15 05:05 · Browse - gpu/runtime: regenerate omega-base.sha256.txt for the DRA-351 rx_resident_gpu change (BASE main `973762e5`) `b56525a` · Drake Stapleton · 2026-11-17 00:10 · Browse - rx_resident_gpu: seat builds; heartbeat timeout never touches the launch thread's reason (review `3753090a`) `bdc0dca` · Drake Stapleton · 2026-11-16 23:03 · Browse - rx_resident_gpu: race-free submit reason, one lane-check line, every refusal named (review `a23bc62a`) `ed2b60b` · Drake Stapleton · 2026-11-16 22:39 · Browse - rx_resident_gpu: nvrm reason on launch, submit and relaunch failures (review `d1ffb7e7`) `3e0291d` · Drake Stapleton · 2026-11-16 22:30 · Browse - rx_resident_gpu: name every reason the seat did not start (review `a756288e`) `cc15e89` · Drake Stapleton · 2026-11-16 22:25 · Browse - rx_resident_gpu: print why the graphics seat did not start `e377c1e` · Drake Stapleton · 2026-11-16 22:18 · Browse - DRA-344 review `e3a42bd6`: drop the DRA-351 claim from gpu/runtime/README.md, bind the chip evidence by source sha256s, gate the elementwise host test in bw-hazard, hash the chip runner's binary `2d69c80` · Drake Stapleton · 2026-11-17 00:10 · Browse - gpu/runtime: regenerate omega-base.sha256.txt for the DRA-344 elementwise change (main `2af22e62` rebase) `e3a42bd` · Drake Stapleton · 2026-11-16 23:24 · Browse - evidence: GB10 MUFU flush receipt at `f8696443` (DRA-344, verdict-`00e83ec4` finding 2) `1d626ef` · Drake Stapleton · 2026-11-16 23:22 · Browse - DRA-344: review fixes for the MUFU flush probes (verdict-`00e83ec4`) `eeec3e0` · Drake Stapleton · 2026-11-16 23:02 · Browse - gpu: MUFU flush rule records the GB10 EX2 and RSQ chip observations (omega #462) `b4f8616` · Drake Stapleton · 2026-11-16 22:38 · Browse - gpu: MUFU.RSQ flush probe; EX2 probe claims what it can observe (omega #462, review 3) `a2f4fed` · Drake Stapleton · 2026-11-16 22:36 · Browse - gpu_elementwise_test: chip probe of the MUFU.EX2 flush rule (omega #462) `3a01660` · Drake Stapleton · 2026-11-16 22:27 · Browse - gate-pools list: comment states only measured facts (review of `2a71b87e`) `973762e` · omp omega-home-B2 · 2026-11-16 22:20 · Browse - gate-pools list: state the measured reason for the 20 pool units (review of `bf9033f4`) `320dbdd` · omp omega-home-B2 · 2026-11-16 22:16 · Browse - gate-pools: list the 20 run-time pool units outside seed/ (OMEGA-SEED was red) `d938e28` · omp omega-home-B2 · 2026-11-16 22:11 · Browse - CONTRIBUTORS: DRA-606 line names the tag rules and the eight mutants (review `f5cb265c` finding 1) `2af22e6` · Drake Stapleton · 2026-11-16 23:00 · Browse - gpu: bwhz README names the tag rows and the current oracle; regenerate runtime lists against main `d7c70e4a` (DRA-606) `f5cb265` · Drake Stapleton · 2026-11-16 22:47 · Browse - gpu/nvidia: bwhz refused rows read every field; pc tag rules (join, late reader, wait) as checked helpers `508e473` · omp omega-home-W4 · 2026-11-16 22:46 · Browse - gpu/nvidia: bw_hazard.om refuses barrier 6 and takes min src_pc (DRA-606 Omega port) `4acb249` · omp omega-home-W4 · 2026-11-16 22:32 · Browse - docs/OMEGA.md: name the sm_121 encoder in the PROPOSED cross-check, cite the sm_80 NAK check (DRA-548 review r1 F2) `d7c70e4` · omp omega-home-W4 · 2026-11-16 22:32 · Browse - docs/OMEGA.md: own driver is being built, Omega's GPU stack talks to the driver client, cross-check PROPOSED (DRA-548 O2/O10/O11) `9ce3843` · omp omega-home-W4 · 2026-11-16 22:17 · Browse - native/control: cover review r2 surviving mutants; mark 2026-10-23 counts historical `e8fcdc0` · omp omega-home-B1 · 2026-11-16 22:26 · Browse - native/control: Apache-2.0 headers, zero-sentinel tests, replay record (DRA-312 review fixes) `0bd5f25` · omp omega-home-B1 · 2026-11-16 22:18 · Browse - test(control): bind Om receipts to public source `baa1587` (#659) `4a71228` · Drake Stapleton · 2026-10-23 20:16 · Browse - feat(control): add seeded Om recovery, delegation and reuse contracts (#659) `252fa5c` · Drake Stapleton · 2026-10-23 20:15 · Browse - Preserve phase evidence and gate daily-interface negative controls `50feb13` · Drake Stapleton · 2026-11-16 21:03 · Browse - tests/gates: trinary checks CodebookProof axioms; mutant count derived `dc1c3b2` · Drake Stapleton · 2026-11-16 20:46 · Browse - Reject codebook test-runner failures as mutation evidence `cfd733a` · Drake Stapleton · 2026-11-16 20:48 · Browse - Integrate daily oracle and preserve mutation-run evidence `3fd1af1` · Drake Stapleton · 2026-11-16 20:40 · Browse - tools/trit: mutation driver fails closed; add trinary gate `bc56954` · Drake Stapleton · 2026-11-16 20:34 · Browse - Add silent daily consumption and inspection-only Trinary entry points `cd544de` · Drake Stapleton · 2026-11-16 20:31 · Browse 270 files changed, +9951 -328 CONTRIBUTORS.md +9 -1 Makefile +16 -16 docs/OMEGA.md +3 -3 docs/numeric/OMEGA_GPU_NATIVE_BOUNDARY.md +5 -5 docs/osc/OSC-3-DESIGN.md +1 -1 docs/r16-operator-control.md +1 -1 docs/r16-production-entry-point.md +1 -1 docs/runtime/API.md +2 -2 docs/runtime/PORTABILITY.md +2 -2 docs/rx-r7-captable-map.md +3 -3 evidence/GPU-MUFU-FTZ-`20261116`/README.txt +5 -0 evidence/GPU-MUFU-FTZ-`20261116`/SHA256SUMS +8 -0 evidence/GPU-MUFU-FTZ-`20261116`/build.log +0 -0 evidence/GPU-MUFU-FTZ-`20261116`/bw_mufu_ftz.h +42 -0 evidence/GPU-MUFU-FTZ-`20261116`/device.txt +5 -0 evidence/GPU-MUFU-FTZ-`20261116`/gpu_elementwise_test.c +503 -0 evidence/GPU-MUFU-FTZ-`20261116`/omega_gpu_elementwise_api.c +1178 -0 evidence/GPU-MUFU-FTZ-`20261116`/omega_gpu_elementwise_api.h +188 -0 evidence/GPU-MUFU-FTZ-`20261116`/receipt.json +1 -0 evidence/GPU-MUFU-FTZ-`20261116`/run.log +21 -0 evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`/README.txt +3 -0 evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`/SHA256SUMS +3 -0 evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`/chip.log +21 -0 evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`/receipt.json +1 -0 gpu/nvidia/checks/README.md +4 -1 gpu/nvidia/checks/bwhz.om +101 -0 gpu/nvidia/checks/bwhz.tsv +1969 -0 gpu/nvidia/checks/checks.tsv +1 -0 gpu/nvidia/checks/mutants.tsv +8 -0 gpu/nvidia/native/models/flash-next/README.md +26 -0 gpu/nvidia/native/models/flash-next/check.py +186 -0 gpu/nvidia/native/models/flash-next/lookup.om +502 -0 gpu/nvidia/om/codegen/bw_hazard.om +81 -24 gpu/runtime/INVENTORY.tsv +6 -6 gpu/runtime/README.md +5 -1 gpu/runtime/omega-base.sha256.txt +235 -15 mk/allen.mk +1 -1 mk/fabric.mk +1 -1 mk/machine-identity.mk +1 -1 mk/rx_compose_lib.mk +2 -2 mk/visor-authority.mk +1 -1 native/control/README.md +218 -0 native/control/RESEARCH.md +145 -0 native/control/evidence/659/README.md +117 -0 native/control/evidence/659/action-attempt-compile.log +0 -0 native/control/evidence/659/action-attempt.diff +13 -0 native/control/evidence/659/action-attempt.log +1 -0 native/control/evidence/659/action-authority-compile.log +0 -0 native/control/evidence/659/action-authority.diff +13 -0 native/control/evidence/659/action-authority.log +1 -0 native/control/evidence/659/action-binding-compile.log +0 -0 native/control/evidence/659/action-binding.diff +5 -0 native/control/evidence/659/action-binding.log +1 -0 native/control/evidence/659/action-compile.log +0 -0 native/control/evidence/659/action-deny-none-compile.log +0 -0 native/control/evidence/659/action-deny-none.log +1 -0 native/control/evidence/659/action-epoch-compile.log +0 -0 native/control/evidence/659/action-epoch.diff +13 -0 native/control/evidence/659/action-epoch.log +1 -0 native/control/evidence/659/action-final-compile.log +0 -0 native/control/evidence/659/action-final.log +1 -0 native/control/evidence/659/action-red-compile.log +0 -0 native/control/evidence/659/action-red.log +1 -0 native/control/evidence/659/action-unknown-compile.log +0 -0 native/control/evidence/659/action-unknown.diff +11 -0 native/control/evidence/659/action-unknown.log +1 -0 native/control/evidence/659/action.log +1 -0 native/control/evidence/659/aliased-action-compile.log +1 -0 native/control/evidence/659/delegate-compile.log +0 -0 native/control/evidence/659/delegate-deny-none-compile.log +0 -0 native/control/evidence/659/delegate-deny-none.log +1 -0 native/control/evidence/659/delegate-depth-compile.log +0 -0 native/control/evidence/659/delegate-depth.diff +13 -0 native/control/evidence/659/delegate-depth.log +1 -0 native/control/evidence/659/delegate-final-compile.log +0 -0 native/control/evidence/659/delegate-final.log +1 -0 native/control/evidence/659/delegate-red-compile.log +0 -0 native/control/evidence/659/delegate-red.log +1 -0 native/control/evidence/659/delegate-rights-compile.log +0 -0 native/control/evidence/659/delegate-rights.diff +13 -0 native/control/evidence/659/delegate-rights.log +1 -0 native/control/evidence/659/delegate-scope-compile.log +0 -0 native/control/evidence/659/delegate-scope.diff +13 -0 native/control/evidence/659/delegate-scope.log +1 -0 native/control/evidence/659/delegate-v2-compile.log +0 -0 native/control/evidence/659/delegate-v2.log +1 -0 native/control/evidence/659/delegate.log +1 -0 native/control/evidence/659/qualified/action-attempt.compile.log +0 -0 native/control/evidence/659/qualified/action-attempt.diff +7 -0 native/control/evidence/659/qualified/action-attempt.stderr.log +0 -0 native/control/evidence/659/qualified/action-attempt.stdout.log +1 -0 native/control/evidence/659/qualified/action-authority.compile.log +0 -0 native/control/evidence/659/qualified/action-authority.diff +7 -0 native/control/evidence/659/qualified/action-authority.stderr.log +0 -0 native/control/evidence/659/qualified/action-authority.stdout.log +1 -0 native/control/evidence/659/qualified/action-binding.compile.log +0 -0 native/control/evidence/659/qualified/action-binding.diff +5 -0 native/control/evidence/659/qualified/action-binding.stderr.log +0 -0 native/control/evidence/659/qualified/action-binding.stdout.log +1 -0 native/control/evidence/659/qualified/action-deny-none.compile.log +0 -0 native/control/evidence/659/qualified/action-deny-none.stderr.log +0 -0 native/control/evidence/659/qualified/action-deny-none.stdout.log +1 -0 native/control/evidence/659/qualified/action-epoch.compile.log +0 -0 native/control/evidence/659/qualified/action-epoch.diff +7 -0 native/control/evidence/659/qualified/action-epoch.stderr.log +0 -0 native/control/evidence/659/qualified/action-epoch.stdout.log +1 -0 native/control/evidence/659/qualified/action-unknown.compile.log +0 -0 native/control/evidence/659/qualified/action-unknown.diff +5 -0 native/control/evidence/659/qualified/action-unknown.stderr.log +0 -0 native/control/evidence/659/qualified/action-unknown.stdout.log +1 -0 native/control/evidence/659/qualified/action.compile.log +0 -0 native/control/evidence/659/qualified/action.stderr.log +0 -0 native/control/evidence/659/qualified/action.stdout.log +1 -0 native/control/evidence/659/qualified/aliased-action.compile.log +1 -0 native/control/evidence/659/qualified/commands.txt +35 -0 native/control/evidence/659/qualified/delegate-deny-none.compile.log +0 -0 native/control/evidence/659/qualified/delegate-deny-none.stderr.log +0 -0 native/control/evidence/659/qualified/delegate-deny-none.stdout.log +1 -0 native/control/evidence/659/qualified/delegate-depth.compile.log +0 -0 native/control/evidence/659/qualified/delegate-depth.diff +7 -0 native/control/evidence/659/qualified/delegate-depth.stderr.log +0 -0 native/control/evidence/659/qualified/delegate-depth.stdout.log +1 -0 native/control/evidence/659/qualified/delegate-rights.compile.log +0 -0 native/control/evidence/659/qualified/delegate-rights.diff +7 -0 native/control/evidence/659/qualified/delegate-rights.stderr.log +0 -0 native/control/evidence/659/qualified/delegate-rights.stdout.log +1 -0 native/control/evidence/659/qualified/delegate-scope.compile.log +0 -0 native/control/evidence/659/qualified/delegate-scope.diff +7 -0 native/control/evidence/659/qualified/delegate-scope.stderr.log +0 -0 native/control/evidence/659/qualified/delegate-scope.stdout.log +1 -0 native/control/evidence/659/qualified/delegate.compile.log +0 -0 native/control/evidence/659/qualified/delegate.stderr.log +0 -0 native/control/evidence/659/qualified/delegate.stdout.log +1 -0 native/control/evidence/659/qualified/receipt.json +395 -0 native/control/evidence/659/qualified/reuse-deny-none.compile.log +0 -0 native/control/evidence/659/qualified/reuse-deny-none.stderr.log +0 -0 native/control/evidence/659/qualified/reuse-deny-none.stdout.log +1 -0 native/control/evidence/659/qualified/reuse-identity.compile.log +0 -0 native/control/evidence/659/qualified/reuse-identity.diff +7 -0 native/control/evidence/659/qualified/reuse-identity.stderr.log +0 -0 native/control/evidence/659/qualified/reuse-identity.stdout.log +1 -0 native/control/evidence/659/qualified/reuse-payload.compile.log +0 -0 native/control/evidence/659/qualified/reuse-payload.diff +7 -0 native/control/evidence/659/qualified/reuse-payload.stderr.log +0 -0 native/control/evidence/659/qualified/reuse-payload.stdout.log +1 -0 native/control/evidence/659/qualified/reuse.compile.log +0 -0 native/control/evidence/659/qualified/reuse.stderr.log +0 -0 native/control/evidence/659/qualified/reuse.stdout.log +1 -0 native/control/evidence/659/qualified/wrong-action-size.compile.log +1 -0 native/control/evidence/659/qualified/wrong-payload-size.compile.log +1 -0 native/control/evidence/659/results.json +188 -0 native/control/evidence/659/reuse-compile.log +0 -0 native/control/evidence/659/reuse-deny-none-compile.log +0 -0 native/control/evidence/659/reuse-deny-none.log +1 -0 native/control/evidence/659/reuse-final-compile.log +0 -0 native/control/evidence/659/reuse-final.log +1 -0 native/control/evidence/659/reuse-identity-compile.log +0 -0 native/control/evidence/659/reuse-identity.diff +13 -0 native/control/evidence/659/reuse-identity.log +1 -0 native/control/evidence/659/reuse-payload-compile.log +0 -0 native/control/evidence/659/reuse-payload.diff +12 -0 native/control/evidence/659/reuse-payload.log +1 -0 native/control/evidence/659/reuse-red-compile.log +0 -0 native/control/evidence/659/reuse-red.log +1 -0 native/control/evidence/659/reuse.log +1 -0 native/control/evidence/659/seed-rebuild.sha256 +7 -0 native/control/evidence/659/wrong-action-size-compile.log +1 -0 native/control/evidence/659/wrong-payload-size-compile.log +1 -0 native/control/evidence/replay-`20261116`/README.md +88 -0 native/control/src/action.om +163 -0 native/control/src/delegate.om +84 -0 native/control/src/reuse.om +80 -0 native/control/tests/action.om +290 -0 native/control/tests/delegate.om +198 -0 native/control/tests/negative/action-stub.om +11 -0 native/control/tests/negative/aliased-action.om +6 -0 native/control/tests/negative/delegate-stub.om +5 -0 native/control/tests/negative/reuse-stub.om +5 -0 native/control/tests/negative/wrong-action-size.om +7 -0 native/control/tests/negative/wrong-payload-size.om +8 -0 native/control/tests/reuse.om +154 -0 seed/host/MAPPING.md +2 -2 seed/node/README.md +62 -14 seed/node/code-test.om +38 -7 seed/node/code.om +30 -2 seed/node/probe/README.md +21 -0 seed/node/probe/check.om +174 -0 seed/node/probe/control.om +292 -0 seed/node/tests/qual.om +3 -3 seed/node/tests/ra40/final-selected.json +1 -0 seed/node/tests/recorded-control/README.md +23 -0 seed/node/tests/recorded-control/final-selected.json +141 -0 seed/node/tests/recorded-control/restart.map +3 -0 seed/node/tests/release-accept.om +506 -9 seed/omc/tests/pools/enlarge-users.txt +28 -0 seed/sm121/sm121list.c +1 -1 spec/action-graph-ir.md +2 -2 spec/allen.md +2 -2 spec/capability-query-ir.md +2 -2 spec/cognitive-routing.md +1 -1 spec/effect-cap64-migration.md +7 -7 spec/empirical-optimizer.md +2 -2 spec/machine.md +1 -1 spec/path-semantic-object.md +4 -4 spec/r10-omega-faculty.md +2 -2 spec/r11-aien-faculty.md +1 -1 spec/r13-living-system.md +3 -3 spec/r14-living-recovery.md +1 -1 spec/r16-operator-emergency-stop.md +2 -2 spec/r16-orchestrator-retirement-map.md +1 -1 spec/r16-orchestrator-retirement.md +1 -1 spec/r7-aienos-authority-mapping.md +3 -3 spec/r8-aegis-resident.md +8 -8 spec/semantic-communication.md +2 -2 spec/state-projection.md +1 -1 spec/visor-authority.md +4 -4 spec/visor.md +1 -1 spec/workflow-fusion.md +2 -2 src/omega_gpu_elementwise_api.c +23 -0 src/omega_gpu_elementwise_api.h +9 -4 src/runtime/rx_resident_gpu.c +91 -32 tests/bench_rx_argus.c +1 -1 tests/bw_hazard_test.c +2 -2 tests/bw_mufu_ftz.h +12 -4 tests/effect/test_effect_cap64.c +3 -3 tests/gates/omega-bw-hazard.gate +1 -1 tests/gates/omega-gpu-libm-free.gate +1 -1 tests/gates/omega-trinary.gate +25 -0 tests/gates/run.sh +69 -1 tests/gpu_elementwise_test.c +108 -7 tests/osh/osh_trace.c +1 -1 tests/r16_negative/mutate.sh +1 -1 tests/runtime/aienos_cap_abi_test.c +1 -1 tests/runtime/cx_config_freestanding.h +1 -1 tests/runtime/rx_action_graph.c +1 -1 tests/runtime/rx_capability_query.c +2 -2 tests/runtime/rx_cognitive_routing.c +1 -1 tests/runtime/rx_compose_attach_test.c +1 -1 tests/runtime/rx_compose_fixture.h +2 -2 tests/runtime/rx_composition_gate.c +1 -1 tests/runtime/rx_operator_authority_misuse.c +1 -1 tests/runtime/rx_plan_reuse.c +1 -1 tests/runtime/rx_r10_omega.c +1 -1 tests/runtime/rx_r11_aien.c +1 -1 tests/runtime/rx_r12_resident.c +3 -3 tests/runtime/rx_r12_silicon.c +1 -1 tests/runtime/rx_r13_living.c +2 -2 tests/runtime/rx_r16_negative.c +5 -5 tests/runtime/rx_r7_native.c +1 -1 tests/runtime/rx_r8_aegis.c +2 -2 tests/runtime/rx_semantic_comm.c +1 -1 tests/runtime/rx_state_projection.c +1 -1 tests/visor/check_authority_link.sh +1 -1 tests/visor/forbidden_symbols.txt +1 -1 tools/allen.c +1 -1 tools/codebook/README.md +7 -0 tools/codebook/mutate.sh +37 -9 tools/codebook/test-mutate.sh +37 -0 tools/effect_cap64_receipt.sh +1 -1 tools/program_id_receipt.sh +1 -1 tools/qualify_visor.sh +3 -3 tools/r16_authpath.sh +1 -1 tools/run_gpu_cut4b_chip.sh +1 -1 tools/run_gpu_elementwise_chip.sh +3 -2 tools/trit/README.md +51 -2 tools/trit/mutate-daily.py +66 -0 tools/trit/mutate.sh +122 -30 tools/trit/test-daily.py +109 -0 tools/trit/test-mutate.sh +137 -0 tools/trit/trit.om +31 -8 CONTRIBUTORS.md @@ -7,6 +7,8 @@ The current development method is [Human-Directed Agentic Engineering (HDAE)](RE 7 7 8 8 | Model | What it did | 9 9 |---|---| 10 +| OpenAI Codex (Flash-Next) | Implemented the native file-backed n-gram embedding lookup and compared its BF16 output with the FP8 checkpoint on the Spark CPU. | 11 +| OpenAI Codex | Built and exercised the disposable N0 Unix socket control probe and its native wire client on Linux AArch64. Made result publication fail closed on a refused journal write, with an isolated journal per finished unit-test objective. Reconciled memory-cap results with the durable journal and added malformed-result controls. Reproduced all sixteen coding-workflow mutants and corrected the expected exit for a refused tool job. Recovered four recorded host-control cases and checked their three prepared artifacts byte for byte. Recovered matching live-model continuation turns from two archived crash runs and exercised restart and journal compatibility. | 10 12 | Grok 4.7 (via Cursor Agent) | DRA-599: `om/encoder/bw_enc_sm121.om` `enc1` writes the 4-bit guard (7, 0 @P0, 8 @!P0) on every opcode it emits, and refuses a P0 guard on LDCU / LDCU.64. The copies stay two files because `seed/ng/cudapp.lock` hashes `gpu/nvidia/om/encoder/bw_enc_sm121.om` and that file encodes ops 64..79. Op 11 and op 21 were wrong instructions in the linked encoder: op 11 dropped imm (`LDG.E R4, desc[UR4][R8.64]` instead of `LDG.E R4, desc[UR4][R8.64+0x40]`), and op 21 word2 ``202250496`` disassembled as `LDG.E.EF` instead of ``203364608`` / `LDG.E.MMIO.GPU`. The C `LDG_MMIO` case moved with op 21. `om/encoder/guard-gate.sh` checks every emitted opcode at @P0 and @!P0 with nvdisasm, the five #1044 rows (guards 7, 0, 8, 8, 8), a guard-7 mutant, and exits nonzero while any word on ops 0..63 still differs. | 11 13 | Grok 4.7 (via Cursor Agent) | gfx942 FP8 GEMV (`gpu/amd/gfx942/fp8gemv`): one wave per row, `global_load_dwordx4` weight loads with nt=1, double-buffered 1024-column tiles, optional workgroup-row remap, optional residual and RMSNorm-scale epilogue. Cache-policy bytes for the dwordx4, `buffer_wbl2`, `buffer_inv` and global-atomic forms are the bytes `llvm-mc-18 -mcpu=gfx942 -show-encoding` produced, locked against `hsaco.om` and a golden file. CPU check is two OM-2 references over `fpfma`: a column-order loop, and the kernel's lane order, bit-exact only when those associations match, otherwise Higham's recursive-summation bound. Seeded inputs, 0xFF (−240), 0x80 (NaN), denormals and a cross-lane cancellation are in that check, and the epilogue and bf16 rounding run inside both references. The C++ plain reference used on device is locked to those bit patterns. On a card, both remap arms compare `y` to that reference before any sample and exit non-zero on `FAIL`. `bench.sh` times hot and cold for the kernel and for `hipblasLtMatmul` (`f8_fnuz_r` × `f8_fnuz_r` into f32) in one process: 10 warmups and 21 samples when hot, and a 512 MiB device read immediately before each of 21 calls on the same operands when cold. hipblaslt-bench is not the timer; its `--flush` is `s_icache_inv` and its `--rotating` copies are initialized before one averaged interval. `SH_MEM_CONFIG` bit 8 is Linux `SH_MEM_CONFIG__F8_MODE` (`gc_9_4_3_sh_mask.h`); KFD sets it for GC 9.4.3, and the code object does not. Exits non-zero with `BLOCKED_HARDWARE` when `/dev/kfd` is absent. Not run on a GPU | 12 14 | Claude Fable 5.2 (front page) and Claude Opus 5.5 (review rounds) | Rewrote `README.md` as a short plain front page for the Interplane project page and moved the detailed sections unchanged to `ENGINEERING-NOTES.md`; four review rounds found sentences that were untrue or overstated (program identity, the hardware rule, the seed challenge, x86 runs) and stale pointers in `AGENTS.md`, all corrected. The review tool was set to an OpenAI model but ran Claude Opus 5.5 instead (provider fallback, found afterwards), so these reviews are by the same provider as the author and are not the independent review the rules ask for | @@ -44,7 +46,7 @@ The current development method is [Human-Directed Agentic Engineering (HDAE)](RE 44 46 | Claude Opus 5.5 (ReleaseStopGate, via omp) | `seed/node/tests/release-gate.om`: a seeded Omega gate that `release stop` makes a durable pause before the node stops, on its own fixture (two objectives, an empty fake-serve map answering 404 after 4 s): checks `stop-rc`, `stop-journal-pause` (a journal PAUSE record, type 7 word 3 = 1, then an operator OPER op 1, and no START after it), `stop-view-paused` (`view-at-stop.json` paused 1, running 0; a missing file is a FAIL line) and `stop-node-gone`, then `RELGATE pass fail`, exit 1 on any FAIL. Rerun by the integrator, built against this commit's `drv.om`: the real `release` (``a08c0bdc``) gives `RELGATE pass=4 fail=0`, exit 0; the mutant whose stop skips the pause (`if ne rl_post rlone 0` made `if false`, `release` ``cc7534c0``) gives `FAIL stop-rc rc=1 stderr: release: the node exited while stopping`, `FAIL stop-journal-pause ... pause_at=none`, `FAIL stop-view-paused ... -2`, `RELGATE pass=1 fail=3`, exit 1. One run each, native AArch64 host. | 45 47 | Claude Opus 5.5 (ReceiptOm, via omp) | Pure seeded Omega receipt writer (Drake's directive 2026-11-07): `seed/node/tests/receipt.om` replaces the out-of-repo `omega-node-receipt.py` with the same arguments, keys, key order and refusals, names the file by the SHA-256 of its bytes and writes it 0644; compact JSON with raw UTF-8, ASCII-only `\w`/`\d`, symlinked inputs refused, bounded inputs. Rerun by the integrator with the build against this commit's `drv.om`: on the filed DRA-292 evidence the record equals the Python writer's key for key apart from the timestamp; a results file with a FAIL line, a dirty tree, a missing `pool-gate.out` and a symlinked `platform.txt` each exit 1 and write nothing; a 4097-byte argument exits 2; with the clock pinned (a copy differing in that one line) a second run is refused `exists`, exit 1. | 46 48 | Claude Opus 5.5 (ViewDriversOm, via omp) | Pure seeded Omega view acceptance (Drake's directive 2026-11-07): `tests/nodedrv.om` (the DRA-291 fixture, node and fake-serve processes, omnode-op calls and answers, journal reads, listening check), `tests/view-prep.om` and `tests/view-accept.om` replace `view-prep.py` and `view-accept.py` (both deleted); `drv.om` gains `dv_exec`, `dv_spawn PK FO FE` and `dv_spawna`, and `drv-test.om` the `drv.spawn-append` control (37 checks). A missing or mistyped answer is a FAIL line, never a crash. Lane-reported: view-prep output identical to the Python fixture on 81 cases. Rerun by the integrator from its own build (hashes equal to the lane's): `DRV-TEST pass=37 fail=0`; `VIEWSUM pass=46 fail=0`, exit 0, 64.7 s, check names and order as the Python driver; mutant vm5 (`view.om` delta start `add k 1` made `add k 2`) `FAIL resync-delta-from-0 v=4 n=4`, exit 1. Lane-reported mutants: vm1 `FAIL cmd-stale-409`, vm3 `FAIL crash-oper-replayed`, vm8 `FAIL redirect-run-passes`, vm12 `FAIL crash-view-exits-with-creator`. Native AArch64 host only. | 47 -| Claude Opus 5.5 (ReleaseAcceptOm, ReleaseAcceptOm2, via omp) | Pure seeded Omega release acceptance (Drake's directive 2026-11-07): `seed/node/tests/release-accept.om` replaces `release-accept.py` (deleted) with the same 12 scenarios, the same 37 checks in the same order, `RELSUM` and exit codes (0 pass, 1 FAIL, 3 NOT_RUN without FAIL). A missing or unreadable node output fails the next check by name; an overflowing missing-prompt list or an over-long detail is a FAIL. `memory-peak-kB` samples /proc VmHWM/VmPeak and `memory-peak-measured` fails when nothing was sampled; `memory-caps-fail-closed-then-pass` is NOT_RUN until the prlimit host word passes review (omega-mv `seed/prlimit-host-word`). Rerun by the integrator from its own build (hash equal to the lane's): fake mode, all scenarios, `RELSUM pass=33 fail=0 not_run=4`, exit 3, 91 s; check names and order identical to the Python driver's run at ``ffb21f57`` (`pass=34 not_run=3`; the caps check is the one change); mutant rm4 (rollback skips `journal/`, `release.om` line 1988 made `x = ulong 0`) `FAIL journal-rollback-from-snapshot rc=1 opens=1 max_starts=1`, exit 1. Lane-reported mutants: rm1 (no `jn_result`) and rm2 (`jn_res` guard off) `FAIL full-results-durable`, rm3 (terminal authority guard off) `FAIL worker-death-rerun` and `FAIL worker-death-turns-equal-recorded`. Native AArch64 host only. | 49 +| Claude Opus 5.5 (ReleaseAcceptOm, ReleaseAcceptOm2, via omp) | Pure seeded Omega release acceptance (Drake's directive 2026-11-07): `seed/node/tests/release-accept.om` replaces `release-accept.py` (deleted) with the same 12 scenarios, the same 37 checks in the same order, `RELSUM` and exit codes (0 pass, 1 FAIL, 3 NOT_RUN without FAIL). A missing or unreadable node output fails the next check by name; an overflowing missing-prompt list or an over-long detail is a FAIL. `memory-peak-kB` samples /proc VmHWM/VmPeak and `memory-peak-measured` fails when nothing was sampled; `memory-caps-fail-closed-then-pass` was NOT_RUN until the prlimit host word passed review (omega-mv `seed/prlimit-host-word`); it now runs (see the omega-home-B5b line). Rerun by the integrator from its own build (hash equal to the lane's): fake mode, all scenarios, `RELSUM pass=33 fail=0 not_run=4`, exit 3, 91 s; check names and order identical to the Python driver's run at ``ffb21f57`` (`pass=34 not_run=3`; the caps check is the one change); mutant rm4 (rollback skips `journal/`, `release.om` line 1988 made `x = ulong 0`) `FAIL journal-rollback-from-snapshot rc=1 opens=1 max_starts=1`, exit 1. Lane-reported mutants: rm1 (no `jn_result`) and rm2 (`jn_res` guard off) `FAIL full-results-durable`, rm3 (terminal authority guard off) `FAIL worker-death-rerun` and `FAIL worker-death-turns-equal-recorded`. Native AArch64 host only. | 48 50 | Claude Opus 5.5 (QualRunnerOm, via omp) | Pure seeded Omega qualification runner (Drake's directive 2026-11-07): `seed/node/tests/qual.om` replaces the out-of-repo DRA-292 shell conductor with the same 71 top-level checks in the same order (gates, builds, old build, code mutants, tool controls, Lean, driver mutants); refuses a dirty tree, ignores an ambient `OMC`, normalises a timeout to 124, refuses a missing mutation and reports the view and release acceptance steps NOT_RUN when their binaries are absent. Exit 0 only when every check passed, 1 on any FAIL, 3 when something is NOT_RUN without a FAIL (the shell conductor always exited 0). `drv.om` gains `dv_spawnio` (three open descriptors), and `dv_spawn` shares one output offset when stdout and stderr name the same file. Lane-reported, before the exit-3 change: one run from a clean snapshot of this branch, `PASS count 52`, `FAIL count 0`, `NOT_RUN count 19` (the view and release acceptance steps), exit 0, 106 s; names and order equal to the shell runner's filed results. Integrator: every node driver compiles against this `drv.om`. Native AArch64 host only. | 49 51 | Claude Opus 5.5 (via omp) | DRA-292 integration of the seeded drivers: merged the view drivers, `release-accept.om` and `qual.om` (in `drv.om`, `dv_exec` stays the child side of `dv_spawn` and `dv_spawna`, and `dv_spawn` gives stderr stdout's descriptor when both name one file). `drv-test.om` gains `drv.spawn-shared` (one file for both streams keeps `out\nerr\n`), `drv.spawnio` and `drv.spawnio-bad-fd` (exit 126): `DRV-TEST pass=40 fail=0`; the mutant that reopens ERR (`if not dv_eq fo fe` made `if true`) gives `FAIL drv.spawn-shared`, `pass=39 fail=1`, exit 1. `qual.om` now copies `release` into each mutant build directory: on the merged head without it, `rm0_baseline` failed 12 lifecycle and journal checks (`FAIL lifecycle-start rc=127`, the seeded driver runs `BUILD/release`) and rm1..rm3 were never exercised. One run each, native AArch64 host. | 50 52 | Claude Opus 5.5 (via omp) | Omega Node follow-up to DRA-292: `code-main` exited silently on every setup failure, and journal refusals (30 + 20..27 = 50..57) share numbers with its setup failures 50..56, so exit 56 meant either "journal directory over 100 bytes" or "view process not started". `cw_fail` in `code.om` writes `code-main: CAUSE, exit N` on stderr before each of those exits; codes unchanged. With a 123-byte journal directory the fixed program exits 56 with `code-main: journal refused (... 26 directory over 100 bytes ...), exit 56` and the ``0eb3edf7`` build exits 56 with empty stderr; `code checks=57 fail=0`. Found by ReleaseAcceptOm2 (a long OUT made the node exit 56 with nothing on stderr). One run each, native AArch64 host. | @@ -315,3 +317,9 @@ Update this table in the same commit as the work it credits. 315 317 | Omega Lead (Grok Bot agent, crumb C-0102, under Drake Stapleton's direction) | `src/omega_bw_hazard.c`: refuse barrier 6, order-independent minimum `src_pc` (no UB on shifts), with UBSan standalone tests (DRA-606). | 316 318 | Omega Lead (Grok Bot agent, omega-mv#1032 / DRA-127, under Drake Stapleton's direction) | `tests/gates`: required OMEGA-GPU-PREFILL-HOST runs only the 3 first-party host tests; model-shape cases move to the optional gpu-prefill-modelshapes lane; gate make runs under `env -i` with `-f Makefile` so inherited make variables, wrappers or stray makefiles cannot turn a failing gate into PASS. | 317 319 | Omega Lead (Grok Bot agent, under Drake Stapleton's direction) | Repinned `om/units.sh` OMC_PIN from ``26540e6d`` to seed omc ``34d611ca`` (left behind by `25a9b5c7c` / DRA-542) and regenerated the om-units bindings with `om/units.sh` and omega-bridge ``96292423``. Closes the om-units PASS→NOT_RUN finding in Reviewer's range review of `0ab4f29e`..`f8d1b2c6`. | 320 +| Codex (GPT-6, under Drake Stapleton's direction) | `tools/trit`: native daily inspection and silent consumption entry points, with an external HMAC/token oracle; historical wire meanings remain unchanged. Also repaired companion codebook mutation-driver failure classification with external runner controls. | 321 +| Claude Sonnet 5.5 (omp worker under Drake Stapleton's direction) | `tools/trit`: mutation-driver failure classification, focused driver regressions and additive host gate; integrated with the native daily interface by Codex. | 322 +| OpenAI Codex GPT-6 Astra (omp, lane omega-home-W4, under Drake Stapleton's direction) | DRA-606 Omega port: `gpu/nvidia/om/codegen/bw_hazard.om` refuses barrier 6 in the write or read field (as `src/omega_bw_hazard.c` `60b5d81e`) and takes the order-independent minimum `src_pc` (`hz_pmin`, through the tag rules `hz_jtag`, `hz_ltag`, `hz_wtag`); `gpu/nvidia/checks/bwhz` checks `hz_dec` against the fixed C on 1631 decode rows and the three tag rules against the C's own expressions, with eight mutants in `mutants.tsv` that the gate must catch; whole-check `hz_chk` compared out of tree through omega-bridge. Regenerated `gpu/runtime` lists. | 323 +| Cursor agent (lane cursor/node-memory-cap-4f2a, under Drake Stapleton's direction; its records name no model) | DRA-590 first commit for `seed/node` ("Enable the release-accept memory-cap check with the prlimit host word."): enables `memory-caps-fail-closed-then-pass` in `release-accept.om` with the prlimit host word (keyword 235), and adds the constructed one-job recording `seed/node/tests/ra40/final-selected.json` (a stand-in, not model output) that the check runs on. | 324 +| Claude Opus 5.5 (omp, lane omega-home-B5b, assigned OpenAI Codex GPT-6 Astra, which fell back to Claude Opus 5.5; under Drake Stapleton's direction) | DRA-590 review fixes for `seed/node` after the Cursor lane's first commit: `release-accept.om` runs `memory-caps-fail-closed-then-pass` on the Cursor lane's constructed one-job recording `tests/ra40`. Caps from half the measured peak up to 32 times it; a cap fails closed only with an explicit `CWO` FAIL or a `code-main` refusal whose cause line names its exit; a crash after start, a timeout, a wait error or a harness exit is a bad trial and fails the check; a pass needs a prior explicit fail and a passing baseline. The passing cap is set by `execpure`'s fixed address-space ceiling for the tools, not by the node's own need; in fake mode the lowest caps fail as a tool failure (the compile cannot run) and the next ones as an inference failure (the refused test exec changes the prompt and the recording has no answer), and the check does not read the job file (README). Fake mode at the head: `PASS memory-caps-fail-closed-then-pass tries=6`; mutants for a crash after start, stderr before a signal death, a wait error, a timeout, a disabled prlimit and a wrong cause-line exit each FAIL; qual FAIL set equal to the base's. Reviewed by fresh Claude Opus 5.5 runs (verdicts `VERDICT-node-*` in the lane records). Native AArch64 host only; live GB10 acceptance NOT_RUN. | 325 +| OpenAI Codex (under Drake Stapleton's direction) | File-backed Flash-Next vocabulary embedding and four-stream decoder input, verified against the published BF16 weights. | Makefile @@ -447,7 +447,7 @@ $(RX_SEM_TEST): $(RX_SEM_SRCS) src/runtime/rx_semantic.h src/runtime/rx_caproot. 447 447 test-sem-incremental: $(RX_SEM_TEST) 448 448 ./$(RX_SEM_TEST) 449 449 450 -# R7: native AIENOS authority versus the Linux oracle, then the world view. 450 +# R7: native Aienux authority versus the Linux oracle, then the world view. 451 451 # The authority source is the FULL commit in aienos.lock, proven by 452 452 # tools/aienos_lock_source.sh from git objects (a directory name, a short SHA or an 453 453 # override is not proof). Default: extracted with `git archive` from a repository holding @@ -490,8 +490,8 @@ $(AIENOS_CAP_LIB): aienos-authority-capability 490 490 rc=$$?; rm -rf $$t; exit $$rc 491 491 492 492 # OMEGA_EFFECT_CAP64 (spec/effect-cap64-migration.md): effect objects carry the 493 -# full 64-bit AIENOS capability generation. Physics-free: the Omega core, the 494 -# Visor effect-request adapter, and the pinned AIENOS header + library 493 +# full 64-bit Aienux capability generation. Physics-free: the Omega core, the 494 +# Visor effect-request adapter, and the pinned Aienux header + library 495 495 # (aienos.lock) used directly. Prints OMEGA_EFFECT_CAP64_{ROUNDTRIP,IDENTITY, 496 496 # STALE_REJECT,AUTHORITY}_PASS gate lines. 497 497 EFFECT_CAP64_CAP_LIB ?= $(AIENOS_CAP_LIB) @@ -556,7 +556,7 @@ $(RX_R9_TEST): $(RX_R9_SRCS) src/runtime/rx_generation.h src/runtime/rx_caproot. 556 556 test-r9: $(RX_R9_TEST) 557 557 ./$(RX_R9_TEST) 558 558 559 -# R12 host rules against the native AIENOS authority. The graphics processor is 559 +# R12 host rules against the native Aienux authority. The graphics processor is 560 560 # not started. A pass here does not claim the resident-seat gate. 561 561 RX_R12_SRCS = src/runtime/rx_caproot.c src/runtime/rx_world.c src/runtime/rx_coherent.c \ 562 562 src/runtime/rx_native_bind.c src/omega_om_units.c src/omega_evidence.c \ @@ -575,7 +575,7 @@ test-r12: $(RX_R12_TEST) 575 575 # generation store under a stop, the durable mark across a restart, and resume. 576 576 # The mutant script then removes each guard in turn from a temporary copy and 577 577 # requires the test to fail against every one. The resident-seat case lives in 578 -# test-r12 (t_emergency_stop, native AIENOS authority). 578 +# test-r12 (t_emergency_stop, native Aienux authority). 579 579 RX_EMERGENCY_SRCS = src/runtime/rx_caproot.c src/runtime/rx_world.c src/runtime/rx_coherent.c \ 580 580 src/runtime/rx_generation.c src/omega_om_units.c tests/runtime/rx_emergency.c 581 581 RX_EMERGENCY_TEST = $(OUT_DIR)/rx_emergency_test @@ -608,7 +608,7 @@ test-r10: $(RX_R10_TEST) 608 608 ./$(RX_R10_TEST) 609 609 610 610 # R8: AEGIS resident authority. Capability slots in the world; AEGIS decides, 611 -# only root.install mints, through the native AIENOS authority. 611 +# only root.install mints, through the native Aienux authority. 612 612 RX_R8_SRCS = src/runtime/rx_caproot.c src/runtime/rx_world.c src/runtime/rx_coherent.c \ 613 613 src/runtime/rx_native_bind.c src/runtime/rx_aegis.c src/omega_om_units.c src/omega_evidence.c \ 614 614 tests/runtime/rx_r8_aegis.c @@ -654,7 +654,7 @@ test-r11-own-hold: $(RX_R11_TEST) 654 654 655 655 # OMEGA_STATE_PROJECTION: cognition gets a compiled state projection from 656 656 # Cortex, not everything Cortex knows. Part B drives the real R11 AIEN faculty 657 -# under the native AIENOS authority. The projection objects are built alone 657 +# under the native Aienux authority. The projection objects are built alone 658 658 # first and may reference nothing but Cortex and SHA-256: no world, no faculty, 659 659 # no Omega realization code. 660 660 RX_SP_OBJS = $(OUT_DIR)/rx_cortex.o $(OUT_DIR)/rx_projection.o @@ -711,7 +711,7 @@ test-cortex: $(RX_CX_TEST) $(RX_CXJ_TEST) 711 711 ./$(RX_CX_TEST) 712 712 ./$(RX_CXJ_TEST) 713 713 714 -# Physical graphics seat against the native AIENOS authority. Not part of 714 +# Physical graphics seat against the native Aienux authority. Not part of 715 715 # GitHub checks. A pass on this machine is the only run that may set 716 716 # silicon_observed. 717 717 RX_R12_SILICON_SRCS = src/runtime/rx_caproot.c src/runtime/rx_world.c \ @@ -1097,7 +1097,7 @@ test-r16-surface: $(TARGET) 1097 1097 1098 1098 # OMEGA_ACTION_GRAPH_IR: goals compile to typed action graphs that run as 1099 1099 # resident reactions by readiness alone. rx_graph.o is built alone first and 1100 -# must not reference any AIENOS admin operation: compilation can find that 1100 +# must not reference any Aienux admin operation: compilation can find that 1101 1101 # authority is missing, never create it. 1102 1102 RX_GRAPH_SRCS = src/runtime/rx_caproot.c src/runtime/rx_world.c src/runtime/rx_coherent.c \ 1103 1103 src/runtime/rx_native_bind.c src/runtime/rx_aegis.c src/omega_om_units.c src/omega_evidence.c \ @@ -1122,7 +1122,7 @@ test-action-graph: $(RX_GRAPH_TEST) 1122 1122 # OMEGA_CAPABILITY_QUERY: AIEN states a CapabilityNeed; Omega compiles it into 1123 1123 # probes of the capability sources and returns a bounded list of candidates 1124 1124 # ranked on explicit dimensions. rx_capq.o is built alone first and must not 1125 -# reference any AIENOS admin operation: a query can learn that authority is 1125 +# reference any Aienux admin operation: a query can learn that authority is 1126 1126 # held or missing, never create it. 1127 1127 RX_CAPQ_SRCS = src/runtime/rx_caproot.c src/runtime/rx_world.c src/runtime/rx_coherent.c \ 1128 1128 src/runtime/rx_native_bind.c src/runtime/rx_aegis.c src/omega_om_units.c src/omega_evidence.c \ @@ -1193,7 +1193,7 @@ test-skillroute-compose: $(RX_SRCOMPOSE_TEST) 1193 1193 ./$(RX_SRCOMPOSE_TEST) 1194 1194 1195 1195 # OMEGA_PLAN_REUSE: plan IR and verified plan cache. rx_plan.o must not 1196 -# reference any AIENOS admin operation (the cache checks authority, never 1196 +# reference any Aienux admin operation (the cache checks authority, never 1197 1197 # creates it); rx_plan_arrange.o (AIEN's planner) must only read the World. 1198 1198 RX_PLAN_SRCS = src/runtime/rx_caproot.c src/runtime/rx_world.c src/runtime/rx_coherent.c \ 1199 1199 src/runtime/rx_native_bind.c src/runtime/rx_aegis.c src/omega_om_units.c src/omega_evidence.c \ @@ -1249,7 +1249,7 @@ test-semantic-comm: $(RX_SEMCOMM_TEST) 1249 1249 # OMEGA_COGNITIVE_ROUTING: each cognitive step goes to the cheapest 1250 1250 # realization the evidence says meets it, escalating only on insufficient 1251 1251 # verification or calibrated confidence. rx_route.o is built alone first and 1252 -# must not reference promotion or any AIENOS admin operation: routing profiles 1252 +# must not reference promotion or any Aienux admin operation: routing profiles 1253 1253 # change only through a promoted generation. 1254 1254 RX_ROUTE_SRCS = src/runtime/rx_generation.c src/omega_om_units.c src/omega_evidence.c \ 1255 1255 tests/runtime/rx_cog_engines.c tests/runtime/rx_cognitive_routing.c @@ -1356,7 +1356,7 @@ test-empirical: $(RX_EMP_TEST) 1356 1356 # OMEGA_WORKFLOW_FUSION: repeated verified action-graph fragments become 1357 1357 # MetaSkills; only a verified, measured, canaried, promoted (R9 barrier) and 1358 1358 # published one replaces the steps. rx_fusion.o, like rx_graph.o, must not 1359 -# reference any AIENOS admin operation. 1359 +# reference any Aienux admin operation. 1360 1360 .PHONY: test-workflow-fusion 1361 1361 RX_FUSION_SRCS = src/runtime/rx_caproot.c src/runtime/rx_world.c src/runtime/rx_coherent.c \ 1362 1362 src/runtime/rx_native_bind.c src/runtime/rx_aegis.c src/runtime/rx_generation.c src/omega_om_units.c \ @@ -1382,7 +1382,7 @@ test-workflow-fusion: $(RX_FUSION_TEST) 1382 1382 # OMEGA_TYPED_RESULT_CONSTRAINTS: structured results of cognition are checked 1383 1383 # against typed contracts; the publish gate is the only writer of what is 1384 1384 # published. rx_contract.o is built alone first and must not reference any 1385 -# AIENOS admin operation: a contract can find that authority is missing, never 1385 +# Aienux admin operation: a contract can find that authority is missing, never 1386 1386 # create it. 1387 1387 RX_TYPED_SRCS = src/runtime/rx_caproot.c src/runtime/rx_world.c src/runtime/rx_coherent.c \ 1388 1388 src/runtime/rx_native_bind.c src/runtime/rx_aegis.c src/omega_om_units.c src/omega_evidence.c \ @@ -2539,7 +2539,7 @@ GPU_R4_RECEIPT = $(OUT_DIR)/gpu_matmul_r4_receipt 2539 2539 $(OUT_DIR)/libomega_gpu.a: $(GPU_API_OBJS) | check-physics-lock 2540 2540 ar rcs $@ $(GPU_API_OBJS) 2541 2541 libomega_gpu: $(OUT_DIR)/libomega_gpu.a 2542 -# omega-mv#471: the archive must link without -lm (omegatool, the Rust FFI crate and AIENOS link it bare). Fails if any symbol 2542 +# omega-mv#471: the archive must link without -lm (omegatool, the Rust FFI crate and Aienux link it bare). Fails if any symbol 2543 2543 # the archive leaves undefined is one libm exports (the export list is read from this toolchain's libm.so.6). 2544 2544 .PHONY: test-gpu-libm-free 2545 2545 test-gpu-libm-free: $(OUT_DIR)/libomega_gpu.a @@ -2566,7 +2566,7 @@ $(GPU_R4_RECEIPT): tests/gpu_matmul_r4_receipt.c src/omega_gpu_matmul_api.h $(OU 2566 2566 # through the heavy queue. -ffp-contract=off keeps the f32 oracle free of FMA. 2567 2567 .PHONY: test-gpu-elementwise 2568 2568 GPU_EW_TEST = $(OUT_DIR)/gpu_elementwise_test 2569 -$(GPU_EW_TEST): tests/gpu_elementwise_test.c src/omega_gpu_elementwise_api.h $(OUT_DIR)/libomega_gpu.a 2569 +$(GPU_EW_TEST): tests/gpu_elementwise_test.c tests/bw_mufu_ftz.h src/omega_gpu_elementwise_api.h $(OUT_DIR)/libomega_gpu.a 2570 2570 $(CC) $(CFLAGS) -ffp-contract=off -o $@ tests/gpu_elementwise_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm 2571 2571 test-gpu-elementwise: $(GPU_EW_TEST) 2572 2572 ./$(GPU_EW_TEST) --host-only docs/OMEGA.md @@ -15,9 +15,9 @@ On the GPU, the goal is a stack that does the jobs of CUDA's user-space software 15 15 | **The GPU runtime** | Opens the device, allocates memory, launches kernels, records command lists and runs jobs. It does the job of CUDA's runtime and driver API (libcudart, libcuda). | `src/omega_gpu_session.h`, `omega_gpu_cmdlist.h`, `omega_gpu_engine.h`, `omega_gpu_platform.h` | 16 16 | **The libraries** | Matrix multiply, matrix-vector (BF16, FP8, 4-bit, ternary), attention (decode and prefill), reductions, elementwise. They do the job of cuBLAS and cuDNN. | `src/omega_gpu_*_api.h` | 17 17 18 -**Below Omega, and not part of it:** the driver. Omega reaches the GPU through the physics repository's driver client (`nvrm/nvrm.c`, `m16/m16_native.c`). The client talks to NVIDIA's open-source kernel module (`nvidia.ko`, `nvidia-uvm.ko`, version 580.173.02) and the module boots NVIDIA's signed GSP firmware. Aien builds and uses its own GB10 driver to replace that kernel module (aien-dev/omega-gpu-driver, lane OwnDriver, building on aienux#441; L332); it is not hardware-qualified yet. GB10 facts I measure on the way (chip id, boot sequence) still go upstream to the Linux drivers Nova and nouveau as findings. The firmware stays NVIDIA's for a physical reason: the GPU checks its signature and will not boot anything else. 18 +**Below Omega, and not part of it:** the driver. Omega's GPU stack talks to the GPU through the physics repository's driver client (`nvrm/nvrm.c`, `m16/m16_native.c`). The client talks to NVIDIA's open-source kernel module (`nvidia.ko`, `nvidia-uvm.ko`, version 580.173.02) and the module boots NVIDIA's signed GSP firmware. Aien is building its own GB10 driver to replace that kernel module (aien-dev/omega-gpu-driver, lane OwnDriver, building on aienux#441; L332); today the stack runs on NVIDIA's open kernel module, and the own driver has not yet run on the chip. GB10 facts I measure on the way (chip id, boot sequence) still go upstream to the Linux drivers Nova and nouveau as findings. The firmware stays NVIDIA's for a physical reason: the GPU checks its signature and will not boot anything else. 19 19 20 -**Prior art I build beside.** Omega's sm_121 encoder is one of several open ones. Mesa's NAK compiler emits SM120 code (MIT, checked against nvdisasm), cubit is an MIT SM120/SM121a assembler and disassembler, blackwell-isa publishes MIT sm121a encoding tables, and nvidia-sass-document collects SASS notes. tinygrad's NVKIface talks to the same open kernel module interface my driver client uses. I cross-check against them and credit them; `THIRD_PARTY.md` in aien-dev/CUDApp lists what I reuse. 20 +**Prior art I build beside.** Omega's sm_121 encoder is one of several open ones. Mesa's NAK compiler emits SM120 code (MIT, checked against nvdisasm), cubit is an MIT SM120/SM121a assembler and disassembler, blackwell-isa publishes MIT sm121a encoding tables, and nvidia-sass-document collects SASS notes. tinygrad's NVKIface talks to the same open kernel module interface my driver client uses. I credit them; cross-checking the sm_121 encoder against them is PROPOSED (the sm_80 encoder is already host-checked against NAK, `seed/sm80/`); `THIRD_PARTY.md` in aien-dev/CUDApp lists what I reuse. 21 21 22 22 ## 2. CUDA, piece by piece 23 23 @@ -64,7 +64,7 @@ I say it when every row is PASS, each with a receipt pushed on the exact commit. 64 64 65 65 These are not part of the CUDA claim. They are the rest of what Omega is for, and each has its own bar. 66 66 67 -- **No NVIDIA software at all.** Aien builds and uses its own GB10 driver to replace `nvidia.ko` and `nvidia-uvm.ko` (aien-dev/omega-gpu-driver, lane OwnDriver, building on aienux#441; L332). The bar: Omega's golden tokens identical on my driver and on NVIDIA's, with per-word timing. GB10 facts I learn still go upstream to Nova and nouveau as findings. The GSP firmware stays, as above. 67 +- **No NVIDIA software but the signed firmware (goal).** Aien is building its own GB10 driver to replace `nvidia.ko` and `nvidia-uvm.ko` (aien-dev/omega-gpu-driver, lane OwnDriver, building on aienux#441; L332); today the stack runs on NVIDIA's open kernel module, and the own driver has not yet run on the chip. The bar: Omega's golden tokens identical on my driver and on NVIDIA's, with per-word timing. GB10 facts I learn still go upstream to Nova and nouveau as findings. The GSP firmware stays, as above. 68 68 - **The runtime written in Omega.** The GPU runtime and libraries are C today. The language rule (aien-architecture ADR 0024) keeps C only where hardware, boot, ABI or measurement justifies it, so the runtime moves into Omega once C1 makes that possible. 69 69 - **The CPU.** The OSC and Omegese backends emit AArch64 machine code today (`src/compiler/osc_a64.c`). The live server is still a gcc and Rust build linked against glibc; it moves to Omega-compiled code as the language grows. 70 70 docs/numeric/OMEGA_GPU_NATIVE_BOUNDARY.md @@ -116,12 +116,12 @@ files in section 3. 116 116 117 117 | Responsibility | Linux path today | Native owner | Cut | Status | 118 118 |---|---|---|---|---| 119 -| Device discovery, bounded ownership (MMIO/DMA/IRQ capabilities) | RM device open (`nvrm_open`, `m16_native_open`) | AIENOS PCI/SMMU layer + `OmegaGpuPlatform` MMIO/DMA services | B | NOT_RUN | 120 -| Device and firmware initialization (GSP, falcons) | RM boot inside the kernel module | AIENOS GB10 firmware lifecycle (P08) | B/P08 | NOT_RUN | 119 +| Device discovery, bounded ownership (MMIO/DMA/IRQ capabilities) | RM device open (`nvrm_open`, `m16_native_open`) | Aienux PCI/SMMU layer + `OmegaGpuPlatform` MMIO/DMA services | B | NOT_RUN | 120 +| Device and firmware initialization (GSP, falcons) | RM boot inside the kernel module | Aienux GB10 firmware lifecycle (P08) | B/P08 | NOT_RUN | 121 121 | Context / address space creation | RM client + VA space objects (`nvrm_mthd`) | native context object behind `OmegaGpuDeviceHandle` | B | NOT_RUN | 122 122 | Memory allocation with cache attributes | `nvrm_alloc`, `nvrm_alloc_gpu_uncached` | `OmegaGpuPlatform.dma_alloc` with `OmegaGpuBufferDesc` (kind, rights, cache policy) | B | contract DONE, device NOT_RUN | 123 -| GPU page tables / mapping | UVM + RM map | AIENOS page tables, GPU VA through `OmegaGpuVa` | B | NOT_RUN | 124 -| Bus addresses / SMMU translation | kernel DMA API inside RM | AIENOS SMMU, `OmegaGpuBusAddr` (no raw physical address type exists) | B | NOT_RUN | 123 +| GPU page tables / mapping | UVM + RM map | Aienux page tables, GPU VA through `OmegaGpuVa` | B | NOT_RUN | 124 +| Bus addresses / SMMU translation | kernel DMA API inside RM | Aienux SMMU, `OmegaGpuBusAddr` (no raw physical address type exists) | B | NOT_RUN | 125 125 | Channel / queue creation (GPFIFO, USERD) | `m16_native_create_channel`, `nvrm_channel` | native queue behind `OmegaGpuQueueHandle`, ring is a `BUF_QUEUE` buffer | B/C | NOT_RUN | 126 126 | Submit token / doorbell | `m16_native_submit_methods`, `nvrm_enqueue`, `nvrm_ring` | `OmegaGpuPlatform.mmio_write32` on the doorbell region | C | NOT_RUN | 127 127 | Completion (marker words, semaphores) | `m16_native_wait_marker*`, host polling | `OmegaGpuPlatform.poll_word` (polling, ABI 1.1) on a HOST_POLLED, GPU-uncached buffer | C | contract and session DONE (cut C), device NOT_RUN | @@ -258,7 +258,7 @@ an RM method table. 258 258 (`omega_gpu_attention_api.c`, `omega_gpu_elementwise_api.c`) still malloc 259 259 their code and move with the session in cut C (the attention API moved in 260 260 cut C session part; the elementwise API has not). 261 -- B (needs an attended window, native v1 gate order N1 then N4): AIENOS-side 261 +- B (needs an attended window, native v1 gate order N1 then N4): Aienux-side 262 262 discovery and bounded device ownership through the platform services; a 263 263 discovery-only run makes zero configuration writes; SMMU/DMA resolved; 264 264 polling does not claim IRQ. Implement aienos#285 before any domain-1 docs/osc/OSC-3-DESIGN.md @@ -303,7 +303,7 @@ truncated generation can make a stale handle look live again. 303 303 | `src/runtime/rx_jspace.c:1406, :1413, :1414` J-Space body writes branch/slot generations with `put32` | u32 on the wire | runtime lane | `put64` with a J-Space record version bump, same rule | 304 304 | `src/omega_accelerator.h:67, :87` `uint32_t capability_generation` | u32 | accelerator owner (not OSC) | widen to u64, retire at max; ADR decision 1 names this file | 305 305 | `src/compiler/osc_rt.h` `slot_serial[]`, `next_serial`, `pool_serial` | u32, never wraps (item 2) | OSC (this lane) | done in item 2: handle generations are u64 with retire-at-max; the serials stay u32 (hashed into the event log as 4 bytes) and an allocation, arena open, arena allocation or pool open with its counter at UINT32_MAX traps RUNTIME before any state changes (item 2, Limits) | 306 -| AIENOS ADR 0013 (`index u32; generation u32`, retire at u32::MAX) | u32 | aienos lane | request only, see item 5 (`docs/osc/OSC-3-ADR0013-REQUEST.md`); not edited from this repository | 306 +| Aienux ADR 0013 (`index u32; generation u32`, retire at u32::MAX) | u32 | aienos lane | request only, see item 5 (`docs/osc/OSC-3-ADR0013-REQUEST.md`); not edited from this repository | 307 307 308 308 Only the `osc_rt` row is inside this lane's files. The others are listed so the 309 309 owning lanes can schedule them; each is a versioned change with old records docs/r16-operator-control.md @@ -22,7 +22,7 @@ its own world. Every statement below holds for each of those worlds. 22 22 program enrolls the operator with `rx_world_enroll_caller`: a fresh 32-byte random 23 23 secret and a generation, issued by the runtime. The program keeps no copy after 24 24 handing it over (below) and wipes its buffer. 25 -* **Capability.** The program mints, through the native AIENOS authority it already 25 +* **Capability.** The program mints, through the native Aienux authority it already 26 26 starts (`aienos_cap_start`, the same `mint()` path every production grant uses), one 27 27 capability for `RX_OPERATOR_SUBJ` on `RX_WORLD_RES_CONTROL` (0x906) with 28 28 `RX_WORLD_RIGHT_HALT` (`RX_RIGHT_EPOCH`: privileged, never delegable). No other docs/r16-production-entry-point.md @@ -9,7 +9,7 @@ The production path is the resident reaction world: the R13 living system 9 9 (goal in, AIEN reacts, Omega reacts, authority, GPU, evidence, generation 10 10 promotes) and its R14 recovery paths. Nothing sequences the faculties; each 11 11 reaction wakes on the objects it declared and commits under the grants it 12 -holds, checked by the native AIENOS capability authority (C, pinned by 12 +holds, checked by the native Aienux capability authority (C, pinned by 13 13 `aienos.lock`). 14 14 15 15 Who may act is fixed by the runtime too (spec C6): at startup the entry point docs/runtime/API.md @@ -68,7 +68,7 @@ The platform contract has its own number (`OMEGA_GPU_PLATFORM_ABI_MAJOR` 1, `OME 68 68 **Device and platform.** Omega talks to the GPU through a small "platform" layer: a table of services (a clock, a lock, 69 69 device-visible memory, a submission queue, a way to poll for completion). Today one platform exists, the Linux reference 70 70 (`src/omega_gpu_platform_linux.c`), which uses NVIDIA's open kernel driver. The contract is written so a second backend 71 -(WSL2 on Windows, or AIENOS with no Linux driver) can fill the same table. A program normally never touches the platform: 71 +(WSL2 on Windows, or Aienux with no Linux driver) can fill the same table. A program normally never touches the platform: 72 72 the first call that needs the GPU installs the Linux reference by itself. There is **one device, one channel per process**. 73 73 There is no call to ask the device its name, SM count or memory size yet (section 8). 74 74 @@ -398,7 +398,7 @@ Each line is a gap named in `docs/runtime/ROADMAP.md` section 1 (on branch `runt 398 398 - Async copy, streams, events, host callbacks (omega-mv#580 is building ordering on command lists). 399 399 - Cached read-write buffers; unified memory. 400 400 - Launches with more than the 32 argument words, or an asynchronous single launch. 401 -- A second real backend (WSL2 `/dev/dxg` is on branch `rig/gb20x`; native AIENOS is planned), so the platform contract has only been exercised by one. 401 +- A second real backend (WSL2 `/dev/dxg` is on branch `rig/gb20x`; native Aienux is planned), so the platform contract has only been exercised by one. 402 402 - A runtime function that reports the version of the linked library (the version is a compile-time macro only). 403 403 404 404 ## 9. EXPERIMENTAL entries docs/runtime/PORTABILITY.md @@ -89,10 +89,10 @@ file", not "the closure links". 89 89 90 90 ## 4. Three ways to reach the GPU 91 91 92 -| | Linux open driver | WSL2 under Windows (`/dev/dxg`) | Native AIENOS | 92 +| | Linux open driver | WSL2 under Windows (`/dev/dxg`) | Native Aienux | 93 93 |---|---|---|---| 94 94 | Status | Runs on the DGX Spark (GB10). The only backend with chip evidence. | Host-tested only. Nothing has touched a real `/dev/dxg` or an RTX 5070 (`docs/rig/dxg-backend.md` on `rig/gb20x`, section 5, status line). | Not built. The boot image that looks for the GPU has not been booted on hardware (aienos `docs/GB10_NATIVE_STATUS.md`). NOT_RUN. | 95 -| How it talks | `/dev/nvidiactl`, `/dev/nvidia0`, `/dev/nvidia-uvm` through `physics/nvrm` and `physics/m16`. Omega rings the GPU itself through a channel it owns. | D3DKMT ioctls on `/dev/dxg` (Microsoft's `dxgkrnl`), which forwards to the Windows NVIDIA driver. No doorbell ioctl exists; each submit is an ioctl (`docs/WINDOWS-GPU-PATH.md` section 1, aien-rig branch `app/v0`). | AIENOS drives PCI, SMMU, firmware load, queues and doorbells itself. | 95 +| How it talks | `/dev/nvidiactl`, `/dev/nvidia0`, `/dev/nvidia-uvm` through `physics/nvrm` and `physics/m16`. Omega rings the GPU itself through a channel it owns. | D3DKMT ioctls on `/dev/dxg` (Microsoft's `dxgkrnl`), which forwards to the Windows NVIDIA driver. No doorbell ioctl exists; each submit is an ioctl (`docs/WINDOWS-GPU-PATH.md` section 1, aien-rig branch `app/v0`). | Aienux drives PCI, SMMU, firmware load, queues and doorbells itself. | 96 96 | Platform contract | `src/omega_gpu_platform_linux.c` implements it (reference only, hosted only). The vector executor `src/omega_blackwell_submit.c` and engine backend `src/omega_blackwell_engine.c` still call `m16_native_*` directly. | **Does not use it.** The branch defines its own interface, `OmegaSubmitOps` in `src/omega_gpu_submit_iface.h`, with an nvrm and a dxg implementation. No `OmegaGpuBackend` sits on it yet (`dxg-backend.md` section 5). | Designed around it: the contract's native owners per driver responsibility are listed in the boundary doc section 2. No native implementation exists (boundary doc section 6, "C, remaining"). | 97 97 | Biggest open question | none for the GB10 | NVIDIA's private driver data blobs and whether the Windows driver accepts Omega's own Blackwell method stream at all (`dxg-backend.md` section 4: "the largest open question"). `docs/WINDOWS-GPU-PATH.md` section 3 found no public project doing raw NVIDIA submission over `/dev/dxg`. | Everything the Linux driver does today: GSP firmware, memory, page tables, queues, interrupts, reset (boundary doc section 2, all rows NOT_RUN). | 98 98 | Chip code reused | all | The same encoder and QMD; the target table lists the RTX 5070 as sm_120, "THEORETICAL: built from public sources only, never run on the chip" (`src/omega_bw_target.h` on `rig/gb20x`). | The encoder and QMD builder are plain C with no Linux dependency (aienos `docs/GB10_NATIVE_DEPENDENCY_MAP.md`, plain-English summary, item 1); the freestanding build checks that for the files in `GPU_FS_SRCS`. | docs/rx-r7-captable-map.md @@ -1,4 +1,4 @@ 1 -# R7 design: host capability checks onto the AIENOS table 1 +# R7 design: host capability checks onto the Aienux table 2 2 3 3 The mapping itself is `spec/r7-aienos-authority-mapping.md`. This note is the 4 4 short version. @@ -13,12 +13,12 @@ Grounded in: 13 13 14 14 - host validation: `rx_caproot_validate` in `src/runtime/rx_caproot.c`, after 15 15 the split that keeps `RxCapAdmin` off `RxWorld` 16 -- AIENOS table: `CapTable` in `crates/aienos-kernel/src/caps.rs` on aienos 16 +- Aienux table: `CapTable` in `crates/aienos-kernel/src/caps.rs` on aienos 17 17 `main`, and `Handle` in `crates/aienos-kernel/src/abi.rs` 18 18 19 19 ## What already matches 20 20 21 -| Host check | AIENOS table today | 21 +| Host check | Aienux table today | 22 22 | --- | --- | 23 23 | A reference is `{id, generation}` | `Handle` is `{index, generation}`. Generation 0 is never issued. | 24 24 | A reused slot must not honor the old reference | `lookup` requires the slot generation to match. A stale handle is `InvalidHandle`. | evidence/GPU-MUFU-FTZ-`20261116`/README.txt new file mode 100644 @@ -0,0 +1,5 @@ 1 +omega-mv `f869644339234ef48aecee87803ee9bb09dc81dc`, fresh clone, GB10 spark-window 20261116T231028Z-083cf5 (exclusive, quiet none: values only, no speed claim) 2 +command: PHYSICS_DIR=build/pins/physics-src spark-window run sh tools/run_gpu_elementwise_chip.sh ; files below are that runner's output folder FB1-CUT4-`f86964433` unchanged (SHA256SUMS is the runner's own) 3 +Xid count before 0, after 0 4 +result: PASS 43 checks, 0 failed; ex2_ftz_probe chip_differs_from_ieee=191 of 217; rsq_ftz_probe chip_differs_from_ieee=8 of 1029; every mutant CAUGHT 5 +the earlier run evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116` was made at `ebbb089a`, a pre-rebase commit of the same change (later `608b35c4`, `00e83ec4`); `f8696443` is also a pre-rebase commit and is not kept on main. This run is bound to the landed head by the source sha256s in SHA256SUMS (omega_gpu_elementwise_api.c/.h, gpu_elementwise_test.c, bw_mufu_ftz.h), which equal that head's files; the test binary itself was not hashed in this run evidence/GPU-MUFU-FTZ-`20261116`/SHA256SUMS new file mode 100644 @@ -0,0 +1,8 @@ 1 +`e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` build.log 2 +`98456eacc5a0f2d0702c2dc39740155f1952e4a5aeef48e0a67bf0e767679ed7` bw_mufu_ftz.h 3 +`d6c67fd26a9560ba4d5c75819938379c7cf54a85254e637916626f314f92b00b` device.txt 4 +`fa00f7acabde5a473f251f2c4958df6163a2cc27edbe30b861cdc5d9e7658e64` gpu_elementwise_test.c 5 +`375ad820833293b5f90a9d5d13ec8183961e3b75bf1795d0658c460d57716646` omega_gpu_elementwise_api.c 6 +`cd79fd0352e6f9bff7e163ba4fc46320d4c25b6ea8cd77e72bd1bf38f66f1c6f` omega_gpu_elementwise_api.h 7 +`d24e42f742bf90259c820d3661d284a81f65ded6406df35edd58e9439038878b` receipt.json 8 +`fea951741d904cf755ed18117dfe6c70e10ea142f40da82b90a6a514fb992e71` run.log evidence/GPU-MUFU-FTZ-`20261116`/build.log new file mode 100644 evidence/GPU-MUFU-FTZ-`20261116`/bw_mufu_ftz.h new file mode 100644 @@ -0,0 +1,42 @@ 1 +/* bw_mufu_ftz.h: the GB10 MUFU unit's flush-to-zero rule, shared by every host model of it (omega #462). 2 + * 3 + * The model assumes MUFU (the SASS EX2 / RCP / RSQ unit) flushes a subnormal input and a subnormal result to a 4 + * sign-preserving zero. Chip-observed on GB10: 5 + * - RCP result flush: the SwiGLU reciprocal 1 / (2^t + 1) for t in (126, 128) came back as +-0 on all 101 of 101 6 + * differing elements (evidence OWN30B-L1G-PFGEMM-SWIGLU-FTZ-`df9bd9c4`, gpu_pfgemm_test host red test). 7 + * - EX2 result flush: ex2(x) for x stepped by 1/8 from -151 came back as 0 on all 191 of 191 inputs whose IEEE result 8 + * is subnormal (evidence/GPU-MUFU-FTZ-`20261116`, gpu_elementwise_test ex2_ftz_probe, run by 9 + * tools/run_gpu_elementwise_chip.sh; first seen in evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`). 10 + * - RSQ input flush, with sign: rsq of each of the 8 subnormal inputs of both signs came back as +-inf, where IEEE 11 + * gives a finite value (positive) or NaN (negative) (same evidence, rsq_ftz_probe). 12 + * Not chip-observed: the EX2 / RCP input flush and the sign of a flushed EX2 result (EX2 of a subnormal is 1 either way 13 + * and its result is never negative), and the RSQ result flush (rsq of any finite f32 is at least 2^-64, never 14 + * subnormal). The model applies the same rule to them, PTX ISA 9.7.3.13 (rcp) and 9.7.3.21 (ex2) "flushes subnormal 15 + * inputs and results to sign-preserving zero" for the .ftz form, which is what the bare MUFU we emit is (the non-ftz PTX 16 + * variants are ptxas sequences around MUFU; NVIDIA publishes no SASS semantics). Limit: the chip's MUFU is approximate 17 + * (RCP 1 ulp, EX2 2 ulp), the model flushes a correctly rounded IEEE result, so right at the subnormal boundary the two 18 + * can disagree 0 versus nonzero. 19 + * 20 + * Users: tests/bw_warp_sim.h, bw_warp_sim_k.h, bw_warp_sim_pa.h, bw_warp_sim_tc.h (MUFU cases), the attention test's own 21 + * per-thread simulator (gpu_attention_test.c) and the pfgemm / qgemm SwiGLU host references. omega_numeric.c has its own 22 + * ftz() on the library side. Self-contained (no simulator state) so any of them can include it, in any order. */ 23 +#ifndef BW_MUFU_FTZ_H 24 +#define BW_MUFU_FTZ_H 25 + 26 +#include 27 +#include 28 +#include 29 + 30 +/* A subnormal (exponent field 0, mantissa nonzero) becomes a zero of the same sign; zeros, normals, inf and NaN pass. */ 31 +static inline float ws_mufu_ftz(float f) { 32 + uint32_t u; memcpy(&u, &f, 4); 33 + if ((u & 0x7f800000u) == 0u) u &= 0x80000000u; 34 + memcpy(&f, &u, 4); 35 + return f; 36 +} 37 +/* The three MUFU functions the codegen emits: input flushed, IEEE f32 function, result flushed. */ 38 +static inline float ws_mufu_ex2(float x) { return ws_mufu_ftz(exp2f(ws_mufu_ftz(x))); } 39 +static inline float ws_mufu_rcp(float x) { return ws_mufu_ftz(1.0f / ws_mufu_ftz(x)); } 40 +static inline float ws_mufu_rsq(float x) { return ws_mufu_ftz(1.0f / sqrtf(ws_mufu_ftz(x))); } 41 + 42 +#endif evidence/GPU-MUFU-FTZ-`20261116`/device.txt new file mode 100644 @@ -0,0 +1,5 @@ 1 +Linux spark-b87b 7.0.0-1019-nvidia #19~24.04.2-Ubuntu SMP PREEMPT_DYNAMIC Sun Sep 6 18:35:11 UTC 2 aarch64 aarch64 aarch64 GNU/Linux 2 +NVIDIA GB10, 580.173.02 3 +omega `f869644339234ef48aecee87803ee9bb09dc81dc` (0 uncommitted paths) 4 +physics `048e5f5e881b092733baaf65d0ace46abda7f908` 5 +2026-11-16T23:10:55Z evidence/GPU-MUFU-FTZ-`20261116`/gpu_elementwise_test.c new file mode 100644 @@ -0,0 +1,503 @@ 1 +/* SPDX-License-Identifier: Apache-2.0 2 + * Copyright 2026 Drake Stapleton (AIEN / aien-dev) 3 + * 4 + * Licensed under the Apache License, Version 2.0 (the "License"); 5 + * you may not use this file except in compliance with the License. 6 + * You may obtain a copy of the License at 7 + * 8 + * http://www.apache.org/licenses/LICENSE-2.0 9 + * 10 + * Unless required by applicable law or agreed to in writing, software 11 + * distributed under the License is distributed on an "AS IS" BASIS, 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 + * See the License for the specific language governing permissions and 14 + * limitations under the License. 15 + */ 16 + 17 +/* gpu_elementwise_test: FB-1 cut 4 gate for omega_gpu_elementwise_api. 18 + * 19 + * ./gpu_elementwise_test --host-only refusals, codegen, word fixtures, register budget, 20 + * listing check by Omega's own disassembler 21 + * ./gpu_elementwise_test --out receipt.json chip gate: every op against the host oracle, then its mutant 22 + * (a deliberately wrong kernel) which the same check must catch 23 + * ./gpu_elementwise_test --timing --out t.json cut 4b gate: persistent device, 100 calls each of rmsnorm 1x2048 24 + * and swiglu 5632 under 0.5 ms median, one device open per process 25 + * 26 + * Oracles re-state aien-sovereign-core crates/aien-inference-abi/src/tensor.rs (main `5fdab70`) in C: 27 + * rmsnorm sums in f64, rope computes cos/sin in f64 and casts to f32 before f32 math, swiglu is f64. 28 + * This file is compiled with -ffp-contract=off so the f32 oracle math has no hidden fused multiply-add. 29 + * 30 + * Tolerances (why): EX2 1e-6 rel (PTX ex2.approx.f32: 2^-22.5 rel, we allow 2x). XCHG exact. 31 + * RMSNORM 1e-5 rel + 1e-6 abs (f32 sum of up to 16384 squares against an f64 sum, plus RSQ seed with one 32 + * Newton step; the mutant moves the scale by about 40 percent). ROPE exact (same f32 ops, same order). 33 + * SWIGLU 1e-5 rel + 1e-6 abs (EX2 and RCP approximations, each about 2^-22 rel; the mutant flips the sign 34 + * of the exponent, which is wrong by a factor of e^(2g)). 35 + */ 36 +#include "omega_gpu_elementwise_api.h" 37 +#include "omega_blackwell_codegen.h" 38 +#include "omega_gpu_session.h" 39 +#include "omega_sm121_disasm.h" 40 +#include 41 +#include 42 +#include 43 +#include 44 +#include 45 +#include 46 +#include 47 +#include 48 +#include "bw_mufu_ftz.h" 49 + 50 +static int g_checks, g_failed; 51 +#define CHECK(cond, ...) do { g_checks++; if (!(cond)) { g_failed++; printf("FAIL: "); printf(__VA_ARGS__); printf("\n"); } } while (0) 52 + 53 +static uint32_t lcg(uint32_t *s) { *s = *s * 1664525u + 1013904223u; return *s; } 54 +static float frand(uint32_t *s, float lo, float hi) { return lo + (hi - lo) * ((float)(lcg(s) >> 8) / `16777216`.0f); } 55 + 56 +/* ----------------------------------------------------------------- oracles */ 57 +static void oracle_rmsnorm(const float *x, const float *w, float eps, float *out, size_t dim) { 58 + double ss = 0.0; 59 + for (size_t i = 0; i < dim; i++) ss += (double)x[i] * (double)x[i]; 60 + double mean = ss / (double)dim; 61 + float scale = (float)(1.0 / sqrt(mean + (double)eps)); 62 + for (size_t i = 0; i < dim; i++) { float t = x[i] * scale; out[i] = t * w[i]; } 63 +} 64 +static void oracle_rope_tables(size_t head_dim, size_t pos, float theta, float *cos_half, float *sin_half) { 65 + size_t half = head_dim / 2; 66 + for (size_t i = 0; i < half; i++) { 67 + double exponent = (double)(2 * i) / (double)head_dim; 68 + double freq = 1.0 / pow((double)theta, exponent); 69 + double rot = (double)pos * freq; 70 + sin_half[i] = (float)sin(rot); 71 + cos_half[i] = (float)cos(rot); 72 + } 73 +} 74 +static void oracle_rope(const float *v, size_t heads, size_t head_dim, const float *cos_half, const float *sin_half, float *out) { 75 + size_t half = head_dim / 2; 76 + for (size_t h = 0; h < heads; h++) 77 + for (size_t i = 0; i < half; i++) { 78 + size_t i0 = h * head_dim + i, i1 = i0 + half; 79 + float q0 = v[i0], q1 = v[i1], c = cos_half[i], s = sin_half[i]; 80 + float a = q0 * c, b = q1 * s; out[i0] = a - b; 81 + float d = q0 * s, e = q1 * c; out[i1] = d + e; 82 + } 83 +} 84 +static void oracle_swiglu(const float *g, const float *u, float *out, size_t n) { 85 + for (size_t i = 0; i < n; i++) { double gg = g[i]; double silu = gg / (1.0 + exp(-gg)); out[i] = (float)(silu * (double)u[i]); } 86 +} 87 + 88 +/* |got - want| <= rel*|want| + abs; returns the number of violations and the worst scaled error */ 89 +static size_t compare(const float *got, const float *want, size_t n, double rel, double abs_tol, double *worst) { 90 + size_t bad = 0; *worst = 0.0; 91 + for (size_t i = 0; i < n; i++) { 92 + double d = fabs((double)got[i] - (double)want[i]); 93 + double lim = rel * fabs((double)want[i]) + abs_tol; 94 + double scaled = lim > 0 ? d / lim : (d > 0 ? INFINITY : 0.0); 95 + if (scaled > *worst) *worst = scaled; 96 + if (!(d <= lim)) bad++; /* NaN counts as bad */ 97 + } 98 + return bad; 99 +} 100 + 101 +/* ------------------------------------------------------------- host only */ 102 +static int sm121dis_check(OmegaGpuEwOp op, const char *name, const char *const *must, int n_must) { 103 + OmegaBlackwellKernel k; memset(&k, 0, sizeof k); 104 + if (omega_gpu_elementwise_codegen(op, NULL, 0.0f, &k) != OMEGA_GPU_EW_OK) return -1; 105 + char lst[64]; 106 + snprintf(lst, sizeof lst, "/tmp/omega_ew_%s_%d.sass.XXXXXX", name, (int)getpid()); 107 + int fd = mkstemp(lst); /* private, unique listing; read back the same descriptor */ 108 + FILE *f = fd >= 0 ? fdopen(fd, "w+") : NULL; 109 + if (!f) { if (fd >= 0) close(fd); free(k.code); return -1; } 110 + int rc = omega_sm121_listing(k.code, k.code_size, f); 111 + free(k.code); 112 + if (fflush(f) != 0 || fseek(f, 0, SEEK_SET) != 0) { fclose(f); return -1; } 113 + FILE *l = f; 114 + char line[512]; int seen[16] = {0}; int bad = 0, insns = 0; 115 + while (fgets(line, sizeof line, l)) { 116 + if (!strstr(line, "/*")) continue; /* every address line, 0x1000 and up too */ 117 + insns++; 118 + if (strstr(line, "?") || strstr(line, "error")) bad++; 119 + for (int i = 0; i < n_must; i++) if (strstr(line, must[i])) seen[i] = 1; 120 + } 121 + if (ferror(l)) rc = -1; 122 + if (fclose(l) != 0) rc = -1; 123 + int miss = 0; 124 + for (int i = 0; i < n_must; i++) if (!seen[i]) { printf(" %s: sm121dis listing lacks %s\n", name, must[i]); miss++; } 125 + printf("sm121dis %s: rc=%d insns=%d undecodable=%d missing=%d (%s)\n", name, rc, insns, bad, miss, lst); 126 + return (rc == 0 && bad == 0 && miss == 0) ? 0 : -1; 127 +} 128 + 129 +static void host_only(void) { 130 + CHECK(omega_blackwell_verify_codegen_fixtures_fb1cut4() == 0, "word fixtures MUFU_EX2 / BAR_SYNC / LDS32 / STS32 (rc %d)", omega_blackwell_verify_codegen_fixtures_fb1cut4()); 131 + float a[256] = {0}, b[256] = {0}, c[256] = {0}; 132 + CHECK(omega_gpu_rmsnorm_f32(0, 128, a, b, 1e-5f, c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "rows=0 refused"); 133 + CHECK(omega_gpu_rmsnorm_f32(1, 100, a, b, 1e-5f, c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "dim not a multiple of 128 refused"); 134 + CHECK(omega_gpu_rmsnorm_f32(1, OMEGA_GPU_EW_MAX_DIM + 128, a, b, 1e-5f, c, NULL) == OMEGA_GPU_EW_TOO_LARGE, "dim over limit refused"); 135 + CHECK(omega_gpu_rope_f32(1, 63, a, b, b, c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "odd head_dim refused"); 136 + CHECK(omega_gpu_rope_f32(1, 64, NULL, b, b, c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "NULL vector refused"); 137 + CHECK(omega_gpu_swiglu_f32(0, a, b, c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "n=0 refused"); 138 + CHECK(omega_gpu_shared_xchg_u32(100, (uint32_t *)a, (uint32_t *)c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "xchg n not a multiple of 128 refused"); 139 + CHECK(omega_gpu_rsq_f32(0, a, c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "rsq n=0 refused"); 140 + CHECK(strcmp(omega_gpu_elementwise_rc_name(OMEGA_GPU_EW_UNWRITTEN), "UNWRITTEN") == 0, "rc name"); 141 + 142 + struct { OmegaGpuEwOp op; const char *name; const char *must[6]; int n; } ops[] = { 143 + { OMEGA_GPU_EW_EX2, "ex2", { "MUFU.EX2", "@P0 EXIT", "STG.E" }, 3 }, 144 + { OMEGA_GPU_EW_XCHG, "xchg", { "STS [R", "BAR.SYNC", "LDS R" }, 3 }, 145 + { OMEGA_GPU_EW_RMSNORM, "rmsnorm", { "SHFL.DOWN", "BAR.SYNC", "MUFU.RSQ", "@!P0 BRA", "STS [R", "LDS R" }, 6 }, 146 + { OMEGA_GPU_EW_ROPE, "rope", { "FADD", "FMUL", "STG.E" }, 3 }, 147 + { OMEGA_GPU_EW_SWIGLU, "swiglu", { "MUFU.EX2", "MUFU.RCP", "@P0 EXIT" }, 3 }, 148 + { OMEGA_GPU_EW_RSQ, "rsq", { "MUFU.RSQ", "@P0 EXIT", "STG.E" }, 3 }, 149 + }; 150 + for (size_t i = 0; i < sizeof ops / sizeof ops[0]; i++) { 151 + OmegaBlackwellKernel k; memset(&k, 0, sizeof k); 152 + int rc = omega_gpu_elementwise_codegen(ops[i].op, NULL, 0.0f, &k); 153 + CHECK(rc == OMEGA_GPU_EW_OK && k.code_size > 0 && k.gpr_count <= 64, "%s kernel generated (rc %s, %zu insns, %u gprs)", ops[i].name, omega_gpu_elementwise_rc_name(rc), k.insn_count, k.gpr_count); 154 + printf("codegen %s: %zu insns, %u gprs, %u ugprs\n", ops[i].name, k.insn_count, k.gpr_count, k.uniform_gpr_count); 155 + uint8_t digest[32]; memcpy(digest, k.code_digest, 32); 156 + free(k.code); 157 + /* the mutant must be a different kernel */ 158 + omega_gpu_elementwise_test_set_mutant((int)ops[i].op); 159 + memset(&k, 0, sizeof k); 160 + CHECK(omega_gpu_elementwise_codegen(ops[i].op, NULL, 0.0f, &k) == OMEGA_GPU_EW_OK && memcmp(digest, k.code_digest, 32) != 0, "%s mutant kernel differs", ops[i].name); 161 + free(k.code); 162 + omega_gpu_elementwise_test_set_mutant(0); 163 + CHECK(sm121dis_check(ops[i].op, ops[i].name, ops[i].must, ops[i].n) == 0, "%s sm121dis listing decodes and shows the expected instructions", ops[i].name); 164 + } 165 +} 166 + 167 +/* ------------------------------------------------------------- chip gate */ 168 +typedef struct { const char *name; size_t n; int rc; size_t bad; double worst; int pass; int mutant_rc; size_t mutant_bad; int mutant_caught; uint64_t chip_ns; uint32_t calls; uint32_t unwritten; char probe[256]; } Case; 169 +static int g_ncases; 170 + 171 +static void record(Case c, FILE *out) { 172 + g_ncases++; 173 + CHECK(c.pass, "%s rc=%s violations=%zu worst=%g", c.name, omega_gpu_elementwise_rc_name(c.rc), c.bad, c.worst); 174 + CHECK(c.mutant_caught, "%s mutant caught (rc=%s violations=%zu)", c.name, omega_gpu_elementwise_rc_name(c.mutant_rc), c.mutant_bad); 175 + printf("%s %s n=%zu rc=%s violations=%zu worst_scaled_err=%g chip_ns=%" PRIu64 " calls=%u unwritten=%u | mutant rc=%s violations=%zu %s\n", 176 + c.pass && c.mutant_caught ? "PASS" : "FAIL", c.name, c.n, omega_gpu_elementwise_rc_name(c.rc), c.bad, c.worst, c.chip_ns, c.calls, c.unwritten, 177 + omega_gpu_elementwise_rc_name(c.mutant_rc), c.mutant_bad, c.mutant_caught ? "CAUGHT" : "NOT CAUGHT"); 178 + if (out) fprintf(out, "%s{\"case\":\"%s\",\"n\":%zu,\"rc\":\"%s\",\"violations\":%zu,\"worst_scaled_err\":%g,\"pass\":%s,\"chip_elapsed_ns\":%" PRIu64 ",\"chip_calls\":%u,\"unwritten_words\":%u,\"mutant_rc\":\"%s\",\"mutant_violations\":%zu,\"mutant_caught\":%s%s%s%s}", 179 + g_ncases > 1 ? "," : "", c.name, c.n, omega_gpu_elementwise_rc_name(c.rc), c.bad, c.worst, c.pass ? "true" : "false", c.chip_ns, c.calls, c.unwritten, 180 + omega_gpu_elementwise_rc_name(c.mutant_rc), c.mutant_bad, c.mutant_caught ? "true" : "false", 181 + c.probe[0] ? ",\"probe\":{" : "", c.probe, c.probe[0] ? "}" : ""); 182 +} 183 + 184 +/* omega #462 flush probes. want is the host model (tests/bw_mufu_ftz.h: input flushed, IEEE function, result 185 + * flushed). 0 = violation, 1 = match, 2 = flushed at the FLT_MIN boundary (allowed only with `boundary`). 186 + * A zero, infinite or NaN want must come back exactly (NaN: any NaN). A normal want needs a normal result within 187 + * rel, so an unflushed subnormal is always a violation; with `boundary` a zero of want's sign is also allowed when 188 + * want is within 2^-21 rel above FLT_MIN (MUFU is approximate, the model flushes a correctly rounded result). */ 189 +static int ftz_match(float got, float want, double rel, int boundary, double *scaled) { 190 + uint32_t g, w; memcpy(&g, &got, 4); memcpy(&w, &want, 4); 191 + if (isnan(want)) return isnan(got); 192 + if ((w & 0x7fffffffu) == 0u || isinf(want)) return g == w; 193 + if (boundary && (g & 0x7fffffffu) == 0u && ((g ^ w) & 0x80000000u) == 0u && fabsf(want) < FLT_MIN * (1.0f + 0x1p-21f)) return 2; 194 + if ((g & 0x7f800000u) == 0u || isinf(got) || isnan(got)) return 0; 195 + double s = fabs((double)got - (double)want) / (rel * fabs((double)want)); 196 + if (scaled && s > *scaled) *scaled = s; 197 + return s <= 1.0; 198 +} 199 + 200 +static float ieee_rsq(float x) { return 1.0f / sqrtf(x); } 201 + 202 +/* One flush probe: the chip against the model, then two controls on the rows where the model and IEEE f32 203 + * without the flush differ (the rows that decide the rule): 204 + * host control (no chip): the comparator must reject IEEE-without-flush on every such row, so a pass below 205 + * cannot come from a comparator that accepts both hypotheses; 206 + * chip control: the chip's word must differ from IEEE-without-flush on every such row. 207 + * The op's mutant must be caught by the same comparator. */ 208 +static void ftz_probe(const char *name, OmegaGpuEwOp op, int (*fn)(uint32_t, const float *, float *, OmegaGpuEwInfo *), 209 + float (*model)(float), float (*ieee)(float), const float *x, int n, int boundary, FILE *out) { 210 + /* zeroed so a run that fails before writing (device open, codegen) leaves defined words and info */ 211 + float *got = calloc((size_t)n, 4), *want = calloc((size_t)n, 4); 212 + if (!got || !want) { printf("%s: out of memory\n", name); exit(2); } 213 + OmegaGpuEwInfo info = {0}; 214 + for (int i = 0; i < n; i++) want[i] = model(x[i]); 215 + Case c = { .name = name, .n = (size_t)n }; 216 + c.rc = fn((uint32_t)n, x, got, &info); 217 + size_t deciding = 0, host_flagged = 0, chip_differs = 0, boundary_flush = 0; 218 + for (int i = 0; i < n; i++) { 219 + float ie = ieee(x[i]); 220 + uint32_t g, w, ib, xb; memcpy(&g, &got[i], 4); memcpy(&w, &want[i], 4); memcpy(&ib, &ie, 4); memcpy(&xb, &x[i], 4); 221 + if (ib != w && !(isnan(ie) && isnan(want[i]))) { 222 + deciding++; 223 + if (ftz_match(ie, want[i], 1e-6, boundary, NULL) == 0) host_flagged++; 224 + if (g != ib && !(isnan(got[i]) && isnan(ie))) chip_differs++; 225 + } 226 + int m = ftz_match(got[i], want[i], 1e-6, boundary, &c.worst); 227 + if (m == 2) boundary_flush++; 228 + if (m == 0) { c.bad++; printf(" %s x=0x%08x got 0x%08x want 0x%08x ieee 0x%08x\n", name, xb, g, w, ib); } 229 + } 230 + printf("%s inputs=%d model_differs_from_ieee=%zu host_control_flagged=%zu chip_differs_from_ieee=%zu boundary_flush=%zu\n", 231 + name, n, deciding, host_flagged, chip_differs, boundary_flush); 232 + CHECK(deciding > 0 && host_flagged == deciding, "%s host control: the comparator rejects IEEE without the flush on every " 233 + "deciding row (%zu of %zu)", name, host_flagged, deciding); 234 + CHECK(chip_differs == deciding, "%s chip control: the chip differs from IEEE without the flush on every deciding row (%zu of %zu)", 235 + name, chip_differs, deciding); 236 + snprintf(c.probe, sizeof c.probe, "\"model_differs_from_ieee\":%zu,\"host_control_flagged\":%zu,\"chip_differs_from_ieee\":%zu,\"boundary_flush\":%zu", 237 + deciding, host_flagged, chip_differs, boundary_flush); 238 + c.pass = c.rc == OMEGA_GPU_EW_OK && c.bad == 0; c.chip_ns = info.elapsed_ns; c.calls = info.chip_calls; c.unwritten = info.unwritten_words; 239 + omega_gpu_elementwise_test_set_mutant((int)op); 240 + c.mutant_rc = fn((uint32_t)n, x, got, &info); 241 + for (int i = 0; i < n; i++) if (ftz_match(got[i], want[i], 1e-6, boundary, NULL) == 0) c.mutant_bad++; 242 + c.mutant_caught = c.mutant_rc != OMEGA_GPU_EW_OK || c.mutant_bad > 0; 243 + omega_gpu_elementwise_test_set_mutant(0); 244 + record(c, out); 245 + free(got); free(want); 246 +} 247 + 248 +static int chip(const char *out_path) { 249 + FILE *out = out_path ? fopen(out_path, "w") : NULL; 250 + if (out_path && !out) { printf("cannot open %s\n", out_path); return 2; } 251 + if (out) fprintf(out, "{\"schema\":\"OMEGA_GPU_ELEMENTWISE_V1\",\"tolerances\":{\"ex2_rel\":1e-6,\"xchg\":\"exact\",\"rmsnorm_rel\":1e-5,\"rmsnorm_abs\":1e-6,\"rope\":\"exact\",\"swiglu_rel\":1e-5,\"swiglu_abs\":1e-6," 252 + "\"ex2_ftz\":\"tests/bw_mufu_ftz.h model; zero, inf, NaN exact; normal results normal and 1e-6 rel; zero allowed within 2^-21 rel above FLT_MIN\"," 253 + "\"rsq_ftz\":\"tests/bw_mufu_ftz.h model; zero, inf, NaN exact; normal results normal and 1e-6 rel\"},\"cases\":["); 254 + uint32_t seed = 0xfb1c0004u; 255 + OmegaGpuEwInfo info = {0}; 256 + 257 + /* 1. EX2 probe, with a negative control on the comparison itself */ 258 + { 259 + size_t n = 4096; float *x = malloc(n * 4), *got = malloc(n * 4), *want = malloc(n * 4), *wrong = malloc(n * 4); 260 + for (size_t i = 0; i < n; i++) { x[i] = frand(&seed, -20.0f, 20.0f); want[i] = (float)exp2((double)x[i]); wrong[i] = (float)exp2((double)x[i] + 1.0); } 261 + Case c = { .name = "ex2_probe", .n = n }; 262 + c.rc = omega_gpu_ex2_f32((uint32_t)n, x, got, &info); 263 + c.bad = compare(got, want, n, 1e-6, 0.0, &c.worst); 264 + double w2; size_t neg = compare(got, wrong, n, 1e-6, 0.0, &w2); 265 + CHECK(neg > n / 2, "ex2 negative control: the check rejects a wrong expectation (%zu of %zu flagged)", neg, n); 266 + c.pass = c.rc == OMEGA_GPU_EW_OK && c.bad == 0; c.chip_ns = info.elapsed_ns; c.calls = info.chip_calls; c.unwritten = info.unwritten_words; 267 + omega_gpu_elementwise_test_set_mutant(OMEGA_GPU_EW_EX2); 268 + c.mutant_rc = omega_gpu_ex2_f32((uint32_t)n, x, got, &info); 269 + c.mutant_bad = compare(got, want, n, 1e-6, 0.0, &w2); 270 + c.mutant_caught = c.mutant_rc != OMEGA_GPU_EW_OK || c.mutant_bad > 0; 271 + omega_gpu_elementwise_test_set_mutant(0); 272 + record(c, out); free(x); free(got); free(want); free(wrong); 273 + } 274 + /* 1b. omega #462: the MUFU flush rule on the chip (tests/bw_mufu_ftz.h). Until these probes only RCP's result 275 + * flush was chip-observed. 276 + * EX2 observes the result flush: x = -151 .. -125 in steps of 1/8, so 2^x runs from below the smallest 277 + * subnormal to normal; the model wants +0 wherever the IEEE result is subnormal. The eight subnormal inputs are 278 + * a sanity row only: 2^(+-subnormal) is 1.0f with or without an input flush, so EX2 cannot observe the input 279 + * flush, and its results are never negative, so it cannot observe the sign of a flushed zero either. 280 + * RSQ observes the input flush: a subnormal input read as +-0 gives +-inf, where IEEE gives a finite value 281 + * (positive) or NaN (negative), so the sign half of the input rule shows too. RSQ cannot show a result flush: 282 + * 1/sqrt of a finite f32 is at least 2^-64. Its other rows are 2^e * {1, 1.25, 1.5, 1.75} for every normal 283 + * exponent and the special values +-0, +-inf, -1. */ 284 + { 285 + enum { NS = 209, NSUB = 8, N = NS + NSUB }; 286 + static const uint32_t sub[NSUB] = { 0x00000001u, 0x00000002u, 0x00400000u, 0x007fffffu, 287 + 0x80000001u, 0x80000002u, 0x80400000u, 0x807fffffu }; 288 + float x[N]; 289 + for (int i = 0; i < NS; i++) x[i] = -151.0f + 0.125f * (float)i; 290 + for (int i = 0; i < NSUB; i++) memcpy(&x[NS + i], &sub[i], 4); 291 + ftz_probe("ex2_ftz_probe", OMEGA_GPU_EW_EX2, omega_gpu_ex2_f32, ws_mufu_ex2, exp2f, x, N, 1, out); 292 + } 293 + { 294 + enum { NE = 254 * 4, NSUB = 8, NSP = 5, N = NE + NSUB + NSP }; 295 + static const uint32_t sub[NSUB] = { 0x00000001u, 0x00000002u, 0x00400000u, 0x007fffffu, 296 + 0x80000001u, 0x80000002u, 0x80400000u, 0x807fffffu }; 297 + static const uint32_t sp[NSP] = { 0x00000000u, 0x80000000u, 0x7f800000u, 0xff800000u, 0xbf800000u }; 298 + float x[N]; 299 + for (int i = 0; i < NE; i++) x[i] = ldexpf(1.0f + 0.25f * (float)(i % 4), -126 + i / 4); 300 + for (int i = 0; i < NSUB; i++) memcpy(&x[NE + i], &sub[i], 4); 301 + for (int i = 0; i < NSP; i++) memcpy(&x[NE + NSUB + i], &sp[i], 4); 302 + ftz_probe("rsq_ftz_probe", OMEGA_GPU_EW_RSQ, omega_gpu_rsq_f32, ws_mufu_rsq, ieee_rsq, x, N, 0, out); 303 + } 304 + /* 2. shared-memory exchange probe (STS, BAR.SYNC, LDS) */ 305 + { 306 + size_t n = 4096; uint32_t *x = malloc(n * 4), *got = malloc(n * 4); 307 + for (size_t i = 0; i < n; i++) x[i] = lcg(&seed); 308 + Case c = { .name = "shared_xchg_probe", .n = n }; 309 + c.rc = omega_gpu_shared_xchg_u32((uint32_t)n, x, got, &info); 310 + for (size_t i = 0; i < n; i++) if (got[i] != x[i ^ (OMEGA_GPU_EW_THREADS - 1)]) c.bad++; 311 + c.pass = c.rc == OMEGA_GPU_EW_OK && c.bad == 0; c.chip_ns = info.elapsed_ns; c.calls = info.chip_calls; c.unwritten = info.unwritten_words; 312 + omega_gpu_elementwise_test_set_mutant(OMEGA_GPU_EW_XCHG); 313 + c.mutant_rc = omega_gpu_shared_xchg_u32((uint32_t)n, x, got, &info); 314 + for (size_t i = 0; i < n; i++) if (got[i] != x[i ^ (OMEGA_GPU_EW_THREADS - 1)]) c.mutant_bad++; 315 + c.mutant_caught = c.mutant_rc != OMEGA_GPU_EW_OK || c.mutant_bad > 0; 316 + omega_gpu_elementwise_test_set_mutant(0); 317 + record(c, out); free(x); free(got); 318 + } 319 + /* 3. rmsnorm at the model hidden sizes (TinyLlama and Llama-3.2-1B: 2048), plus small and large */ 320 + { size_t dims[3] = { 2048, 256, 8192 }; size_t rowss[3] = { 4, 1, 2 }; 321 + for (int t = 0; t < 3; t++) { 322 + size_t dim = dims[t], rows = rowss[t], n = rows * dim; float eps = 1e-5f; 323 + float *x = malloc(n * 4), *w = malloc(dim * 4), *got = malloc(n * 4), *want = malloc(n * 4), *again = malloc(n * 4); 324 + for (size_t i = 0; i < n; i++) x[i] = frand(&seed, -3.0f, 3.0f); 325 + for (size_t i = 0; i < dim; i++) w[i] = frand(&seed, 0.5f, 1.5f); 326 + for (size_t r = 0; r < rows; r++) oracle_rmsnorm(x + r * dim, w, eps, want + r * dim, dim); 327 + char name[64]; snprintf(name, sizeof name, "rmsnorm_%zux%zu", rows, dim); 328 + Case c = { .name = strdup(name), .n = n }; 329 + c.rc = omega_gpu_rmsnorm_f32((uint32_t)rows, (uint32_t)dim, x, w, eps, got, &info); 330 + c.bad = compare(got, want, n, 1e-5, 1e-6, &c.worst); 331 + c.pass = c.rc == OMEGA_GPU_EW_OK && c.bad == 0; c.chip_ns = info.elapsed_ns; c.calls = info.chip_calls; c.unwritten = info.unwritten_words; 332 + OmegaGpuEwInfo i2; int rc2 = omega_gpu_rmsnorm_f32((uint32_t)rows, (uint32_t)dim, x, w, eps, again, &i2); 333 + CHECK(rc2 == OMEGA_GPU_EW_OK && i2.kernel_cache_hit && memcmp(got, again, n * 4) == 0, "%s repeat run (cache hit) is bit-identical", name); 334 + omega_gpu_elementwise_test_set_mutant(OMEGA_GPU_EW_RMSNORM); 335 + double w2; c.mutant_rc = omega_gpu_rmsnorm_f32((uint32_t)rows, (uint32_t)dim, x, w, eps, got, &info); 336 + c.mutant_bad = compare(got, want, n, 1e-5, 1e-6, &w2); 337 + c.mutant_caught = c.mutant_rc != OMEGA_GPU_EW_OK || c.mutant_bad > 0; 338 + omega_gpu_elementwise_test_set_mutant(0); 339 + record(c, out); free(x); free(w); free(got); free(want); free(again); 340 + } } 341 + /* 4. rope: TinyLlama (32 q heads, 4 kv heads, head_dim 64, theta 10000) and Llama-3.2-1B (32/8, 64, 500000) */ 342 + { struct { size_t heads, hd, pos; float theta; } rs[4] = { { 32, 64, 17, 10000.0f }, { 4, 64, 17, 10000.0f }, { 32, 64, 1023, 500000.0f }, { 8, 64, 1023, 500000.0f } }; 343 + for (int t = 0; t < 4; t++) { 344 + size_t heads = rs[t].heads, hd = rs[t].hd, n = heads * hd, half = hd / 2; 345 + float *v = malloc(n * 4), *got = malloc(n * 4), *want = malloc(n * 4), *ch = malloc(half * 4), *sh = malloc(half * 4); 346 + for (size_t i = 0; i < n; i++) v[i] = frand(&seed, -4.0f, 4.0f); 347 + oracle_rope_tables(hd, rs[t].pos, rs[t].theta, ch, sh); 348 + oracle_rope(v, heads, hd, ch, sh, want); 349 + char name[64]; snprintf(name, sizeof name, "rope_%zuh_%zud_pos%zu_theta%g", heads, hd, rs[t].pos, rs[t].theta); 350 + Case c = { .name = strdup(name), .n = n }; 351 + c.rc = omega_gpu_rope_f32((uint32_t)heads, (uint32_t)hd, v, ch, sh, got, &info); 352 + c.bad = compare(got, want, n, 0.0, 0.0, &c.worst); 353 + c.pass = c.rc == OMEGA_GPU_EW_OK && c.bad == 0; c.chip_ns = info.elapsed_ns; c.calls = info.chip_calls; c.unwritten = info.unwritten_words; 354 + omega_gpu_elementwise_test_set_mutant(OMEGA_GPU_EW_ROPE); 355 + double w2; c.mutant_rc = omega_gpu_rope_f32((uint32_t)heads, (uint32_t)hd, v, ch, sh, got, &info); 356 + c.mutant_bad = compare(got, want, n, 0.0, 0.0, &w2); 357 + c.mutant_caught = c.mutant_rc != OMEGA_GPU_EW_OK || c.mutant_bad > 0; 358 + omega_gpu_elementwise_test_set_mutant(0); 359 + record(c, out); free(v); free(got); free(want); free(ch); free(sh); 360 + } } 361 + /* 5. swiglu at the model ffn sizes (TinyLlama 5632, Llama-3.2-1B 8192), an odd tail, one past the 362 + * 1024-CTA chunk (two launches) and the Qwen3-8B prefill call 128 x 12288 (twelve launches; cut L) */ 363 + { size_t ns[5] = { 5632, 8192, 1000, 131073, `1572864` }; 364 + for (int t = 0; t < 5; t++) { 365 + size_t n = ns[t]; 366 + float *g = malloc(n * 4), *u = malloc(n * 4), *got = malloc(n * 4), *want = malloc(n * 4); 367 + for (size_t i = 0; i < n; i++) { g[i] = frand(&seed, -12.0f, 12.0f); u[i] = frand(&seed, -2.0f, 2.0f); } 368 + oracle_swiglu(g, u, want, n); 369 + char name[64]; snprintf(name, sizeof name, "swiglu_%zu", n); 370 + Case c = { .name = strdup(name), .n = n }; 371 + c.rc = omega_gpu_swiglu_f32((uint32_t)n, g, u, got, &info); 372 + c.bad = compare(got, want, n, 1e-5, 1e-6, &c.worst); 373 + c.pass = c.rc == OMEGA_GPU_EW_OK && c.bad == 0; c.chip_ns = info.elapsed_ns; c.calls = info.chip_calls; c.unwritten = info.unwritten_words; 374 + omega_gpu_elementwise_test_set_mutant(OMEGA_GPU_EW_SWIGLU); 375 + double w2; c.mutant_rc = omega_gpu_swiglu_f32((uint32_t)n, g, u, got, &info); 376 + c.mutant_bad = compare(got, want, n, 1e-5, 1e-6, &w2); 377 + c.mutant_caught = c.mutant_rc != OMEGA_GPU_EW_OK || c.mutant_bad > 0; 378 + omega_gpu_elementwise_test_set_mutant(0); 379 + record(c, out); free(g); free(u); free(got); free(want); 380 + } } 381 + /* 6. stale-SM-instruction-cache guard (cut 1b finding, omega #256): 10 distinct kernels 382 + * (5 ops + 5 mutants) in rotation, two rounds. Every launch uploads code into a freshly 383 + * allocated page, so a kernel routinely lands on the code address its predecessor used, 384 + * and 10 keys evict the 8-slot kernel cache. Each clean launch must match the oracle and 385 + * each mutant must still be caught; a stale icache would make a mutant pass or a clean 386 + * kernel fail. Red was observed by cut 1b on matmul before its invalidate (receipt 387 + * FB1-CUT1B-`f629798`); this build carries the invalidate, so the case is a guard. */ 388 + { 389 + enum { RN = 256, RH = 4, RD = 64 }; 390 + float *x = malloc(RN * 4), *w = malloc(RN * 4), *u = malloc(RN * 4), *got = malloc(RN * 4), *want = malloc(RN * 4); 391 + float *ch = malloc(RD / 2 * 4), *sh = malloc(RD / 2 * 4); 392 + uint32_t *xu = malloc(RN * 4), *gu = malloc(RN * 4); 393 + for (size_t i = 0; i < RN; i++) { x[i] = frand(&seed, -3.0f, 3.0f); w[i] = frand(&seed, 0.5f, 1.5f); u[i] = frand(&seed, -2.0f, 2.0f); xu[i] = lcg(&seed); } 394 + oracle_rope_tables(RD, 17, 10000.0f, ch, sh); 395 + Case c = { .name = "icache_reuse_rotation", .n = 20 }; 396 + c.rc = OMEGA_GPU_EW_OK; c.mutant_rc = OMEGA_GPU_EW_OK; c.mutant_caught = 1; 397 + const int order[10] = { OMEGA_GPU_EW_EX2, -OMEGA_GPU_EW_SWIGLU, OMEGA_GPU_EW_XCHG, -OMEGA_GPU_EW_EX2, OMEGA_GPU_EW_RMSNORM, 398 + -OMEGA_GPU_EW_XCHG, OMEGA_GPU_EW_SWIGLU, -OMEGA_GPU_EW_ROPE, OMEGA_GPU_EW_ROPE, -OMEGA_GPU_EW_RMSNORM }; 399 + for (int step = 0; step < 20; step++) { 400 + int round = step / 10, k = step % 10; 401 + int mut = order[k] < 0, op = mut ? -order[k] : order[k]; 402 + omega_gpu_elementwise_test_set_mutant(mut ? op : 0); 403 + int rc; size_t bad = 0; double wst; 404 + switch (op) { 405 + case OMEGA_GPU_EW_EX2: 406 + for (size_t i = 0; i < RN; i++) want[i] = (float)exp2((double)x[i]); 407 + rc = omega_gpu_ex2_f32(RN, x, got, &info); bad = compare(got, want, RN, 1e-6, 0.0, &wst); break; 408 + case OMEGA_GPU_EW_XCHG: 409 + rc = omega_gpu_shared_xchg_u32(RN, xu, gu, &info); 410 + for (size_t i = 0; i < RN; i++) { if (gu[i] != xu[i ^ (OMEGA_GPU_EW_THREADS - 1)]) bad++; } 411 + break; 412 + case OMEGA_GPU_EW_RMSNORM: 413 + oracle_rmsnorm(x, w, 1e-5f, want, RN); 414 + rc = omega_gpu_rmsnorm_f32(1, RN, x, w, 1e-5f, got, &info); bad = compare(got, want, RN, 1e-5, 1e-6, &wst); break; 415 + case OMEGA_GPU_EW_ROPE: 416 + oracle_rope(x, RH, RD, ch, sh, want); 417 + rc = omega_gpu_rope_f32(RH, RD, x, ch, sh, got, &info); bad = compare(got, want, RH * RD, 0.0, 0.0, &wst); break; 418 + default: 419 + oracle_swiglu(x, u, want, RN); 420 + rc = omega_gpu_swiglu_f32(RN, x, u, got, &info); bad = compare(got, want, RN, 1e-5, 1e-6, &wst); break; 421 + } 422 + omega_gpu_elementwise_test_set_mutant(0); 423 + int ok = rc == OMEGA_GPU_EW_OK && bad == 0; 424 + if (!mut && !ok) { c.bad++; if (rc != OMEGA_GPU_EW_OK) c.rc = rc; printf(" rotation %d/%d: clean op %d FAILED rc=%s violations=%zu\n", round, k, op, omega_gpu_elementwise_rc_name(rc), bad); } 425 + if (mut && ok) { c.mutant_bad++; c.mutant_caught = 0; printf(" rotation %d/%d: mutant op %d NOT caught\n", round, k, op); } 426 + c.chip_ns += info.elapsed_ns; c.calls += info.chip_calls; c.unwritten += info.unwritten_words; 427 + } 428 + c.pass = c.bad == 0 && c.rc == OMEGA_GPU_EW_OK; 429 + record(c, out); 430 + free(x); free(w); free(u); free(got); free(want); free(ch); free(sh); free(xu); free(gu); 431 + } 432 + /* cut 4b: the whole battery (clean and mutant kernels, cache clears) ran on ONE device open */ 433 + CHECK(omega_gpu_session_open_count() == 1, "device opened once for the battery (opens=%u)", omega_gpu_session_open_count()); 434 + printf("device_opens=%u\n", omega_gpu_session_open_count()); 435 + if (out) { 436 + fprintf(out, "],\"device_opens\":%u,\"checks\":%d,\"failed\":%d,\"verdict\":\"%s\"}\n", omega_gpu_session_open_count(), g_checks, g_failed, g_failed == 0 ? "OMEGA_GPU_ELEMENTWISE_PASS" : "OMEGA_GPU_ELEMENTWISE_FAIL"); 437 + fclose(out); 438 + } 439 + return 0; 440 +} 441 + 442 +/* ------------------------------------------------------------ timing gate (cut 4b) */ 443 +/* The persistent device: 100 calls each of rmsnorm 1x2048 and swiglu 5632 (the TinyLlama 444 + * decode shapes), every call checked against the oracle, median wall time per call under 445 + * 0.5 ms (cut 4 opened and closed the device per call: ~40 ms). The device must have been 446 + * opened exactly once in this process. */ 447 +static int cmp_d(const void *a, const void *b) { double x = *(const double *)a, y = *(const double *)b; return x < y ? -1 : x > y; } 448 +static double now_ms(void) { struct timespec t; clock_gettime(CLOCK_MONOTONIC, &t); return t.tv_sec * 1e3 + t.tv_nsec / 1e6; } 449 +static int timing(const char *out_path) { 450 + FILE *out = out_path ? fopen(out_path, "w") : NULL; 451 + if (out_path && !out) { printf("cannot open %s\n", out_path); return 2; } 452 + if (out) fprintf(out, "{\"schema\":\"OMEGA_GPU_ELEMENTWISE_TIMING_V1\",\"gate_median_ms\":0.5,\"calls\":100,\"cases\":["); 453 + uint32_t seed = 0xfb1c004bu; 454 + enum { N = 100 }; 455 + for (int t = 0; t < 2; t++) { 456 + const char *name = t == 0 ? "rmsnorm_1x2048" : "swiglu_5632"; 457 + size_t n = t == 0 ? 2048 : 5632; 458 + float *a = malloc(n * 4), *b = malloc(n * 4), *got = malloc(n * 4), *want = malloc(n * 4); 459 + for (size_t i = 0; i < n; i++) { a[i] = frand(&seed, -3.0f, 3.0f); b[i] = t == 0 ? frand(&seed, 0.5f, 1.5f) : frand(&seed, -2.0f, 2.0f); } 460 + if (t == 0) oracle_rmsnorm(a, b, 1e-5f, want, n); else oracle_swiglu(a, b, want, n); 461 + double samples[N]; int ok_calls = 0; size_t bad_total = 0; double worst = 0; uint64_t chip_sum = 0; int rc_last = 0; 462 + OmegaGpuEwInfo info; 463 + /* warm-up: first call opens the device and generates the kernel (not timed) */ 464 + int rc0 = t == 0 ? omega_gpu_rmsnorm_f32(1, (uint32_t)n, a, b, 1e-5f, got, &info) : omega_gpu_swiglu_f32((uint32_t)n, a, b, got, &info); 465 + double first_ms = info.call_ns / 1e6; 466 + CHECK(rc0 == OMEGA_GPU_EW_OK, "%s first call rc=%s err=\"%s\"", name, omega_gpu_elementwise_rc_name(rc0), omega_gpu_elementwise_last_error()); 467 + for (int i = 0; i < N; i++) { 468 + double t0 = now_ms(); 469 + int rc = t == 0 ? omega_gpu_rmsnorm_f32(1, (uint32_t)n, a, b, 1e-5f, got, &info) : omega_gpu_swiglu_f32((uint32_t)n, a, b, got, &info); 470 + samples[i] = now_ms() - t0; 471 + double w; size_t bad = compare(got, want, n, 1e-5, 1e-6, &w); 472 + if (w > worst) worst = w; 473 + bad_total += bad; chip_sum += info.elapsed_ns; rc_last = rc; 474 + if (rc == OMEGA_GPU_EW_OK && bad == 0) ok_calls++; 475 + } 476 + qsort(samples, N, sizeof samples[0], cmp_d); 477 + double median = samples[N / 2], p90 = samples[N * 9 / 10], mn = samples[0], mx = samples[N - 1]; 478 + uint32_t opens = omega_gpu_session_open_count(); 479 + int pass = ok_calls == N && bad_total == 0 && median < 0.5 && opens == 1; 480 + CHECK(pass, "timing %s ok_calls=%d/%d violations=%zu median_ms=%.3f opens=%u last_rc=%s err=\"%s\"", name, ok_calls, N, bad_total, median, opens, omega_gpu_elementwise_rc_name(rc_last), omega_gpu_elementwise_last_error()); 481 + printf("%s timing %s first_call_ms=%.3f ok_calls=%d/%d violations=%zu worst_scaled_err=%g median_ms=%.3f p90_ms=%.3f min_ms=%.3f max_ms=%.3f chip_us_mean=%.1f device_opens=%u\n", 482 + pass ? "PASS" : "FAIL", name, first_ms, ok_calls, N, bad_total, worst, median, p90, mn, mx, chip_sum / 1e3 / N, opens); 483 + if (out) fprintf(out, "%s{\"case\":\"%s\",\"first_call_ms\":%.3f,\"ok_calls\":%d,\"violations\":%zu,\"worst_scaled_err\":%g,\"median_ms\":%.4f,\"p90_ms\":%.4f,\"min_ms\":%.4f,\"max_ms\":%.4f,\"chip_us_mean\":%.1f,\"device_opens\":%u,\"pass\":%s}", 484 + t ? "," : "", name, first_ms, ok_calls, bad_total, worst, median, p90, mn, mx, chip_sum / 1e3 / N, opens, pass ? "true" : "false"); 485 + free(a); free(b); free(got); free(want); 486 + } 487 + if (out) { fprintf(out, "],\"checks\":%d,\"failed\":%d,\"verdict\":\"%s\"}\n", g_checks, g_failed, g_failed == 0 ? "OMEGA_GPU_ELEMENTWISE_TIMING_PASS" : "OMEGA_GPU_ELEMENTWISE_TIMING_FAIL"); fclose(out); } 488 + return 0; 489 +} 490 + 491 +int main(int argc, char **argv) { 492 + const char *out_path = NULL; int host = 0, timing_mode = 0; 493 + for (int i = 1; i < argc; i++) { 494 + if (strcmp(argv[i], "--host-only") == 0) host = 1; 495 + else if (strcmp(argv[i], "--timing") == 0) timing_mode = 1; 496 + else if (strcmp(argv[i], "--out") == 0 && i + 1 < argc) out_path = argv[++i]; 497 + } 498 + if (host) host_only(); 499 + else if (timing_mode) { if (timing(out_path) != 0) return 2; } 500 + else if (chip(out_path) != 0) return 2; 501 + printf("%s: %d checks, %d failed\n", g_failed ? "FAIL" : "PASS", g_checks, g_failed); 502 + return g_failed ? 1 : 0; 503 +} evidence/GPU-MUFU-FTZ-`20261116`/omega_gpu_elementwise_api.c new file mode 100644 @@ -0,0 +1,1178 @@ 1 +/* SPDX-License-Identifier: Apache-2.0 2 + * Copyright 2026 Drake Stapleton (AIEN / aien-dev) 3 + * 4 + * Licensed under the Apache License, Version 2.0 (the "License"); 5 + * you may not use this file except in compliance with the License. 6 + * You may obtain a copy of the License at 7 + * 8 + * http://www.apache.org/licenses/LICENSE-2.0 9 + * 10 + * Unless required by applicable law or agreed to in writing, software 11 + * distributed under the License is distributed on an "AS IS" BASIS, 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 + * See the License for the specific language governing permissions and 14 + * limitations under the License. 15 + */ 16 + 17 +/* omega_gpu_elementwise_api.c: FB-1 cut 4 (2026-10-04). See the header. 18 + * 19 + * Layout of this file: (1) kernel codegen on top of the BlackwellIR, with a 20 + * small scheduler that writes every control word; (2) one launcher cloned from 21 + * the chip-proven tensor matmul path (omega_blackwell_execute_matmul_tensor); 22 + * (3) the public entry points, which split work into <= OMEGA_GPU_EW_MAX_CTAS 23 + * launches and run the host-side bookkeeping. 24 + * 25 + * Scheduling rules (chip-learned, src/omega_numeric.c omega_numeric_check_patch): 26 + * - a variable-latency result (LDG, LDS, LDC, LDCU, S2R, SHFL, MUFU) arrives through 27 + * a scoreboard; the producer stalls >= 2 and the consumer waits on that SB; 28 + * - a fixed-latency result (FADD FMUL FFMA IMAD IADD3 MOV LOP3 SHF) has no 29 + * scoreboard: the producer stalls >= 5 before its consumer (we use 6); 30 + * - a predicate producer (ISETP) stalls 14 before @P0 use (NAK SM120 padding); 31 + * - stores (STG, STS) set a read barrier so the next instruction cannot overwrite 32 + * the source register early. 33 + * The emitter below serialises: every instruction waits on everything still 34 + * pending. A final local pass tightens supported adjacent ALU pairs to 5 cycles. 35 + */ 36 +#include "omega_gpu_elementwise_api.h" 37 +#include "omega_blackwell_codegen.h" 38 +#include "omega_bw_reconv.h" 39 +#include "omega_blackwell_qmd.h" 40 +#include "omega_blackwell_submit.h" 41 +#include "omega_gpu_session.h" 42 +#include "sha256.h" 43 +#include 44 +#include 45 +#include 46 +#include 47 + 48 +/* ------------------------------------------------------------------ codegen */ 49 + 50 +#define CW(stall, wbar, rbar, wait) \ 51 + (((uint32_t)(stall) << 9) | ((uint32_t)(wbar) << 14) | ((uint32_t)(rbar) << 17) | ((uint32_t)(wait) << 20)) 52 +#define CW_YIELD 0x2000u 53 +#define SB_NONE 7u 54 +#define SB_GPR 0u /* variable-latency GPR results */ 55 +#define SB_RD 1u /* store source-register read barrier */ 56 +#define SB_UGPR 2u /* uniform-register results (LDCU) */ 57 + 58 +enum { K_FIXED, K_PRED, K_VAR, K_UVAR, K_STORE, K_SYNC, K_EXIT, K_BRA, K_BSSY, K_BSYNC }; 59 + 60 +#define EW_MAX_LOOPS 4 61 +typedef struct { 62 + BlackwellIRProgram *p; 63 + uint32_t pending; /* scoreboards set and not yet waited on */ 64 + int err; 65 + int loop_start[EW_MAX_LOOPS], loop_end[EW_MAX_LOOPS]; 66 + int n_loops; 67 + int open_start[EW_MAX_LOOPS]; /* starts of loops begun and not yet ended (nesting stack) */ 68 + int depth; 69 + BwRegions rg; /* structured reconvergence regions (omega #308) */ 70 + int rg_mutant; /* test only: 1 = drop the BSYNC at join, 2 = corrupt the BSSY target (host sim must catch both) */ 71 + int exited; /* a predicated EXIT was emitted: some lanes of a warp may be gone */ 72 + int exit_sync_ok; /* test only: lets a kernel put SHFL/BAR after a predicated EXIT (the negative control R6) */ 73 + int test_path; /* building for omega_gpu_elementwise_codegen_ir (host tests), never for a launch */ 74 +} Em; 75 + 76 +static void emit(Em *e, BlackwellIRInsn in, int kind) { 77 + uint32_t wait = e->pending; 78 + switch (kind) { 79 + case K_FIXED: in.control = CW(6, SB_NONE, SB_NONE, wait); e->pending = 0; break; 80 + case K_PRED: in.control = CW(14, SB_NONE, SB_NONE, wait); e->pending = 0; break; 81 + case K_VAR: in.control = CW(4, SB_GPR, SB_NONE, wait) | CW_YIELD; e->pending = 1u << SB_GPR; break; 82 + case K_UVAR: in.control = CW(4, SB_UGPR, SB_NONE, wait) | CW_YIELD; e->pending = 1u << SB_UGPR; break; 83 + case K_STORE: in.control = CW(4, SB_NONE, SB_RD, wait) | CW_YIELD; e->pending = 1u << SB_RD; break; 84 + case K_SYNC: in.control = CW(6, SB_NONE, SB_NONE, wait); e->pending = 0; break; 85 + /* a predicated EXIT or BRA that falls through must not be the only waiter */ 86 + case K_EXIT: in.control = CW(5, SB_NONE, SB_NONE, wait); e->pending = in.predicate_p0 ? wait : 0; break; 87 + case K_BRA: in.control = CW(5, SB_NONE, SB_NONE, wait); e->pending = in.predicate_p0 ? wait : 0; break; 88 + /* BSSY / BSYNC read no registers; the stall counts (1 and 5, both with yield) are the ones 89 + * nvcc 13.0.88 writes for sm_121 (docs/gpu-reconvergence-308.md). They wait on everything 90 + * pending so that, as for every branch here, nothing is in flight across a control edge 91 + * and the straight-line scoreboard walk in the tests stays valid. */ 92 + case K_BSSY: in.control = CW(1, SB_NONE, SB_NONE, wait) | CW_YIELD; e->pending = 0; break; 93 + case K_BSYNC: in.control = CW(5, SB_NONE, SB_NONE, wait) | CW_YIELD; e->pending = 0; break; 94 + default: e->err = -1; return; 95 + } 96 + if (omega_bw_ir_append(e->p, &in) < 0) e->err = -1; /* append returns the index */ 97 +} 98 + 99 +static int V(Em *e) { int v = omega_bw_ir_alloc_vreg(e->p); if (v < 0) e->err = -1; return v; } 100 +static int V64(Em *e) { int v = omega_bw_ir_alloc_vreg64(e->p); if (v < 0) e->err = -1; return v; } 101 +static int UV64(Em *e) { int v = omega_bw_ir_alloc_uvreg64(e->p); if (v < 0) e->err = -1; return v; } 102 +static int here(const Em *e) { return (int)e->p->count; } 103 + 104 +#define NOREG -1 105 +static BlackwellIRInsn I0(BlackwellIROpcode op) { 106 + BlackwellIRInsn in; memset(&in, 0, sizeof in); 107 + in.op = op; in.dst_vreg = NOREG; in.src1_vreg = NOREG; in.src2_vreg = NOREG; in.src3_vreg = NOREG; in.ureg = NOREG; 108 + return in; 109 +} 110 +static void ldcu64(Em *e, int udst, uint32_t off) { BlackwellIRInsn i = I0(BW_IR_LDCU64); i.dst_vreg = udst; i.imm = off; i.is_uniform = true; emit(e, i, K_UVAR); } 111 +static void ldc64(Em *e, int dst64, uint32_t off) { BlackwellIRInsn i = I0(BW_IR_LDC64); i.dst_vreg = dst64; i.imm = off; emit(e, i, K_VAR); } 112 +static void ldc32(Em *e, int dst, uint32_t off) { BlackwellIRInsn i = I0(BW_IR_LDC); i.dst_vreg = dst; i.imm = off; emit(e, i, K_VAR); } 113 +static void s2r(Em *e, int dst, uint32_t sr) { BlackwellIRInsn i = I0(BW_IR_S2R); i.dst_vreg = dst; i.imm = sr; emit(e, i, K_VAR); } 114 +static void movi(Em *e, int dst, uint32_t imm) { BlackwellIRInsn i = I0(BW_IR_MOV_IMM); i.dst_vreg = dst; i.imm = imm; emit(e, i, K_FIXED); } 115 +static void movf(Em *e, int dst, float f) { uint32_t u; memcpy(&u, &f, 4); movi(e, dst, u); } 116 +static void movrz(Em *e, int dst) { BlackwellIRInsn i = I0(BW_IR_MOV_RZ); i.dst_vreg = dst; emit(e, i, K_FIXED); } 117 +/* dst = a * imm + c (c may be NOREG for RZ) */ 118 +static void imadi(Em *e, int dst, int a, uint32_t imm, int c) { BlackwellIRInsn i = I0(BW_IR_IMAD); i.dst_vreg = dst; i.src1_vreg = a; i.imm = imm; i.src3_vreg = c; emit(e, i, K_FIXED); } 119 +/* dst = a * b + c (registers) */ 120 +static void imadr(Em *e, int dst, int a, int b, int c) { BlackwellIRInsn i = I0(BW_IR_IMAD); i.dst_vreg = dst; i.src1_vreg = a; i.src2_vreg = b; i.src3_vreg = c; emit(e, i, K_FIXED); } 121 +static void iadd3(Em *e, int dst, int a, int b) { BlackwellIRInsn i = I0(BW_IR_IADD3); i.dst_vreg = dst; i.src1_vreg = a; i.src2_vreg = b; emit(e, i, K_FIXED); } 122 +static void lop3xor(Em *e, int dst, int a, int b) { BlackwellIRInsn i = I0(BW_IR_LOP3_XOR); i.dst_vreg = dst; i.src1_vreg = a; i.src2_vreg = b; emit(e, i, K_FIXED); } 123 +/* dst64 = idx * 4 + ptr64 (byte address of element idx) */ 124 +static void addr4(Em *e, int dst64, int idx, int ptr64) { BlackwellIRInsn i = I0(BW_IR_IMAD_WIDE); i.dst_vreg = dst64; i.src1_vreg = idx; i.imm = 4; i.src3_vreg = ptr64; emit(e, i, K_FIXED); } 125 +static void ldg(Em *e, int dst, int addr64, int udesc) { BlackwellIRInsn i = I0(BW_IR_LDG_E); i.dst_vreg = dst; i.src1_vreg = addr64; i.ureg = udesc; emit(e, i, K_VAR); } 126 +/* Independent loads (LDG_E from global, or LDS32 from shared memory with ureg NOREG) issued 127 + * back to back (campaign C2a, 2026-10-05). The first load 128 + * waits on whatever is pending; the others wait on nothing, so all n are in flight together. 129 + * Every load sets SB_GPR (a counting scoreboard), so the next instruction waits once for all 130 + * of them instead of once per load. Fails the build if a load address is a destination of the 131 + * group or a destination repeats (the later loads would read an operand still in flight). */ 132 +static void ld_group(Em *e, BlackwellIROpcode op, int n, const int *dst, const int *addr, int ureg) { 133 + for (int i = 0; i < n; i++) 134 + for (int k = 0; k < n; k++) 135 + if (addr[i] == dst[k] || (k != i && dst[i] == dst[k])) { e->err = -1; return; } 136 + for (int i = 0; i < n; i++) { 137 + if (op != BW_IR_LDG_E && op != BW_IR_LDS32) { e->err = -1; return; } 138 + BlackwellIRInsn in = I0(op); in.dst_vreg = dst[i]; in.src1_vreg = addr[i]; in.ureg = ureg; 139 + if (i == 0) { emit(e, in, K_VAR); continue; } 140 + in.control = CW(4, SB_GPR, SB_NONE, 0) | CW_YIELD; /* nonzero, so the encoder keeps it */ 141 + if (omega_bw_ir_append(e->p, &in) < 0) e->err = -1; 142 + } 143 +} 144 +static void stg(Em *e, int addr64, int val, int udesc) { BlackwellIRInsn i = I0(BW_IR_STG_E); i.src1_vreg = addr64; i.src2_vreg = val; i.ureg = udesc; emit(e, i, K_STORE); } 145 +static void fadd(Em *e, int d, int a, int b) { BlackwellIRInsn i = I0(BW_IR_FADD); i.dst_vreg = d; i.src1_vreg = a; i.src2_vreg = b; emit(e, i, K_FIXED); } 146 +static void fsub(Em *e, int d, int a, int b) { BlackwellIRInsn i = I0(BW_IR_FSUB); i.dst_vreg = d; i.src1_vreg = a; i.src2_vreg = b; emit(e, i, K_FIXED); } 147 +static void fmul(Em *e, int d, int a, int b) { BlackwellIRInsn i = I0(BW_IR_FMUL); i.dst_vreg = d; i.src1_vreg = a; i.src2_vreg = b; emit(e, i, K_FIXED); } 148 +static void ffma(Em *e, int d, int a, int b, int c) { BlackwellIRInsn i = I0(BW_IR_FFMA); i.dst_vreg = d; i.src1_vreg = a; i.src2_vreg = b; i.src3_vreg = c; emit(e, i, K_FIXED); } 149 +static void mufu(Em *e, BlackwellIROpcode op, int d, int a) { BlackwellIRInsn i = I0(op); i.dst_vreg = d; i.src1_vreg = a; emit(e, i, K_VAR); } 150 +/* Cross-lane and warp-ending ops are refused inside an open reconvergence region (omega #308): 151 + * a SHFL or BAR.SYNC reached by a split warp reads inactive lanes / counts a partial warp 152 + * (undefined; the 2026-10-04 attention bug), and a lane that EXITs inside a region can no 153 + * longer be joined. The build fails closed instead of emitting such code. */ 154 +/* Cross-lane instructions (SHFL, BAR.SYNC) need the whole warp present. The emitter refuses 155 + * them (fails the build) inside an open reconvergence region, where lanes may be on different 156 + * paths, and after a predicated EXIT, where lanes may be gone for good: a SHFL then reads 157 + * inactive lanes (undefined on the chip, the attention failure of 2026-10-04). A kernel that 158 + * must drop lanes before a cross-lane step clamps them instead and exits them afterwards. */ 159 +static int warp_split(Em *e) { if (e->rg.depth > 0 || (e->exited && !e->exit_sync_ok)) { e->err = -1; return 1; } return 0; } 160 +static void shfl_down(Em *e, int d, int a, uint32_t off) { if (warp_split(e)) return; BlackwellIRInsn i = I0(BW_IR_SHFL_DOWN); i.dst_vreg = d; i.src1_vreg = a; i.imm = off; emit(e, i, K_VAR); } 161 +static void sts32(Em *e, int addr, int val) { BlackwellIRInsn i = I0(BW_IR_STS32); i.src1_vreg = addr; i.src2_vreg = val; emit(e, i, K_STORE); } 162 +static void lds32(Em *e, int d, int addr) { BlackwellIRInsn i = I0(BW_IR_LDS32); i.dst_vreg = d; i.src1_vreg = addr; emit(e, i, K_VAR); } 163 +static void bar_sync(Em *e) { if (warp_split(e)) return; emit(e, I0(BW_IR_BAR_SYNC), K_SYNC); } 164 +static void isetp_ge_u32(Em *e, int a, int b) { BlackwellIRInsn i = I0(BW_IR_ISETP_GE_U32); i.src1_vreg = a; i.src2_vreg = b; emit(e, i, K_PRED); } 165 +/* An EXIT inside a region would leave the barrier waiting for a lane that never comes: refused. */ 166 +static void exit_if_p0(Em *e) { if (e->rg.depth > 0) { e->err = -1; return; } e->exited = 1; BlackwellIRInsn i = I0(BW_IR_EXIT); i.predicate_p0 = true; emit(e, i, K_EXIT); } 167 +static void bra_back_if_not_p0(Em *e, int target) { BlackwellIRInsn i = I0(BW_IR_BRA); i.predicate_p0 = true; i.predicate_not = true; i.imm = (uint32_t)(target - here(e)); emit(e, i, K_BRA); } 168 +static void tail(Em *e) { 169 + emit(e, I0(BW_IR_EXIT), K_EXIT); 170 + BlackwellIRInsn self = I0(BW_IR_BRA); /* the self-branch every kernel here ends with */ 171 + self.control = 0x000fc000u; 172 + if (omega_bw_ir_append(e->p, &self) < 0) e->err = -1; 173 +} 174 +/* Loops may nest (prime race cut): begin pushes the start, end pops it, so the inner 175 + * loop is closed (and its liveness fixed) first. For the single-level loops above this 176 + * is exactly the old behaviour. */ 177 +static void loop_begin(Em *e) { if (e->depth >= EW_MAX_LOOPS) { e->err = -1; return; } e->open_start[e->depth++] = here(e); } 178 +/* Closing a loop: every value defined before the loop and read inside it stays 179 + * live until the back-branch, otherwise the linear-scan allocator (which knows 180 + * nothing about back-edges) would hand its register to a body temporary whose 181 + * first definition comes after the value's last textual use (e.g. the scale y 182 + * in rmsnorm pass 2), and the next iteration would read garbage. */ 183 +static void loop_end(Em *e) { 184 + if (e->n_loops >= EW_MAX_LOOPS || e->depth <= 0) { e->err = -1; return; } 185 + int start = e->open_start[--e->depth], end = here(e) - 1; 186 + e->loop_start[e->n_loops] = start; 187 + e->loop_end[e->n_loops] = end; 188 + e->n_loops++; 189 + OmegaRegAlloc *ra = &e->p->regalloc; 190 + for (int v = 0; v < ra->num_vregs; v++) { 191 + OmegaLiveInterval *iv = &ra->intervals[v]; 192 + if (iv->first_def >= 0 && iv->first_def < start && iv->last_use >= start && iv->last_use < end) iv->last_use = end; 193 + } 194 +} 195 + 196 +/* Kernel argument words (constant bank 0, same slots as the matmul path): 197 + * 0x380 a, 0x388 b, 0x390 c (64-bit each), then four 32-bit parameters. */ 198 +#define ARG_A 0x380u 199 +#define ARG_B 0x388u 200 +#define ARG_C 0x390u 201 +#define ARG_P0 0x398u 202 +#define ARG_P1 0x39cu 203 +#define ARG_P2 0x3a0u 204 +#define ARG_P3 0x3a4u 205 +#define ARG_P4 0x3a8u 206 +#define DESC_OFF 0x358u 207 + 208 +typedef struct { int udesc, pa, pb, pc, tid, cta; } Pro; 209 +static Pro prologue(Em *e) { 210 + Pro r; 211 + r.udesc = UV64(e); r.pa = V64(e); r.pb = V64(e); r.pc = V64(e); r.tid = V(e); r.cta = V(e); 212 + ldcu64(e, r.udesc, DESC_OFF); 213 + ldc64(e, r.pa, ARG_A); ldc64(e, r.pb, ARG_B); ldc64(e, r.pc, ARG_C); 214 + s2r(e, r.tid, BW_SR_TID_X); s2r(e, r.cta, BW_SR_CTAID_X); 215 + return r; 216 +} 217 + 218 +/* out[i] = 2^a[i] for i < n (n = P0). Threads 128, grid ceil(n/128). Mutant: 2^(a+1). */ 219 +static void gen_ex2(Em *e, int mutant) { 220 + Pro p = prologue(e); 221 + int n = V(e), i = V(e), off = V64(e), x = V(e), y = V(e); 222 + ldc32(e, n, ARG_P0); 223 + imadi(e, i, p.cta, OMEGA_GPU_EW_THREADS, p.tid); 224 + isetp_ge_u32(e, i, n); 225 + exit_if_p0(e); 226 + addr4(e, off, i, p.pa); 227 + ldg(e, x, off, p.udesc); 228 + if (mutant) { int one = V(e); movf(e, one, 1.0f); fadd(e, x, x, one); } 229 + mufu(e, BW_IR_MUFU_EX2, y, x); 230 + addr4(e, off, i, p.pc); 231 + stg(e, off, y, p.udesc); 232 + tail(e); 233 +} 234 + 235 +/* out[i] = MUFU.RSQ(a[i]) for i < n (n = P0), the bare unit with no Newton step, so its flush rule shows 236 + * (omega #462). Threads 128, grid ceil(n/128). Mutant: rsq(4a), half the result. */ 237 +static void gen_rsq(Em *e, int mutant) { 238 + Pro p = prologue(e); 239 + int n = V(e), i = V(e), off = V64(e), x = V(e), y = V(e); 240 + ldc32(e, n, ARG_P0); 241 + imadi(e, i, p.cta, OMEGA_GPU_EW_THREADS, p.tid); 242 + isetp_ge_u32(e, i, n); 243 + exit_if_p0(e); 244 + addr4(e, off, i, p.pa); 245 + ldg(e, x, off, p.udesc); 246 + if (mutant) { int four = V(e); movf(e, four, 4.0f); fmul(e, x, x, four); } 247 + mufu(e, BW_IR_MUFU_RSQ, y, x); 248 + addr4(e, off, i, p.pc); 249 + stg(e, off, y, p.udesc); 250 + tail(e); 251 +} 252 + 253 +/* out[i] = a[i ^ 127] within each CTA of 128 (n % 128 == 0). STS own word, BAR.SYNC, 254 + * LDS the partner word. Mutant: LDS own word (no exchange). */ 255 +static void gen_xchg(Em *e, int mutant) { 256 + Pro p = prologue(e); 257 + int i = V(e), off = V64(e), x = V(e), saddr = V(e), paddr = V(e), mask = V(e), y = V(e); 258 + imadi(e, i, p.cta, OMEGA_GPU_EW_THREADS, p.tid); 259 + addr4(e, off, i, p.pa); 260 + ldg(e, x, off, p.udesc); 261 + imadi(e, saddr, p.tid, 4, NOREG); 262 + sts32(e, saddr, x); 263 + bar_sync(e); 264 + if (mutant) { 265 + lds32(e, y, saddr); 266 + } else { 267 + movi(e, mask, OMEGA_GPU_EW_THREADS - 1); 268 + lop3xor(e, paddr, p.tid, mask); 269 + imadi(e, paddr, paddr, 4, NOREG); 270 + lds32(e, y, paddr); 271 + } 272 + addr4(e, off, i, p.pc); 273 + stg(e, off, y, p.udesc); 274 + tail(e); 275 +} 276 + 277 +/* One CTA of 128 threads per row. P0 = dim/128 (loop count), P1 = bits(1/dim), 278 + * P2 = bits(eps), P3 = dim. Mutant: the warp tree drops the last SHFL step. */ 279 +static void gen_rmsnorm(Em *e, int mutant) { 280 + Pro p = prologue(e); 281 + int nk = V(e), invd = V(e), eps = V(e), dim = V(e); 282 + int rowbase = V(e), idx = V(e), col = V(e), k = V(e), acc = V(e), cT = V(e), c1 = V(e); 283 + int off = V64(e), x = V(e), t = V(e); 284 + ldc32(e, nk, ARG_P0); ldc32(e, invd, ARG_P1); ldc32(e, eps, ARG_P2); ldc32(e, dim, ARG_P3); 285 + imadr(e, rowbase, p.cta, dim, NOREG); 286 + iadd3(e, idx, rowbase, p.tid); 287 + movrz(e, acc); movrz(e, k); 288 + movi(e, cT, OMEGA_GPU_EW_THREADS); movi(e, c1, 1); 289 + loop_begin(e); 290 + int l1 = here(e); 291 + addr4(e, off, idx, p.pa); 292 + ldg(e, x, off, p.udesc); 293 + ffma(e, acc, x, x, acc); 294 + iadd3(e, idx, idx, cT); 295 + iadd3(e, k, k, c1); 296 + isetp_ge_u32(e, k, nk); 297 + bra_back_if_not_p0(e, l1); 298 + loop_end(e); 299 + static const uint32_t steps[5] = { 16, 8, 4, 2, 1 }; 300 + for (int s = 0; s < (mutant ? 4 : 5); s++) { shfl_down(e, t, acc, steps[s]); fadd(e, acc, acc, t); } 301 + int saddr = V(e); 302 + imadi(e, saddr, p.tid, 4, NOREG); 303 + sts32(e, saddr, acc); 304 + bar_sync(e); 305 + int a0 = V(e), a1 = V(e), a2 = V(e), a3 = V(e), s0 = V(e), s1 = V(e), s2 = V(e), s3 = V(e), sum = V(e); 306 + movrz(e, a0); movi(e, a1, 128); movi(e, a2, 256); movi(e, a3, 384); 307 + lds32(e, s0, a0); lds32(e, s1, a1); lds32(e, s2, a2); lds32(e, s3, a3); 308 + fadd(e, sum, s0, s1); fadd(e, sum, sum, s2); fadd(e, sum, sum, s3); 309 + int v = V(e), y = V(e), u = V(e), cmh = V(e), c15 = V(e); 310 + fmul(e, v, sum, invd); 311 + fadd(e, v, v, eps); 312 + mufu(e, BW_IR_MUFU_RSQ, y, v); 313 + movf(e, cmh, -0.5f); movf(e, c15, 1.5f); 314 + fmul(e, u, v, y); fmul(e, u, u, y); ffma(e, u, u, cmh, c15); fmul(e, y, y, u); 315 + int offw = V64(e), offc = V64(e), w = V(e), o = V(e); 316 + iadd3(e, idx, rowbase, p.tid); 317 + imadi(e, col, p.tid, 1, NOREG); /* col = tid (the encoder maps a missing src2 to R0, not RZ, so no IADD3 here) */ 318 + movrz(e, k); 319 + loop_begin(e); 320 + int l2 = here(e); 321 + addr4(e, off, idx, p.pa); 322 + ldg(e, x, off, p.udesc); 323 + addr4(e, offw, col, p.pb); 324 + ldg(e, w, offw, p.udesc); 325 + fmul(e, o, x, y); 326 + fmul(e, o, o, w); 327 + addr4(e, offc, idx, p.pc); 328 + stg(e, offc, o, p.udesc); 329 + iadd3(e, idx, idx, cT); 330 + iadd3(e, col, col, cT); 331 + iadd3(e, k, k, c1); 332 + isetp_ge_u32(e, k, nk); 333 + bra_back_if_not_p0(e, l2); 334 + loop_end(e); 335 + tail(e); 336 +} 337 + 338 +/* One CTA of head_dim/2 threads per head. P0 = head_dim, P1 = head_dim/2. 339 + * a = vector, b = table (cos in the first half of each head, sin in the second). 340 + * Mutant: out0 = q0*cos + q1*sin. */ 341 +static void gen_rope(Em *e, int mutant) { 342 + Pro p = prologue(e); 343 + int hd = V(e), half = V(e), i0 = V(e), i1 = V(e), off0 = V64(e), off1 = V64(e); 344 + int q0 = V(e), q1 = V(e), c = V(e), s = V(e), t0 = V(e), t1 = V(e), o0 = V(e), o1 = V(e); 345 + ldc32(e, hd, ARG_P0); ldc32(e, half, ARG_P1); 346 + imadr(e, i0, p.cta, hd, p.tid); 347 + iadd3(e, i1, i0, half); 348 + addr4(e, off0, i0, p.pa); ldg(e, q0, off0, p.udesc); 349 + addr4(e, off1, i1, p.pa); ldg(e, q1, off1, p.udesc); 350 + addr4(e, off0, i0, p.pb); ldg(e, c, off0, p.udesc); 351 + addr4(e, off1, i1, p.pb); ldg(e, s, off1, p.udesc); 352 + fmul(e, t0, q0, c); fmul(e, t1, q1, s); 353 + if (mutant) fadd(e, o0, t0, t1); else fsub(e, o0, t0, t1); 354 + fmul(e, t0, q0, s); fmul(e, t1, q1, c); 355 + fadd(e, o1, t0, t1); 356 + addr4(e, off0, i0, p.pc); stg(e, off0, o0, p.udesc); 357 + addr4(e, off1, i1, p.pc); stg(e, off1, o1, p.udesc); 358 + tail(e); 359 +} 360 + 361 +/* out[i] = g/(1+2^(g*-log2e)) * up for i < n (P0). Mutant: 2^(g*+log2e). */ 362 +static void gen_swiglu(Em *e, int mutant) { 363 + Pro p = prologue(e); 364 + int n = V(e), i = V(e), off = V64(e), g = V(e), u = V(e), k = V(e), t = V(e), ex = V(e), d = V(e), r = V(e), one = V(e), o = V(e); 365 + ldc32(e, n, ARG_P0); 366 + imadi(e, i, p.cta, OMEGA_GPU_EW_THREADS, p.tid); 367 + isetp_ge_u32(e, i, n); 368 + exit_if_p0(e); 369 + addr4(e, off, i, p.pa); ldg(e, g, off, p.udesc); 370 + addr4(e, off, i, p.pb); ldg(e, u, off, p.udesc); 371 + movf(e, k, mutant ? 1.`4426950408889634f` : -1.`4426950408889634f`); 372 + movf(e, one, 1.0f); 373 + fmul(e, t, g, k); 374 + mufu(e, BW_IR_MUFU_EX2, ex, t); 375 + fadd(e, d, ex, one); 376 + mufu(e, BW_IR_MUFU_RCP, r, d); 377 + fmul(e, o, g, r); 378 + fmul(e, o, o, u); 379 + addr4(e, off, i, p.pc); 380 + stg(e, off, o, p.udesc); 381 + tail(e); 382 +} 383 + 384 +/* ------------------------------------------- prime race sieve (2026-10-05) */ 385 +static void lop3lut(Em *e, int d, int a, int b, int c, uint32_t lut) { BlackwellIRInsn i = I0(BW_IR_LOP3_LUT); i.dst_vreg = d; i.src1_vreg = a; i.src2_vreg = b; i.src3_vreg = c; i.imm = lut & 0xffu; emit(e, i, K_FIXED); } 386 +static void shl_r(Em *e, int d, int a, int n) { BlackwellIRInsn i = I0(BW_IR_SHF_L_U32); i.dst_vreg = d; i.src1_vreg = a; i.src2_vreg = n; emit(e, i, K_FIXED); } 387 +static void shr_i(Em *e, int d, int a, uint32_t n) { BlackwellIRInsn i = I0(BW_IR_SHF_R); i.dst_vreg = d; i.src1_vreg = a; i.imm = n; emit(e, i, K_FIXED); } 388 +static void imadhi(Em *e, int d, int a, int b) { BlackwellIRInsn i = I0(BW_IR_IMAD_HI_U32); i.dst_vreg = d; i.src1_vreg = a; i.src2_vreg = b; emit(e, i, K_FIXED); } 389 +/* dst64 = a * imm + c64 (IMAD.WIDE.U32 immediate form) */ 390 +static void widei(Em *e, int dst64, int a, uint32_t imm, int c64) { BlackwellIRInsn i = I0(BW_IR_IMAD_WIDE); i.dst_vreg = dst64; i.src1_vreg = a; i.imm = imm; i.src3_vreg = c64; emit(e, i, K_FIXED); } 391 +/* @P0 BRA forward; returns the instruction index for bra_patch_here */ 392 +static int bra_fwd_if_p0(Em *e) { int at = here(e); BlackwellIRInsn i = I0(BW_IR_BRA); i.predicate_p0 = true; i.imm = 1; emit(e, i, K_BRA); return at; } 393 +static void bra_patch_here(Em *e, int at) { if (e->err == 0 && at >= 0 && at < here(e)) e->p->insns[at].imm = (uint32_t)(here(e) - at); else e->err = -1; } 394 +static void bra_always(Em *e, int target) { BlackwellIRInsn i = I0(BW_IR_BRA); i.imm = (uint32_t)(target - here(e)); emit(e, i, K_BRA); } 395 + 396 +/* ---- structured reconvergence regions (omega #308; bookkeeping in omega_bw_reconv.h) ---- 397 + * region_begin: BSSY Bd (d = nesting depth), fails closed when no barrier register is left. 398 + * region_exit: a forward branch out of the innermost region, patched to its BSYNC at join 399 + * (RX_ALWAYS, RX_IF_P0, RX_IF_NOT_P0). 400 + * region_join: BSYNC Bd; patches the BSSY to the instruction after it and every exit to it. 401 + * Usage: divergent loop = region_begin; L: isetp; region_exit(RX_IF_P0); body; bra_always(L); region_join. 402 + * if/else diamond = region_begin; isetp; t = bra_fwd_if_p0; then; region_exit(RX_ALWAYS); 403 + * bra_patch_here(t); else; region_join. */ 404 +enum { RX_ALWAYS, RX_IF_P0, RX_IF_NOT_P0 }; 405 +static int region_begin(Em *e) { 406 + int bar = bw_regions_next_bar(&e->rg); 407 + if (bar < 0) { e->err = -1; return -1; } 408 + int at = here(e); 409 + BlackwellIRInsn i = I0(BW_IR_BSSY); i.bar_reg = (uint8_t)bar; i.imm = 2; emit(e, i, K_BSSY); 410 + if (bw_regions_begin(&e->rg, at) < 0) e->err = -1; 411 + return bar; 412 +} 413 +static void region_exit(Em *e, int cond) { 414 + int at = here(e); 415 + BlackwellIRInsn i = I0(BW_IR_BRA); i.imm = 1; 416 + if (cond != RX_ALWAYS) { i.predicate_p0 = true; i.predicate_not = (cond == RX_IF_NOT_P0); } 417 + emit(e, i, K_BRA); 418 + if (bw_regions_exit(&e->rg, at) < 0) e->err = -1; 419 +} 420 +static void region_join(Em *e) { 421 + if (e->rg.depth <= 0) { e->err = -1; return; } 422 + int d = e->rg.depth - 1, bsync = here(e); 423 + BlackwellIRInsn i = I0(e->rg_mutant == 1 ? BW_IR_NOP : BW_IR_BSYNC); i.bar_reg = (uint8_t)d; emit(e, i, K_BSYNC); 424 + if (e->rg_mutant == 1) { 425 + /* negative control (host sim only): the join is a NOP; patch as the real join would */ 426 + BwRegions *r = &e->rg; r->depth--; 427 + e->p->insns[r->bssy_at[d]].imm = (uint32_t)(bsync + 1 - r->bssy_at[d]); 428 + for (int k = 0; k < r->n_exits[d]; k++) e->p->insns[r->exits[d][k]].imm = (uint32_t)(bsync - r->exits[d][k]); 429 + return; 430 + } 431 + if (bw_regions_join(&e->rg, e->p, bsync) != d) e->err = -1; 432 + if (e->rg_mutant == 2) e->p->insns[e->rg.bssy_at[d]].imm += 1; /* negative control: BSSY names the wrong join */ 433 +} 434 + 435 +/* Word-parallel odd-only sieve (docs: handoff 2026-10-05 DESIGN "GPU kernel (native)"). 436 + * Thread t owns 32-bit output words w = t, t + S, t + 2S, ... (S = P1 = threads launched; 437 + * the I42 envelope caps a launch at OMEGA_GPU_EW_MAX_CTAS CTAs, so a grid-stride loop 438 + * replaces one thread per word). Every word has exactly one writer; no atomics. 439 + * Bit j of word w is the odd number 2(32w + j) + 1. 440 + * Arguments: a (0x380) = prime table, entries {p, magic = ceil(2^32 / p), k0 = (p*p - 1)/2} 441 + * (12 bytes, ascending p, odd primes <= isqrt(limit)) followed by ONE sentinel entry with 442 + * k0 = 0xffffffff that ends every scan; c (0x390) = output words; 443 + * P0 = nwords, P1 = S, P2 = last word index, P3 = ~tailmask (bits past the last odd). 444 + * Range: limit < 2^32 (so base, k0 < 2^31 and the sign-bit tricks below hold). 445 + * Per word: base = 32w; for each prime while k0 < base + 32: 446 + * d = base - k0; neg = d >> 31 (k0 > base); dpos = neg ? 0 : d; jadd = neg ? k0 - base : 0 447 + * q = hi32(dpos * magic) (= floor(dpos/p) or one more: magic is rounded up) 448 + * r = dpos - q*p (q one too big -> r = (dpos mod p) - p, wrapped) 449 + * j = p - r; j -= p * ((r - 1) >> 31) (r == 0 -> 0; wrapped r -> p - (dpos mod p)) 450 + * One fix covers both cases: with q one too big, dpos mod p >= p - dpos*e/2^32 > p/2 > 0 451 + * (e = magic*p - 2^32 < p, dpos < 2^31), so the true remainder is never 0 there and 452 + * p - r - p = p - (dpos mod p) is the right offset. A separate "r += p if wrapped" step was 453 + * removed after a negative control showed it changes no output (host sim, limit 1e7, where 454 + * the overshoot occurs 268 times; bench/prime_race/tests magic_model). 455 + * j += jadd; while j < 32 { acc |= 1 << j; j += p } 456 + * then acc |= (w == 0) (the number 1), word = ~(acc | (w == last ? ~tailmask : 0)). 457 + * Branch-free except the loop branches. Mutant: drops the j fix (j = p - r unreduced), so words where 458 + * base - k0 is a multiple of p (or q overshot) mark the wrong bits. 459 + * 460 + * staged = 1 (OMEGA_GPU_EW_PRIME_SIEVE_SHARED, campaign C3): P4 = table words, sentinel included 461 + * (3 per entry). The CTA first copies the table into shared memory at offset 0 (thread t copies 462 + * words t, t + 128, ...), BAR_SYNC, then the prime loop reads shared memory (LDS) instead of 463 + * uncached global memory. Every thread reaches the barrier: the w >= nwords exit comes after 464 + * it. The launch must declare at least 4 * P4 bytes of shared memory. 465 + * 466 + * divergent (omega #308, regression R1): 0 = the warp-uniform mark loop above (campaign C5). 467 + * 1 = the original lane-dependent mark loop (omega `888a011`: `while j < 32 { acc |= 1 << j; j += p }`) 468 + * wrapped in a reconvergence region. 2 = as 1, and the prime loop (whose break `k0 >= base + 32` 469 + * is also lane-dependent: every lane sieves a different word) wrapped in an outer region, so the 470 + * mark loop's region nests inside it (B0 outer, B1 inner). */ 471 +static void gen_prime_sieve(Em *e, int mutant, int staged, int divergent) { 472 + Pro pr = prologue(e); 473 + int nwords = V(e), stride = V(e), lastw = V(e), tailinv = V(e); 474 + int one = V(e), c32 = V(e), cm1 = V(e), w = V(e); 475 + ldc32(e, nwords, ARG_P0); ldc32(e, stride, ARG_P1); ldc32(e, lastw, ARG_P2); ldc32(e, tailinv, ARG_P3); 476 + movi(e, one, 1); movi(e, c32, 32); movi(e, cm1, 0xffffffffu); 477 + int c4 = -1, c8 = -1, c12 = -1; 478 + if (staged) { 479 + int twords = V(e), i = V(e), ga = V64(e), val = V(e), sa = V(e); 480 + c4 = V(e); c8 = V(e); c12 = V(e); 481 + ldc32(e, twords, ARG_P4); 482 + movi(e, c4, 4); movi(e, c8, 8); movi(e, c12, 12); 483 + imadi(e, i, pr.tid, 1, NOREG); 484 + /* The staging loop's trip count differs per thread (thread t copies words t, t+128, ...), 485 + * so its exit splits the warp. The divergent variants rejoin the warp before BAR.SYNC 486 + * (a barrier is not a reconvergence point: the fragments would stay split for the rest 487 + * of the kernel). The production kernel keeps the 2026-10-05 C3 form unchanged. */ 488 + if (divergent) region_begin(e); 489 + loop_begin(e); /* staging loop */ 490 + int ls = here(e); 491 + isetp_ge_u32(e, i, twords); 492 + int sdone = -1; 493 + if (divergent) region_exit(e, RX_IF_P0); else sdone = bra_fwd_if_p0(e); 494 + addr4(e, ga, i, pr.pa); 495 + ldg(e, val, ga, pr.udesc); 496 + imadi(e, sa, i, 4, NOREG); 497 + sts32(e, sa, val); 498 + imadi(e, i, one, OMEGA_GPU_EW_THREADS, i); 499 + bra_always(e, ls); 500 + loop_end(e); 501 + if (divergent) region_join(e); else bra_patch_here(e, sdone); 502 + bar_sync(e); 503 + } 504 + imadi(e, w, pr.cta, OMEGA_GPU_EW_THREADS, pr.tid); 505 + isetp_ge_u32(e, w, nwords); 506 + exit_if_p0(e); 507 + 508 + /* ptr, a64, a64m: global addresses, or (staged) 32-bit shared offsets */ 509 + int base = V(e), basep32 = V(e), acc = V(e); 510 + int ptr = staged ? V(e) : V64(e), a64 = staged ? V(e) : V64(e), a64m = staged ? V(e) : V64(e); 511 + int p = V(e), magic = V(e), k0 = V(e), negp = V(e), d = V(e), neg = V(e), nd = V(e), dpos = V(e), jadd = V(e); 512 + int q = V(e), r = V(e), j = V(e), t = V(e), z = V(e), bit = V(e); 513 + int e1 = V(e), m = V(e), word = V(e), oaddr = V64(e); 514 + int tt = V(e), jj = V(e), sh = V(e), c31 = V(e), cm32 = V(e); 515 + movi(e, c31, 31); movi(e, cm32, 0xffffffe0u); 516 + 517 + loop_begin(e); /* word loop */ 518 + int lw = here(e); 519 + imadi(e, base, w, 32, NOREG); 520 + iadd3(e, basep32, base, c32); 521 + movrz(e, acc); 522 + if (staged) movrz(e, ptr); else widei(e, ptr, one, 0, pr.pa); 523 + 524 + if (divergent >= 2) region_begin(e); /* outer region: the prime loop's break is lane-dependent */ 525 + loop_begin(e); /* prime loop */ 526 + int lp = here(e); 527 + /* one memory round trip per prime: all three entry words load together (C2a). The 528 + * sentinel entry is a whole entry, so loading p and magic before the k0 test is in bounds. */ 529 + if (staged) { iadd3(e, a64, ptr, c8); iadd3(e, a64m, ptr, c4); } 530 + else { widei(e, a64, one, 8, ptr); widei(e, a64m, one, 4, ptr); } 531 + { 532 + const int dsts[3] = { k0, p, magic }, adrs[3] = { a64, ptr, a64m }; 533 + if (staged) ld_group(e, BW_IR_LDS32, 3, dsts, adrs, NOREG); 534 + else ld_group(e, BW_IR_LDG_E, 3, dsts, adrs, pr.udesc); 535 + } 536 + isetp_ge_u32(e, k0, basep32); 537 + int brk = -1; 538 + if (divergent >= 2) region_exit(e, RX_IF_P0); else brk = bra_fwd_if_p0(e); 539 + imadi(e, negp, p, 0xffffffffu, NOREG); /* -p */ 540 + imadi(e, d, k0, 0xffffffffu, base); /* base - k0 */ 541 + shr_i(e, neg, d, 31); 542 + imadi(e, nd, d, 0xffffffffu, NOREG); /* -d */ 543 + imadr(e, dpos, neg, nd, d); /* d - neg*d */ 544 + imadr(e, jadd, neg, nd, NOREG); /* neg * (k0 - base) */ 545 + imadhi(e, q, dpos, magic); 546 + imadr(e, r, q, negp, dpos); /* dpos - q*p */ 547 + imadi(e, j, r, 0xffffffffu, p); /* p - r */ 548 + if (!mutant) { 549 + iadd3(e, t, r, cm1); 550 + shr_i(e, z, t, 31); /* r == 0, or r wrapped (q one too big) */ 551 + imadr(e, j, z, negp, j); /* j - p */ 552 + } 553 + iadd3(e, j, j, jadd); 554 + 555 + /* mark loop (campaign C5): the trip count depends only on p, so every active lane runs the 556 + * same ceil(32/p) steps and the warp never splits here (all active lanes are on the same 557 + * prime). Bits past this word are masked out instead of branched around. The old loop ran 558 + * "while j < 32", a lane-dependent branch with no reconvergence point. */ 559 + if (divergent) { 560 + /* R1: the `888a011` mark loop, lane-dependent trip count, inside a region. Each lane 561 + * leaves at its own iteration (the exit jumps to the BSYNC) and the warp reunites there. */ 562 + region_begin(e); 563 + loop_begin(e); 564 + int li = here(e); 565 + isetp_ge_u32(e, j, c32); 566 + region_exit(e, RX_IF_P0); 567 + shl_r(e, bit, one, j); 568 + lop3lut(e, acc, acc, bit, NOREG, 0xfc); /* acc | bit */ 569 + iadd3(e, j, j, p); 570 + bra_always(e, li); 571 + loop_end(e); 572 + region_join(e); 573 + } else { 574 + movrz(e, tt); 575 + loop_begin(e); 576 + int li = here(e); 577 + isetp_ge_u32(e, tt, c32); 578 + int done = bra_fwd_if_p0(e); 579 + iadd3(e, jj, j, tt); 580 + lop3lut(e, sh, jj, c31, NOREG, 0xc0); /* jj & 31 */ 581 + shl_r(e, bit, one, sh); 582 + iadd3(e, t, jj, cm32); 583 + shr_i(e, z, t, 31); /* jj < 32 (j <= p + 31, far below 2^31) */ 584 + imadi(e, m, z, 0xffffffffu, NOREG); /* all ones when jj < 32, else 0 */ 585 + lop3lut(e, acc, acc, bit, m, 0xf8); /* acc | (bit & m) */ 586 + iadd3(e, tt, tt, p); 587 + bra_always(e, li); 588 + loop_end(e); 589 + bra_patch_here(e, done); 590 + } 591 + 592 + if (staged) iadd3(e, ptr, ptr, c12); else widei(e, ptr, one, 12, ptr); 593 + bra_always(e, lp); 594 + loop_end(e); 595 + if (divergent >= 2) region_join(e); else bra_patch_here(e, brk); 596 + 597 + iadd3(e, t, w, cm1); 598 + shr_i(e, z, t, 31); /* w == 0: the number 1 is not prime */ 599 + lop3lut(e, acc, acc, z, NOREG, 0xfc); 600 + lop3xor(e, e1, w, lastw); 601 + iadd3(e, t, e1, cm1); 602 + shr_i(e, z, t, 31); /* w == last word */ 603 + imadr(e, m, z, tailinv, NOREG); 604 + lop3lut(e, word, acc, m, NOREG, 0x03); /* ~(acc | m) */ 605 + addr4(e, oaddr, w, pr.pc); 606 + stg(e, oaddr, word, pr.udesc); 607 + /* IMAD, not IADD3: the IADD3 encoder ignores the scheduler control word (fixed 608 + * 0x010fca00), so right after a store it would not wait on the read barrier */ 609 + imadr(e, w, stride, one, w); 610 + isetp_ge_u32(e, w, nwords); 611 + bra_back_if_not_p0(e, lw); 612 + loop_end(e); 613 + tail(e); 614 +} 615 + 616 +/* ---- reconvergence probes (omega #308, regressions R3..R6 and the resource bound) ---- 617 + * All: a, b = u32 inputs, out = u32, P0 = n; 128 threads, grid ceil(n/128); launched by 618 + * omega_gpu_reconv_probe_u32. A lane past n clamps its index to n-1 so that it loads valid 619 + * data and takes part in the warp-wide SHFL; it exits only after the SHFL, before its store. 620 + * Each probe computes a per-lane r on divergent paths, joins, then 621 + * out[i] = r + 4099 * s, s = r of lane (lane+1) in the same warp (SHFL.DOWN 1; lane 31: own r) 622 + * so a lane that joined late, never, or with the wrong value shows in the neighbour's word too. 623 + * The host oracle is rc_oracle in tests/gpu_reconv_test.c. */ 624 +typedef struct { Pro pr; int n, i, idx, x, y, r, s, one, cm1; } Rp; 625 +static Rp rp_begin(Em *e) { 626 + Rp k; memset(&k, 0, sizeof k); 627 + k.pr = prologue(e); 628 + k.n = V(e); k.i = V(e); k.idx = V(e); k.x = V(e); k.y = V(e); k.r = V(e); k.s = V(e); k.one = V(e); k.cm1 = V(e); 629 + int nm1 = V(e), d = V(e), neg = V(e), off = V64(e); 630 + ldc32(e, k.n, ARG_P0); 631 + movi(e, k.one, 1); movi(e, k.cm1, 0xffffffffu); 632 + imadi(e, k.i, k.pr.cta, OMEGA_GPU_EW_THREADS, k.pr.tid); 633 + iadd3(e, nm1, k.n, k.cm1); /* n - 1 */ 634 + imadi(e, d, k.i, 0xffffffffu, nm1); /* (n - 1) - i, top bit set when i > n - 1 */ 635 + shr_i(e, neg, d, 31); 636 + imadr(e, k.idx, neg, d, k.i); /* i, or n - 1 when past the end */ 637 + addr4(e, off, k.idx, k.pr.pa); ldg(e, k.x, off, k.pr.udesc); 638 + addr4(e, off, k.idx, k.pr.pb); ldg(e, k.y, off, k.pr.udesc); 639 + return k; 640 +} 641 +static void rp_end(Em *e, const Rp *k) { 642 + int out = V(e), off = V64(e); 643 + shfl_down(e, k->s, k->r, 1); 644 + imadi(e, out, k->s, 4099, k->r); 645 + isetp_ge_u32(e, k->i, k->n); 646 + exit_if_p0(e); 647 + addr4(e, off, k->i, k->pr.pc); 648 + stg(e, off, out, k->pr.udesc); 649 + tail(e); 650 +} 651 +/* R3: if/else with sides of different length. x >= y: r = f(x, y) (5 steps); else r = x + 1. 652 + * Math mutant: the long side is one too big. */ 653 +static void gen_rc_diamond(Em *e, int mutant) { 654 + Rp k = rp_begin(e); 655 + int t = V(e), u = V(e); 656 + region_begin(e); 657 + isetp_ge_u32(e, k.x, k.y); 658 + int els = bra_fwd_if_p0(e); 659 + iadd3(e, k.r, k.x, k.one); /* short side */ 660 + region_exit(e, RX_ALWAYS); 661 + bra_patch_here(e, els); 662 + imadi(e, t, k.x, 3, k.y); /* long side: t = 3x + y */ 663 + lop3xor(e, u, t, k.x); /* u = t ^ x */ 664 + imadi(e, k.r, u, 5, k.one); /* r = 5u + 1 */ 665 + shr_i(e, t, k.r, 3); 666 + iadd3(e, k.r, k.r, t); /* r += r >> 3 */ 667 + if (mutant) iadd3(e, k.r, k.r, k.one); 668 + region_join(e); 669 + rp_end(e, &k); 670 +} 671 +/* The lane-dependent loop shared by R4 and R5: v = x & 255, step = (y & 15) + 1, 672 + * while v < 256 { v += step; cnt += 1 }. Math mutant: the bound is 255. Emits the region. */ 673 +static void rc_count_loop(Em *e, const Rp *k, int mutant, int v, int cnt) { 674 + int st = V(e), bound = V(e), c255 = V(e), c15 = V(e); 675 + movi(e, c255, 255); movi(e, c15, 15); movi(e, bound, mutant ? 255 : 256); 676 + lop3lut(e, v, k->x, c255, NOREG, 0xc0); 677 + lop3lut(e, st, k->y, c15, NOREG, 0xc0); 678 + iadd3(e, st, st, k->one); 679 + movrz(e, cnt); 680 + region_begin(e); 681 + loop_begin(e); 682 + int L = here(e); 683 + isetp_ge_u32(e, v, bound); 684 + region_exit(e, RX_IF_P0); 685 + iadd3(e, v, v, st); 686 + iadd3(e, cnt, cnt, k->one); 687 + bra_always(e, L); 688 + loop_end(e); 689 + region_join(e); 690 +} 691 +/* R4: lane-dependent loop exit (break). r = 256 * cnt + v. */ 692 +static void gen_rc_loopbreak(Em *e, int mutant) { 693 + Rp k = rp_begin(e); 694 + int v = V(e), cnt = V(e); 695 + rc_count_loop(e, &k, mutant, v, cnt); 696 + imadi(e, k.r, cnt, 256, v); 697 + rp_end(e, &k); 698 +} 699 +/* R5: nested divergence. Odd x: r = 7 (skips the inner region). Even x: the R4 loop inside the 700 + * outer region, r = 256 * cnt + v + 100. */ 701 +static void gen_rc_nested(Em *e, int mutant) { 702 + Rp k = rp_begin(e); 703 + int v = V(e), cnt = V(e), low = V(e), c100 = V(e); 704 + movi(e, k.r, 7); movi(e, c100, 100); 705 + lop3lut(e, low, k.x, k.one, NOREG, 0xc0); /* x & 1 */ 706 + region_begin(e); 707 + isetp_ge_u32(e, low, k.one); 708 + region_exit(e, RX_IF_P0); 709 + rc_count_loop(e, &k, mutant, v, cnt); 710 + imadi(e, k.r, cnt, 256, v); 711 + iadd3(e, k.r, k.r, c100); 712 + region_join(e); 713 + rp_end(e, &k); 714 +} 715 +/* R6: lanes past the end, a divergent region, then a CTA-wide exchange and the warp SHFL. 716 + * xv = x | 1 computed on divergent paths (even lanes take the branch), every thread stores xv 717 + * to its shared slot, BAR.SYNC, reads its partner's (tid ^ 1), r = 3x + partner_xv. 718 + * Production form: lanes past n are clamped and exit after the SHFL (correct). early_exit 719 + * (mutant 1): lanes past n EXIT first, as a naive kernel would; the emitter refuses that 720 + * (BAR/SHFL after a predicated EXIT). Only the host-test build path (codegen_ir) may bypass the 721 + * refusal, so the simulator can show what the kernel would do (SHFL_EXITED); a launch never can. */ 722 +static void gen_rc_exit_bar(Em *e, int early_exit) { 723 + Rp k = rp_begin(e); 724 + int saddr = V(e), paddr = V(e), yv = V(e), xv = V(e), low = V(e); 725 + if (early_exit) { 726 + e->exit_sync_ok = early_exit == 1 && e->test_path; 727 + isetp_ge_u32(e, k.i, k.n); 728 + exit_if_p0(e); 729 + } 730 + imadi(e, xv, k.x, 1, NOREG); 731 + lop3lut(e, low, k.x, k.one, NOREG, 0xc0); /* x & 1 */ 732 + region_begin(e); 733 + isetp_ge_u32(e, low, k.one); 734 + region_exit(e, RX_IF_P0); /* odd lanes leave */ 735 + iadd3(e, xv, xv, k.one); /* even lanes: xv = x + 1 */ 736 + region_join(e); 737 + imadi(e, saddr, k.pr.tid, 4, NOREG); 738 + sts32(e, saddr, xv); 739 + bar_sync(e); 740 + lop3xor(e, paddr, k.pr.tid, k.one); 741 + imadi(e, paddr, paddr, 4, NOREG); 742 + lds32(e, yv, paddr); 743 + imadi(e, k.r, k.x, 3, yv); 744 + rp_end(e, &k); 745 +} 746 +/* Barrier-register bound: `levels` nested regions, each leaving lanes with x >= y out and adding 1 747 + * for the others: r = x + levels * (x < y). 16 levels must build (B0..B15); 17 must be refused. */ 748 +static void gen_rc_depth(Em *e, int levels) { 749 + Rp k = rp_begin(e); 750 + imadi(e, k.r, k.x, 1, NOREG); 751 + for (int d = 0; d < levels; d++) { 752 + region_begin(e); 753 + isetp_ge_u32(e, k.x, k.y); 754 + region_exit(e, RX_IF_P0); 755 + iadd3(e, k.r, k.r, k.one); 756 + } 757 + for (int d = 0; d < levels; d++) region_join(e); 758 + rp_end(e, &k); 759 +} 760 +/* Codegen refusals (each must come back CODEGEN_FAIL; a kernel with a split warp at a 761 + * cross-lane step must never reach the chip). */ 762 +static void gen_rc_refuse(Em *e, OmegaGpuEwOp which) { 763 + Rp k = rp_begin(e); 764 + switch (which) { 765 + case OMEGA_GPU_EW_RC_REFUSE_EXIT_IN_REGION: region_begin(e); isetp_ge_u32(e, k.i, k.n); exit_if_p0(e); region_join(e); break; 766 + case OMEGA_GPU_EW_RC_REFUSE_BAR_IN_REGION: region_begin(e); bar_sync(e); region_join(e); break; 767 + case OMEGA_GPU_EW_RC_REFUSE_SHFL_IN_REGION: region_begin(e); shfl_down(e, k.s, k.x, 1); region_join(e); break; 768 + case OMEGA_GPU_EW_RC_REFUSE_UNCLOSED: region_begin(e); isetp_ge_u32(e, k.x, k.y); region_exit(e, RX_IF_P0); break; /* no join */ 769 + case OMEGA_GPU_EW_RC_REFUSE_JOIN_ONLY: region_join(e); break; /* BSYNC without BSSY */ 770 + default: e->err = -1; break; 771 + } 772 + imadi(e, k.r, k.x, 1, NOREG); 773 + rp_end(e, &k); 774 +} 775 + 776 +/* A value first defined inside a loop body may not be read after the loop 777 + * before it is written again: the allocator could have let a later body 778 + * temporary share its register, and the last iteration's value would be lost. */ 779 +static int check_loop_invariant(const Em *e) { 780 + const OmegaRegAlloc *ra = &e->p->regalloc; 781 + for (int L = 0; L < e->n_loops; L++) 782 + for (int v = 0; v < ra->num_vregs; v++) { 783 + int fd = ra->intervals[v].first_def; 784 + if (fd < e->loop_start[L] || fd > e->loop_end[L]) continue; 785 + for (size_t i = (size_t)e->loop_end[L] + 1; i < e->p->count; i++) { 786 + const BlackwellIRInsn *in = &e->p->insns[i]; 787 + if (in->src1_vreg == v || in->src2_vreg == v || in->src3_vreg == v) return -1; 788 + if (in->dst_vreg == v && !in->is_uniform) break; 789 + } 790 + } 791 + return 0; 792 +} 793 + 794 +#define EW_GPR_BUDGET 64u /* the QMD declares 64 registers, as the matmul launcher does */ 795 + 796 +/* Mesa NAK sm120_instr_latencies.rs + sm100/reg_raw.csv: ALU/dual-ALU pairs 797 + * and FMA/FMA pairs need 4 + 1 cycles; mixed pairs need 5 + 1. CSV rows are 798 + * READERS, columns WRITERS (see lat_rs_gen.py), not the reverse. IMAD.WIDE 799 + * has operand-specific latencies and is deliberately excluded here. 800 + * 801 + * Retain at least 5 cycles after every fixed producer. Thus the next reader 802 + * uses the pair-specific bound and later readers are >= 9 cycles away (the 803 + * next instruction in a tightened pair is itself fixed). No instruction, 804 + * branch target, wait, barrier assignment or register allocation is changed. 805 + * IADD3's encoder still supplies its historical control word; do not pretend 806 + * to schedule that producer here. Its existing 5-cycle delay is unchanged. 807 + * 808 + * Predicate-to-guard uses NAK paw_latency -> raw(write, None): reader 809 + * RedirectedFp64, writer Dualalu = 13, plus SM120's 1 = 14, in emit above. 810 + * NVIDIA's public ISA docs are silent about SASS control-word semantics. 811 + */ 812 +static int fixed_pair_class(BlackwellIROpcode op) { 813 + switch (op) { 814 + case BW_IR_MOV_RZ: case BW_IR_MOV_IMM: case BW_IR_IADD3: 815 + case BW_IR_LOP3_XOR: case BW_IR_LOP3_LUT: 816 + case BW_IR_SHF_R: case BW_IR_SHF_L_U32: return 1; 817 + case BW_IR_IMAD: case BW_IR_IMAD_HI_U32: 818 + case BW_IR_FADD: case BW_IR_FSUB: case BW_IR_FMUL: case BW_IR_FFMA: return 2; 819 + default: return 0; 820 + } 821 +} 822 + 823 +static void schedule_fixed_pairs(BlackwellIRProgram *p) { 824 + for (size_t i = 0; i + 1 < p->count; i++) { 825 + BlackwellIRInsn *a = &p->insns[i]; 826 + const BlackwellIRInsn *b = &p->insns[i + 1]; 827 + int cls = fixed_pair_class(a->op); 828 + if (!cls || cls != fixed_pair_class(b->op) || a->op == BW_IR_IADD3 || 829 + a->predicate_p0 || b->predicate_p0 || ((a->control >> 9) & 15u) != 6) 830 + continue; 831 + a->control = (a->control & ~(15u << 9)) | (5u << 9); 832 + } 833 +} 834 + 835 +static int build_kernel(OmegaGpuEwOp op, int mutant, OmegaBlackwellKernel *kernel, BlackwellIRProgram *prog_out, int test_path) { 836 + BlackwellIRProgram *prog = calloc(1, sizeof *prog); 837 + if (!prog) return OMEGA_GPU_EW_CODEGEN_FAIL; 838 + omega_bw_ir_init(prog); 839 + Em e; memset(&e, 0, sizeof e); e.p = prog; e.test_path = test_path; 840 + /* mutant 1 = the op's math mutant (as before); 2 = the join (BSYNC) dropped; 3 = the BSSY 841 + * names the wrong join. 2 and 3 only change kernels that open a region. */ 842 + e.rg_mutant = mutant == 2 ? 1 : mutant == 3 ? 2 : 0; 843 + int math = mutant == 1; 844 + switch (op) { 845 + case OMEGA_GPU_EW_EX2: gen_ex2(&e, math); break; 846 + case OMEGA_GPU_EW_RSQ: gen_rsq(&e, math); break; 847 + case OMEGA_GPU_EW_XCHG: gen_xchg(&e, math); break; 848 + case OMEGA_GPU_EW_RMSNORM: gen_rmsnorm(&e, math); break; 849 + case OMEGA_GPU_EW_ROPE: gen_rope(&e, math); break; 850 + case OMEGA_GPU_EW_SWIGLU: gen_swiglu(&e, math); break; 851 + case OMEGA_GPU_EW_PRIME_SIEVE: gen_prime_sieve(&e, math, 0, 0); break; 852 + case OMEGA_GPU_EW_PRIME_SIEVE_SHARED: gen_prime_sieve(&e, math, 1, 0); break; 853 + case OMEGA_GPU_EW_PRIME_SIEVE_DIV1: gen_prime_sieve(&e, math, 0, 1); break; 854 + case OMEGA_GPU_EW_PRIME_SIEVE_SHARED_DIV1: gen_prime_sieve(&e, math, 1, 1); break; 855 + case OMEGA_GPU_EW_PRIME_SIEVE_DIV2: gen_prime_sieve(&e, math, 0, 2); break; 856 + case OMEGA_GPU_EW_PRIME_SIEVE_SHARED_DIV2: gen_prime_sieve(&e, math, 1, 2); break; 857 + case OMEGA_GPU_EW_RC_DIAMOND: gen_rc_diamond(&e, math); break; 858 + case OMEGA_GPU_EW_RC_LOOPBREAK: gen_rc_loopbreak(&e, math); break; 859 + case OMEGA_GPU_EW_RC_NESTED: gen_rc_nested(&e, math); break; 860 + case OMEGA_GPU_EW_RC_EXIT_BAR: gen_rc_exit_bar(&e, math); break; 861 + case OMEGA_GPU_EW_RC_REFUSE_EXIT_SHFL: gen_rc_exit_bar(&e, 2); break; 862 + case OMEGA_GPU_EW_RC_DEPTH16: gen_rc_depth(&e, BW_RECONV_MAX_BAR); break; 863 + case OMEGA_GPU_EW_RC_REFUSE_DEPTH17: gen_rc_depth(&e, BW_RECONV_MAX_BAR + 1); break; 864 + case OMEGA_GPU_EW_RC_REFUSE_EXIT_IN_REGION: case OMEGA_GPU_EW_RC_REFUSE_BAR_IN_REGION: 865 + case OMEGA_GPU_EW_RC_REFUSE_SHFL_IN_REGION: case OMEGA_GPU_EW_RC_REFUSE_UNCLOSED: 866 + case OMEGA_GPU_EW_RC_REFUSE_JOIN_ONLY: gen_rc_refuse(&e, op); break; 867 + default: e.err = -1; break; 868 + } 869 + if (e.rg.depth != 0) e.err = -1; /* a region left open has no join: refuse the build */ 870 + schedule_fixed_pairs(prog); 871 + int rc = OMEGA_GPU_EW_CODEGEN_FAIL; 872 + int ra_rc = (e.err == 0) ? omega_bw_regalloc_solve(prog) : -1; 873 + int loop_rc = (ra_rc == 0) ? check_loop_invariant(&e) : -1; 874 +#ifdef OMEGA_EW_DEBUG 875 + fprintf(stderr, "ew codegen op=%d mutant=%d emit_err=%d insns=%zu vregs=%d regalloc=%d loops=%d peak_gpr=%u\n", 876 + (int)op, mutant, e.err, prog->count, prog->regalloc.num_vregs, ra_rc, loop_rc, prog->regalloc.peak_gpr_usage); 877 +#endif 878 + if (e.err == 0 && ra_rc == 0 && loop_rc == 0 && prog->regalloc.peak_gpr_usage <= EW_GPR_BUDGET) { 879 + size_t max_bytes = (size_t)BW_MAX_IR_INSNS * 16; 880 + memset(kernel, 0, sizeof *kernel); 881 + kernel->code = malloc(max_bytes); 882 + size_t emitted = 0; 883 + if (kernel->code && omega_bw_encode_program(prog, kernel->code, max_bytes, &emitted) == 0) { 884 + kernel->code_size = emitted; 885 + kernel->insn_count = emitted / 16; 886 + kernel->gpr_count = prog->regalloc.peak_gpr_usage; 887 + kernel->uniform_gpr_count = prog->regalloc.peak_ugpr_usage; 888 + sha256_hash(kernel->code, kernel->code_size, kernel->code_digest); 889 + if (prog_out) *prog_out = *prog; 890 + rc = OMEGA_GPU_EW_OK; 891 + } else { 892 +#ifdef OMEGA_EW_DEBUG 893 + fprintf(stderr, "ew codegen op=%d: encode failed (an instruction form the encoder refuses)\n", (int)op); 894 +#endif 895 + free(kernel->code); kernel->code = NULL; 896 + } 897 + } 898 + free(prog); 899 + return rc; 900 +} 901 + 902 +/* --------------------------------------------------------- kernel cache */ 903 + 904 +/* One kernel per (op, mutant); the device copy is uploaded once and stays 905 + * resident for the process (cut 4b: no per-call code page). */ 906 +typedef struct { int used; int op; int mutant; OmegaBlackwellKernel kernel; OmegaGpuMem code; } Slot; 907 +static int g_mutant_op; /* 0 = none */ 908 +static int g_mutant_level = 1; /* the mutant number built for g_mutant_op (1 math, 2 join dropped, 3 join corrupted) */ 909 +static Slot g_cache[8]; 910 +static OmegaGpuScratch g_a, g_b, g_c; /* staging, grown to the high-water mark, reused per call */ 911 +static bool g_hooked; 912 +#define LOCK() omega_gpu_session_lock() 913 +#define UNLOCK() omega_gpu_session_unlock() 914 + 915 +static void cache_clear_locked(void) { 916 + for (size_t i = 0; i < sizeof g_cache / sizeof g_cache[0]; i++) 917 + if (g_cache[i].used) { free(g_cache[i].kernel.code); omega_gpu_session_free(&g_cache[i].code); memset(&g_cache[i], 0, sizeof g_cache[i]); } 918 +} 919 + 920 +void omega_gpu_elementwise_cache_clear(void) { 921 + LOCK(); 922 + cache_clear_locked(); 923 + UNLOCK(); 924 +} 925 + 926 +/* Called by the session (lock held, device still open) right before it closes. */ 927 +static void on_session_close(void) { 928 + cache_clear_locked(); 929 + omega_gpu_session_scratch_free(&g_a); omega_gpu_session_scratch_free(&g_b); omega_gpu_session_scratch_free(&g_c); 930 +} 931 + 932 +void omega_gpu_elementwise_test_set_mutant(int op) { 933 + LOCK(); 934 + g_mutant_op = op; g_mutant_level = 1; 935 + cache_clear_locked(); 936 + UNLOCK(); 937 +} 938 +void omega_gpu_elementwise_test_set_mutant_level(int op, int level) { 939 + LOCK(); 940 + g_mutant_op = op; g_mutant_level = level < 1 ? 1 : level > 3 ? 3 : level; 941 + cache_clear_locked(); 942 + UNLOCK(); 943 +} 944 + 945 +/* Caller holds the lock. Builds the kernel if needed; uploads the device copy when a 946 + * device is open (upload = false lets the host-only codegen path run without a chip). */ 947 +static int kernel_for(OmegaGpuEwOp op, bool upload, Slot **out, bool *hit) { 948 + int mutant = (g_mutant_op == (int)op) ? g_mutant_level : 0; 949 + Slot *s = NULL; 950 + for (size_t i = 0; i < sizeof g_cache / sizeof g_cache[0]; i++) 951 + if (g_cache[i].used && g_cache[i].op == (int)op && g_cache[i].mutant == mutant) { s = &g_cache[i]; *hit = true; break; } 952 + if (!s) { 953 + OmegaBlackwellKernel k; 954 + int rc = build_kernel(op, mutant, &k, NULL, 0); 955 + if (rc != OMEGA_GPU_EW_OK) return rc; 956 + size_t slot = 0; 957 + for (size_t i = 0; i < sizeof g_cache / sizeof g_cache[0]; i++) if (!g_cache[i].used) { slot = i; break; } 958 + s = &g_cache[slot]; 959 + if (s->used) { free(s->kernel.code); omega_gpu_session_free(&s->code); } /* full: evict slot 0 */ 960 + memset(s, 0, sizeof *s); 961 + s->used = 1; s->op = (int)op; s->mutant = mutant; s->kernel = k; 962 + *hit = false; 963 + } 964 + if (upload && !s->code.cpu) { 965 + if (omega_gpu_session_alloc_code(s->kernel.code_size, &s->code) != 0) return OMEGA_GPU_EW_CHIP_FAIL; 966 + memcpy(s->code.cpu, s->kernel.code, s->kernel.code_size); 967 + __asm__ volatile("dsb sy" ::: "memory"); 968 + } 969 + *out = s; 970 + return OMEGA_GPU_EW_OK; 971 +} 972 + 973 +int omega_gpu_elementwise_codegen(OmegaGpuEwOp op, const uint32_t *dims, float eps, OmegaBlackwellKernel *kernel) { 974 + (void)dims; (void)eps; /* kernels read their shape from the argument words */ 975 + if (!kernel) return OMEGA_GPU_EW_BAD_ARGS; 976 + LOCK(); 977 + int mutant = (g_mutant_op == (int)op) ? g_mutant_level : 0; 978 + UNLOCK(); 979 + return build_kernel(op, mutant, kernel, NULL, 0); 980 +} 981 + 982 +int omega_gpu_elementwise_codegen_ir(OmegaGpuEwOp op, int mutant, void *prog, OmegaBlackwellKernel *kernel) { 983 + if (!kernel) return OMEGA_GPU_EW_BAD_ARGS; 984 + if (mutant < 0 || mutant > 3) return OMEGA_GPU_EW_BAD_ARGS; 985 + return build_kernel(op, mutant, kernel, (BlackwellIRProgram *)prog, 1); 986 +} 987 + 988 +const char *omega_gpu_elementwise_last_error(void) { return omega_gpu_session_last_error(); } 989 + 990 +/* ------------------------------------------------------------ launcher */ 991 + 992 +#define EW_POISON 0xffbadbadu /* a NaN pattern no kernel here produces on purpose */ 993 +#define EW_WAIT_MS 600000ull /* like main's load/store launchers; a 5 s wait failed under contention (omega#198) */ 994 + 995 +static uint64_t now_ns(void) { 996 + struct timespec t; clock_gettime(CLOCK_MONOTONIC, &t); 997 + return (uint64_t)t.tv_sec * 1000000000ULL + (uint64_t)t.tv_nsec; 998 +} 999 + 1000 +/* Caller holds the lock. Opens the shared device on first use. */ 1001 +static int dev_open_locked(void) { 1002 + if (!g_hooked) { (void)omega_gpu_session_on_close(on_session_close); g_hooked = true; } 1003 + return omega_gpu_session_open() ? OMEGA_GPU_EW_OK : OMEGA_GPU_EW_CHIP_FAIL; 1004 +} 1005 + 1006 +/* One launch: a and b staged in, c out (c_bytes/4 words, poison-filled first), through 1007 + * the shared session (omega_gpu_session_launch: shader-cache invalidate, constant bank, 1008 + * QMD0/QMD1, first marker, L2_FLUSH_DIRTY, second marker), then readback and the 1009 + * poison scan. b may be NULL when b_fill wrote the staging buffer already. */ 1010 +static int run_abc(const Slot *ks, const void *a, size_t a_bytes, const void *b, size_t b_bytes, 1011 + void *c, size_t c_bytes, uint32_t threads_x, uint32_t grid_x, 1012 + const uint32_t params[4], OmegaGpuEwInfo *info) { 1013 + if (omega_gpu_session_scratch(&g_a, a_bytes) || omega_gpu_session_scratch(&g_b, b_bytes) || omega_gpu_session_scratch(&g_c, c_bytes)) 1014 + return OMEGA_GPU_EW_CHIP_FAIL; 1015 + memcpy(g_a.mem.cpu, a, a_bytes); 1016 + if (b) memcpy(g_b.mem.cpu, b, b_bytes); 1017 + size_t c_words = c_bytes / 4; 1018 + uint32_t *c_dev = (uint32_t *)g_c.mem.cpu; 1019 + for (size_t i = 0; i < c_words; i++) c_dev[i] = EW_POISON; 1020 + __asm__ volatile("dsb sy" ::: "memory"); 1021 + 1022 + uint32_t args[OMEGA_BW_CBANK_MATMUL_ARGS_WORDS]; 1023 + args[0] = (uint32_t)g_a.mem.va; args[1] = (uint32_t)(g_a.mem.va >> 32); 1024 + args[2] = (uint32_t)g_b.mem.va; args[3] = (uint32_t)(g_b.mem.va >> 32); 1025 + args[4] = (uint32_t)g_c.mem.va; args[5] = (uint32_t)(g_c.mem.va >> 32); 1026 + args[6] = params[0]; args[7] = params[1]; args[8] = params[2]; args[9] = params[3]; 1027 + OmegaGpuLaunch L = { 1028 + .code_va = ks->code.va, .gpr_count = EW_GPR_BUDGET, .threads_x = threads_x, .threads_y = 1, 1029 + .grid_x = grid_x, .grid_y = 1, .num_elements = c_words, 1030 + .args = args, .n_args = OMEGA_BW_CBANK_MATMUL_ARGS_WORDS, .timeout_ms = EW_WAIT_MS, 1031 + }; 1032 + uint64_t elapsed = 0; uint32_t marker = 0; 1033 + if (omega_gpu_session_launch(&L, &elapsed, &marker) != 0) return OMEGA_GPU_EW_CHIP_FAIL; 1034 + 1035 + memcpy(c, g_c.mem.cpu, c_bytes); 1036 + uint32_t unwritten = 0; 1037 + for (size_t i = 0; i < c_words; i++) if (((uint32_t *)c)[i] == EW_POISON) unwritten++; 1038 + if (info) { 1039 + info->chip_calls++; 1040 + info->elapsed_ns += elapsed; 1041 + info->completion_marker = marker; 1042 + info->unwritten_words += unwritten; 1043 + info->threads_per_cta = threads_x; 1044 + info->ctas_last_launch = grid_x; 1045 + } 1046 + return unwritten ? OMEGA_GPU_EW_UNWRITTEN : OMEGA_GPU_EW_OK; 1047 +} 1048 + 1049 +/* ------------------------------------------------------- public entries */ 1050 + 1051 +static void info_begin(OmegaGpuEwInfo *info, const OmegaBlackwellKernel *k, bool hit) { 1052 + if (!info) return; 1053 + memset(info, 0, sizeof *info); 1054 + info->kernel_cache_hit = hit; 1055 + info->gpr_count = k->gpr_count; 1056 + info->insn_count = (uint32_t)k->insn_count; 1057 + snprintf(info->target_chip, sizeof info->target_chip, "NVIDIA DGX Spark (Grace Blackwell GB10)"); 1058 + info->sm_architecture = 121; 1059 +} 1060 +static uint32_t f2u(float f) { uint32_t u; memcpy(&u, &f, 4); return u; } 1061 +static void info_end(OmegaGpuEwInfo *info, uint64_t t0) { if (info) info->call_ns = now_ns() - t0; } 1062 + 1063 +/* Common prologue of every chip entry: lock, open, kernel (resident), info. */ 1064 +static int begin(OmegaGpuEwOp op, Slot **ks, OmegaGpuEwInfo *info) { 1065 + LOCK(); 1066 + int rc = dev_open_locked(); 1067 + bool hit = false; 1068 + if (rc == OMEGA_GPU_EW_OK) rc = kernel_for(op, true, ks, &hit); 1069 + if (rc != OMEGA_GPU_EW_OK) { UNLOCK(); return rc; } 1070 + info_begin(info, &(*ks)->kernel, hit); 1071 + return OMEGA_GPU_EW_OK; 1072 +} 1073 + 1074 +int omega_gpu_rmsnorm_f32(uint32_t rows, uint32_t dim, const float *x, const float *weight, 1075 + float eps, float *out, OmegaGpuEwInfo *info) { 1076 + uint64_t t0 = now_ns(); 1077 + if (!x || !weight || !out || rows == 0 || dim == 0 || dim % OMEGA_GPU_EW_THREADS != 0) return OMEGA_GPU_EW_BAD_ARGS; 1078 + if (dim > OMEGA_GPU_EW_MAX_DIM) return OMEGA_GPU_EW_TOO_LARGE; 1079 + Slot *k = NULL; 1080 + int rc = begin(OMEGA_GPU_EW_RMSNORM, &k, info); 1081 + if (rc != OMEGA_GPU_EW_OK) return rc; 1082 + uint32_t params[4] = { dim / OMEGA_GPU_EW_THREADS, f2u(1.0f / (float)dim), f2u(eps), dim }; 1083 + for (uint32_t r0 = 0; r0 < rows && rc == OMEGA_GPU_EW_OK; r0 += OMEGA_GPU_EW_MAX_CTAS) { 1084 + uint32_t nr = rows - r0 < OMEGA_GPU_EW_MAX_CTAS ? rows - r0 : OMEGA_GPU_EW_MAX_CTAS; 1085 + size_t bytes = (size_t)nr * dim * 4; 1086 + rc = run_abc(k, x + (size_t)r0 * dim, bytes, weight, (size_t)dim * 4, out + (size_t)r0 * dim, bytes, 1087 + OMEGA_GPU_EW_THREADS, nr, params, info); 1088 + } 1089 + UNLOCK(); 1090 + info_end(info, t0); 1091 + return rc; 1092 +} 1093 + 1094 +int omega_gpu_rope_f32(uint32_t heads, uint32_t head_dim, const float *v, 1095 + const float *cos_half, const float *sin_half, float *out, OmegaGpuEwInfo *info) { 1096 + uint64_t t0 = now_ns(); 1097 + if (!v || !cos_half || !sin_half || !out || heads == 0 || head_dim < 2 || (head_dim & 1)) return OMEGA_GPU_EW_BAD_ARGS; 1098 + if (head_dim > 2048) return OMEGA_GPU_EW_TOO_LARGE; 1099 + Slot *k = NULL; 1100 + int rc = begin(OMEGA_GPU_EW_ROPE, &k, info); 1101 + if (rc != OMEGA_GPU_EW_OK) return rc; 1102 + uint32_t half = head_dim / 2; 1103 + uint32_t params[4] = { head_dim, half, 0, 0 }; 1104 + for (uint32_t h0 = 0; h0 < heads && rc == OMEGA_GPU_EW_OK; h0 += OMEGA_GPU_EW_MAX_CTAS) { 1105 + uint32_t nh = heads - h0 < OMEGA_GPU_EW_MAX_CTAS ? heads - h0 : OMEGA_GPU_EW_MAX_CTAS; 1106 + size_t bytes = (size_t)nh * head_dim * 4; 1107 + /* table: cos in the first half of each head, sin in the second, written straight into 1108 + * the staging buffer (one copy per head of this launch) */ 1109 + if (omega_gpu_session_scratch(&g_b, bytes) != 0) { rc = OMEGA_GPU_EW_CHIP_FAIL; break; } 1110 + float *table = g_b.mem.cpu; 1111 + for (uint32_t h = 0; h < nh; h++) { 1112 + memcpy(table + (size_t)h * head_dim, cos_half, half * sizeof *table); 1113 + memcpy(table + (size_t)h * head_dim + half, sin_half, half * sizeof *table); 1114 + } 1115 + /* out may alias v: v is copied into the staging buffer before the result lands in out */ 1116 + rc = run_abc(k, v + (size_t)h0 * head_dim, bytes, NULL, bytes, out + (size_t)h0 * head_dim, bytes, half, nh, params, info); 1117 + } 1118 + UNLOCK(); 1119 + info_end(info, t0); 1120 + return rc; 1121 +} 1122 + 1123 +static int run_1d(OmegaGpuEwOp op, uint32_t n, const void *a, const void *b, void *c, OmegaGpuEwInfo *info) { 1124 + uint64_t t0 = now_ns(); 1125 + Slot *k = NULL; 1126 + int rc = begin(op, &k, info); 1127 + if (rc != OMEGA_GPU_EW_OK) return rc; 1128 + const uint32_t chunk = OMEGA_GPU_EW_MAX_CTAS * OMEGA_GPU_EW_THREADS; 1129 + for (uint32_t i0 = 0; i0 < n && rc == OMEGA_GPU_EW_OK; i0 += chunk) { 1130 + uint32_t ni = n - i0 < chunk ? n - i0 : chunk; 1131 + uint32_t grid = (ni + OMEGA_GPU_EW_THREADS - 1) / OMEGA_GPU_EW_THREADS; 1132 + uint32_t params[4] = { ni, 0, 0, 0 }; 1133 + size_t bytes = (size_t)ni * 4; 1134 + rc = run_abc(k, (const uint8_t *)a + (size_t)i0 * 4, bytes, b ? (const uint8_t *)b + (size_t)i0 * 4 : a, bytes, 1135 + (uint8_t *)c + (size_t)i0 * 4, bytes, OMEGA_GPU_EW_THREADS, grid, params, info); 1136 + } 1137 + UNLOCK(); 1138 + info_end(info, t0); 1139 + return rc; 1140 +} 1141 + 1142 +int omega_gpu_swiglu_f32(uint32_t n, const float *gate, const float *up, float *out, OmegaGpuEwInfo *info) { 1143 + if (!gate || !up || !out || n == 0) return OMEGA_GPU_EW_BAD_ARGS; 1144 + return run_1d(OMEGA_GPU_EW_SWIGLU, n, gate, up, out, info); 1145 +} 1146 +int omega_gpu_ex2_f32(uint32_t n, const float *x, float *out, OmegaGpuEwInfo *info) { 1147 + if (!x || !out || n == 0) return OMEGA_GPU_EW_BAD_ARGS; 1148 + return run_1d(OMEGA_GPU_EW_EX2, n, x, NULL, out, info); 1149 +} 1150 +int omega_gpu_rsq_f32(uint32_t n, const float *x, float *out, OmegaGpuEwInfo *info) { 1151 + if (!x || !out || n == 0) return OMEGA_GPU_EW_BAD_ARGS; 1152 + return run_1d(OMEGA_GPU_EW_RSQ, n, x, NULL, out, info); 1153 +} 1154 +int omega_gpu_shared_xchg_u32(uint32_t n, const uint32_t *x, uint32_t *out, OmegaGpuEwInfo *info) { 1155 + if (!x || !out || n == 0 || n % OMEGA_GPU_EW_THREADS != 0) return OMEGA_GPU_EW_BAD_ARGS; 1156 + return run_1d(OMEGA_GPU_EW_XCHG, n, x, NULL, out, info); 1157 +} 1158 +int omega_gpu_reconv_probe_u32(OmegaGpuEwOp op, uint32_t n, const uint32_t *a, const uint32_t *b, uint32_t *out, OmegaGpuEwInfo *info) { 1159 + if (!a || !b || !out || n == 0) return OMEGA_GPU_EW_BAD_ARGS; 1160 + switch (op) { 1161 + case OMEGA_GPU_EW_RC_DIAMOND: case OMEGA_GPU_EW_RC_LOOPBREAK: case OMEGA_GPU_EW_RC_NESTED: 1162 + case OMEGA_GPU_EW_RC_EXIT_BAR: case OMEGA_GPU_EW_RC_DEPTH16: break; 1163 + default: return OMEGA_GPU_EW_BAD_ARGS; 1164 + } 1165 + return run_1d(op, n, a, b, out, info); 1166 +} 1167 + 1168 +const char *omega_gpu_elementwise_rc_name(int rc) { 1169 + switch (rc) { 1170 + case OMEGA_GPU_EW_OK: return "OK"; 1171 + case OMEGA_GPU_EW_BAD_ARGS: return "BAD_ARGS"; 1172 + case OMEGA_GPU_EW_TOO_LARGE: return "TOO_LARGE"; 1173 + case OMEGA_GPU_EW_CODEGEN_FAIL: return "CODEGEN_FAIL"; 1174 + case OMEGA_GPU_EW_CHIP_FAIL: return "CHIP_FAIL"; 1175 + case OMEGA_GPU_EW_UNWRITTEN: return "UNWRITTEN"; 1176 + default: return "UNKNOWN"; 1177 + } 1178 +} evidence/GPU-MUFU-FTZ-`20261116`/omega_gpu_elementwise_api.h new file mode 100644 @@ -0,0 +1,188 @@ 1 +#ifndef OMEGA_GPU_ELEMENTWISE_API_H 2 +#define OMEGA_GPU_ELEMENTWISE_API_H 3 +/* 4 + * omega_gpu_elementwise_api: native (no CUDA) elementwise and row-reduction 5 + * kernels for the AIEN inference stack (FB-1 cut 4, 2026-10-04). 6 + * 7 + * Three inference ops plus two probe ops, every kernel generated by our own 8 + * codegen (src/omega_blackwell_codegen.c IR) and launched through the same 9 + * chip-proven sequence as the tensor matmul path: all buffers GPU-uncached 10 + * (nvos.h NVOS32_ATTR2_GPU_CACHEABLE: system memory cached by the GPU is not 11 + * coherent with CPU mappings), first marker, L2_FLUSH_DIRTY, second marker 12 + * (C3 tail), poison-filled output scanned for unwritten words after readback. 13 + * 14 + * The math follows aien-sovereign-core crates/aien-inference-abi/src/tensor.rs 15 + * (ReferenceCpuBackend), read 2026-10-04 at main `5fdab70`: 16 + * rmsnorm: scale = 1/sqrt(mean(x^2) + eps) (oracle sums in f64; the chip 17 + * sums in f32 and uses MUFU.RSQ refined by one Newton step), 18 + * out[i] = (x[i] * scale) * weight[i] in that order. 19 + * rope: rotate_half pairs (i, i + head_dim/2) per head, cos/sin tables 20 + * supplied by the host as f32 (the oracle casts f64 cos/sin to f32 21 + * before the f32 math): out0 = q0*cos - q1*sin, out1 = q0*sin + q1*cos, 22 + * emitted as FMUL, FMUL, FADD (no fused multiply-add), so the chip 23 + * result is bit-identical to the f32 oracle. 24 + * swiglu: out = silu(gate) * up, silu(g) = g / (1 + exp(-g)); the chip uses 25 + * MUFU.EX2(g * -log2(e)) and MUFU.RCP (approximate units), the 26 + * oracle computes in f64. Tolerance is stated per op in the test. 27 + * 28 + * Cut 4b (2026-10-04): the device, channel and launch scratch are the process-wide 29 + * session shared with the matmul and attention APIs (omega_gpu_session.h): one open 30 + * per process instead of one per call (~40 ms), kernels resident after first use, 31 + * staging buffers reused at their high-water mark. Calls serialise on one lock. 32 + * 33 + * Launch envelope: at most OMEGA_GPU_EW_MAX_CTAS CTAs per launch; the API splits 34 + * larger work on the host and makes several launches. The cap was 64 from the 35 + * 2026-10-03 matmul sweep that lost whole tiles at 128 CTAs (investigation I42, 36 + * root cause the GPU-cached completion marker, fixed by the uncached marker + 37 + * L2_FLUSH_DIRTY release sequence every launch here goes through). Cut L 38 + * (2026-10-12): 1024, the CTA budget the matmul path has run every serving leg 39 + * at since; a prefill swiglu of 128 x 12288 was 192 launches of 64 CTAs (1.4 ms 40 + * of chip time per call), now 12. The poison scan of every output word is the 41 + * lost-tile detector and stays. 42 + */ 43 +#include 44 +#include 45 +#include 46 +#include "omega_blackwell_matmul.h" /* OmegaBlackwellKernel */ 47 + 48 +#ifdef __cplusplus 49 +extern "C" { 50 +#endif 51 + 52 +enum { 53 + OMEGA_GPU_EW_OK = 0, 54 + OMEGA_GPU_EW_BAD_ARGS = -1, /* NULL pointer, zero dimension, or a shape rule below broken */ 55 + OMEGA_GPU_EW_TOO_LARGE = -2, /* dimension outside the codegen limits */ 56 + OMEGA_GPU_EW_CODEGEN_FAIL = -3, /* our codegen refused or exceeded the register budget */ 57 + OMEGA_GPU_EW_CHIP_FAIL = -4, /* device open, submit, marker or release failed */ 58 + OMEGA_GPU_EW_UNWRITTEN = -5 /* output words still equal to their poison after the run */ 59 +}; 60 + 61 +/* Kernel families. The two probes exist to prove the new instructions on the 62 + * chip with the smallest possible kernels (and are kept for regression). */ 63 +typedef enum { 64 + OMEGA_GPU_EW_EX2 = 1, /* out[i] = 2^a[i] (probe for MUFU.EX2) */ 65 + OMEGA_GPU_EW_XCHG, /* out[i] = a[i ^ (T-1)] inside each CTA (probe for STS/BAR.SYNC/LDS) */ 66 + OMEGA_GPU_EW_RMSNORM, 67 + OMEGA_GPU_EW_ROPE, 68 + OMEGA_GPU_EW_SWIGLU, 69 + OMEGA_GPU_EW_PRIME_SIEVE, /* prime race (2026-10-05): word-parallel odd-only sieve, codegen only 70 + * here; launched by bench/prime_race/gb10_native.c (argument words in 71 + * gen_prime_sieve's comment) */ 72 + OMEGA_GPU_EW_PRIME_SIEVE_SHARED, /* the same sieve with the table staged in shared memory (C3) */ 73 + /* Structured warp reconvergence (omega #308). The four sieves below are the production sieve 74 + * with its lane-dependent loops put back inside BSSY/BSYNC regions (regression R1): DIV1 wraps 75 + * the original mark loop (omega `888a011`), DIV2 also wraps the prime loop (nested regions). */ 76 + OMEGA_GPU_EW_PRIME_SIEVE_DIV1, 77 + OMEGA_GPU_EW_PRIME_SIEVE_SHARED_DIV1, 78 + OMEGA_GPU_EW_PRIME_SIEVE_DIV2, 79 + OMEGA_GPU_EW_PRIME_SIEVE_SHARED_DIV2, 80 + /* Probes for omega_gpu_reconv_probe_u32 (u32 in a, b; u32 out; oracle in tests/gpu_reconv_test.c) */ 81 + OMEGA_GPU_EW_RC_DIAMOND, /* R3: if/else, sides of different length, SHFL after the join */ 82 + OMEGA_GPU_EW_RC_LOOPBREAK, /* R4: loop with a lane-dependent break */ 83 + OMEGA_GPU_EW_RC_NESTED, /* R5: a lane-dependent loop region inside an if region */ 84 + OMEGA_GPU_EW_RC_EXIT_BAR, /* R6: lanes past the end + STS/BAR.SYNC/LDS exchange + SHFL, lanes exit last */ 85 + OMEGA_GPU_EW_RC_DEPTH16, /* 16 nested regions: every barrier register B0..B15 in use */ 86 + /* Codegen refusals: omega_gpu_elementwise_codegen_ir must return CODEGEN_FAIL for each */ 87 + OMEGA_GPU_EW_RC_REFUSE_DEPTH17, /* a 17th nested region: no barrier register left */ 88 + OMEGA_GPU_EW_RC_REFUSE_EXIT_SHFL, /* lanes EXIT, then BAR.SYNC/SHFL on the rest */ 89 + OMEGA_GPU_EW_RC_REFUSE_EXIT_IN_REGION, /* EXIT inside an open region */ 90 + OMEGA_GPU_EW_RC_REFUSE_BAR_IN_REGION, /* BAR.SYNC inside an open region */ 91 + OMEGA_GPU_EW_RC_REFUSE_SHFL_IN_REGION, /* SHFL inside an open region */ 92 + OMEGA_GPU_EW_RC_REFUSE_UNCLOSED, /* region begun, never joined */ 93 + OMEGA_GPU_EW_RC_REFUSE_JOIN_ONLY, /* BSYNC with no BSSY */ 94 + /* MUFU probes (appended after the refusals so earlier values stay put) */ 95 + OMEGA_GPU_EW_RSQ, /* out[i] = 1/sqrt(a[i]) (probe for bare MUFU.RSQ, omega #462) */ 96 + OMEGA_GPU_EW_OP_END /* one past the last op: loops over every op stop here; not an op */ 97 +} OmegaGpuEwOp; 98 + 99 +/* Shape rules (checked, refused with BAD_ARGS / TOO_LARGE): 100 + * rmsnorm: dim % OMEGA_GPU_EW_THREADS == 0, dim <= OMEGA_GPU_EW_MAX_DIM, rows >= 1 101 + * rope: head_dim even, 2 <= head_dim <= 2048 (head_dim/2 threads per CTA), heads >= 1 102 + * swiglu: n >= 1 (the kernel guards the tail with a predicated EXIT) 103 + * ex2, rsq: n >= 1; xchg: n % OMEGA_GPU_EW_THREADS == 0 */ 104 +#define OMEGA_GPU_EW_THREADS 128u 105 +#define OMEGA_GPU_EW_MAX_DIM 16384u 106 +#define OMEGA_GPU_EW_MAX_CTAS 1024u 107 + 108 +typedef struct { 109 + uint32_t chip_calls; /* launches made */ 110 + uint64_t elapsed_ns; /* sum of launch-to-second-marker over the launches */ 111 + uint32_t completion_marker; /* observed first marker word of the last launch */ 112 + uint32_t unwritten_words; /* output words still equal to poison (0 on success) */ 113 + bool kernel_cache_hit; /* the shape's kernel was already generated in this process */ 114 + uint32_t gpr_count; /* registers the generated kernel uses */ 115 + uint32_t insn_count; 116 + uint32_t threads_per_cta; 117 + uint32_t ctas_last_launch; 118 + char target_chip[64]; 119 + uint32_t sm_architecture; 120 + uint64_t call_ns; /* cut 4b: wall time of the whole API call (staging, launches, copy-out) */ 121 +} OmegaGpuEwInfo; 122 + 123 +/* out[r*dim + i] = x[r*dim + i] * scale_r * weight[i]; scale_r = 1/sqrt(mean_i(x^2) + eps). */ 124 +int omega_gpu_rmsnorm_f32(uint32_t rows, uint32_t dim, const float *x, const float *weight, 125 + float eps, float *out, OmegaGpuEwInfo *info); 126 + 127 +/* v holds `heads` heads of head_dim values back to back; cos_half and sin_half 128 + * hold head_dim/2 values each (cos(pos*freq_i), sin(pos*freq_i)); out gets the 129 + * rotated heads (may alias v: the API copies through its own buffers). */ 130 +int omega_gpu_rope_f32(uint32_t heads, uint32_t head_dim, const float *v, 131 + const float *cos_half, const float *sin_half, float *out, 132 + OmegaGpuEwInfo *info); 133 + 134 +/* out[i] = silu(gate[i]) * up[i] for i < n. */ 135 +int omega_gpu_swiglu_f32(uint32_t n, const float *gate, const float *up, float *out, 136 + OmegaGpuEwInfo *info); 137 + 138 +/* Probes. ex2: out[i] = 2^x[i]. rsq: out[i] = MUFU.RSQ(x[i]), no Newton step (the raw unit, for its flush rule). 139 + * xchg: out[i] = x[i ^ (OMEGA_GPU_EW_THREADS-1)] within each CTA. */ 140 +int omega_gpu_ex2_f32(uint32_t n, const float *x, float *out, OmegaGpuEwInfo *info); 141 +int omega_gpu_rsq_f32(uint32_t n, const float *x, float *out, OmegaGpuEwInfo *info); 142 +int omega_gpu_shared_xchg_u32(uint32_t n, const uint32_t *x, uint32_t *out, OmegaGpuEwInfo *info); 143 +/* Reconvergence probes (op = one of OMEGA_GPU_EW_RC_DIAMOND .. OMEGA_GPU_EW_RC_DEPTH16, else 144 + * BAD_ARGS). n >= 1, any n: lanes past the end take part in the warp step and exit before 145 + * their store. out[i] = r_i + 4099 * r_(i+1 in warp); r per op in src/omega_gpu_elementwise_api.c. */ 146 +int omega_gpu_reconv_probe_u32(OmegaGpuEwOp op, uint32_t n, const uint32_t *a, const uint32_t *b, 147 + uint32_t *out, OmegaGpuEwInfo *info); 148 + 149 +/* Generate (without launching) the kernel for one op. Kernels read their shape 150 + * from the argument words, so one kernel per op serves every shape; dims and eps 151 + * are accepted for forward compatibility and ignored today (may be NULL / 0). 152 + * Lets tests disassemble the bytes offline (nvdisasm) and check the register 153 + * budget. Caller frees kernel->code. */ 154 +int omega_gpu_elementwise_codegen(OmegaGpuEwOp op, const uint32_t *dims, float eps, 155 + OmegaBlackwellKernel *kernel); 156 + 157 +/* Same, with the mutant chosen by the caller (0 = production kernel, 1 = the op's math mutant, 158 + * 2 = the reconvergence join (BSYNC) dropped, 3 = the BSSY names the wrong join; 2 and 3 change 159 + * only kernels that open a region, the host simulator must catch both) and, when prog is 160 + * not NULL, a copy of the allocated IR program (a BlackwellIRProgram, post register 161 + * allocation) for a host IR simulator. Does not touch the device or the kernel cache. 162 + * Caller frees kernel->code. */ 163 +int omega_gpu_elementwise_codegen_ir(OmegaGpuEwOp op, int mutant, void *prog, 164 + OmegaBlackwellKernel *kernel); 165 + 166 +/* TEST ONLY. Selects a deliberately wrong kernel for one op (0 clears). Each 167 + * mutant changes the math by far more than the op's tolerance, so a parity 168 + * check that still passes against it proves nothing. Clears the kernel cache. 169 + * EX2: computes 2^(x+1). RSQ: computes rsq(4x) (half the result). XCHG: reads its own shared word (no exchange). 170 + * RMSNORM: the warp tree drops its last SHFL step (half the lanes go missing). 171 + * ROPE: out0 = q0*cos + q1*sin. SWIGLU: exp(+g) instead of exp(-g). */ 172 +void omega_gpu_elementwise_test_set_mutant(int op); 173 +/* TEST ONLY. Like test_set_mutant, choosing the mutant number (1 math, 2 join dropped, 3 join 174 + * corrupted) that the next launch of `op` builds; lets a chip test observe what a missing 175 + * reconvergence does (the simulator must have flagged it first). */ 176 +void omega_gpu_elementwise_test_set_mutant_level(int op, int level); 177 + 178 +const char *omega_gpu_elementwise_rc_name(int rc); 179 +void omega_gpu_elementwise_cache_clear(void); 180 + 181 +/* Stage name of the most recent CHIP_FAIL ("" if none), shared with the other GPU APIs 182 + * (omega_gpu_session_last_error); an open failure carries the driver text. */ 183 +const char *omega_gpu_elementwise_last_error(void); 184 + 185 +#ifdef __cplusplus 186 +} 187 +#endif 188 +#endif evidence/GPU-MUFU-FTZ-`20261116`/receipt.json new file mode 100644 @@ -0,0 +1 @@ 1 +{"schema":"OMEGA_GPU_ELEMENTWISE_V1","tolerances":{"ex2_rel":1e-6,"xchg":"exact","rmsnorm_rel":1e-5,"rmsnorm_abs":1e-6,"rope":"exact","swiglu_rel":1e-5,"swiglu_abs":1e-6,"ex2_ftz":"tests/bw_mufu_ftz.h model; zero, inf, NaN exact; normal results normal and 1e-6 rel; zero allowed within 2^-21 rel above FLT_MIN","rsq_ftz":"tests/bw_mufu_ftz.h model; zero, inf, NaN exact; normal results normal and 1e-6 rel"},"cases":[{"case":"ex2_probe","n":4096,"rc":"OK","violations":0,"worst_scaled_err":0.152538,"pass":true,"chip_elapsed_ns":138353,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":4096,"mutant_caught":true},{"case":"ex2_ftz_probe","n":217,"rc":"OK","violations":0,"worst_scaled_err":0.129999,"pass":true,"chip_elapsed_ns":566885,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":25,"mutant_caught":true,"probe":{"model_differs_from_ieee":191,"host_control_flagged":191,"chip_differs_from_ieee":191,"boundary_flush":0}},{"case":"rsq_ftz_probe","n":1029,"rc":"OK","violations":0,"worst_scaled_err":0.`0842937`,"pass":true,"chip_elapsed_ns":343523,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":1020,"mutant_caught":true,"probe":{"model_differs_from_ieee":8,"host_control_flagged":8,"chip_differs_from_ieee":8,"boundary_flush":0}},{"case":"shared_xchg_probe","n":4096,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":121633,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":4096,"mutant_caught":true},{"case":"rmsnorm_4x2048","n":8192,"rc":"OK","violations":0,"worst_scaled_err":0.`0244808`,"pass":true,"chip_elapsed_ns":114449,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":8192,"mutant_caught":true},{"case":"rmsnorm_1x256","n":256,"rc":"OK","violations":0,"worst_scaled_err":0.`0206888`,"pass":true,"chip_elapsed_ns":567510,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":256,"mutant_caught":true},{"case":"rmsnorm_2x8192","n":16384,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":113553,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":16384,"mutant_caught":true},{"case":"rope_32h_64d_pos17_theta10000","n":2048,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":112658,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":1024,"mutant_caught":true},{"case":"rope_4h_64d_pos17_theta10000","n":256,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":112785,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":128,"mutant_caught":true},{"case":"rope_32h_64d_pos1023_theta500000","n":2048,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":686263,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":1024,"mutant_caught":true},{"case":"rope_8h_64d_pos1023_theta500000","n":512,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":252738,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":256,"mutant_caught":true},{"case":"swiglu_5632","n":5632,"rc":"OK","violations":0,"worst_scaled_err":0.`0196297`,"pass":true,"chip_elapsed_ns":111794,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":5630,"mutant_caught":true},{"case":"swiglu_8192","n":8192,"rc":"OK","violations":0,"worst_scaled_err":0.`0177689`,"pass":true,"chip_elapsed_ns":791031,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":8192,"mutant_caught":true},{"case":"swiglu_1000","n":1000,"rc":"OK","violations":0,"worst_scaled_err":0.017264,"pass":true,"chip_elapsed_ns":112929,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":1000,"mutant_caught":true},{"case":"swiglu_131073","n":131073,"rc":"OK","violations":0,"worst_scaled_err":0.`0236441`,"pass":true,"chip_elapsed_ns":312514,"chip_calls":2,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":131059,"mutant_caught":true},{"case":"swiglu_`1572864`","n":`1572864`,"rc":"OK","violations":0,"worst_scaled_err":0.`0250368`,"pass":true,"chip_elapsed_ns":`2421143`,"chip_calls":12,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":`1572612`,"mutant_caught":true},{"case":"icache_reuse_rotation","n":20,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":`2457286`,"chip_calls":20,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":0,"mutant_caught":true}],"device_opens":1,"checks":43,"failed":0,"verdict":"OMEGA_GPU_ELEMENTWISE_PASS"} evidence/GPU-MUFU-FTZ-`20261116`/run.log new file mode 100644 @@ -0,0 +1,21 @@ 1 +PASS ex2_probe n=4096 rc=OK violations=0 worst_scaled_err=0.152538 chip_ns=138353 calls=1 unwritten=0 | mutant rc=OK violations=4096 CAUGHT 2 +ex2_ftz_probe inputs=217 model_differs_from_ieee=191 host_control_flagged=191 chip_differs_from_ieee=191 boundary_flush=0 3 +PASS ex2_ftz_probe n=217 rc=OK violations=0 worst_scaled_err=0.129999 chip_ns=566885 calls=1 unwritten=0 | mutant rc=OK violations=25 CAUGHT 4 +rsq_ftz_probe inputs=1029 model_differs_from_ieee=8 host_control_flagged=8 chip_differs_from_ieee=8 boundary_flush=0 5 +PASS rsq_ftz_probe n=1029 rc=OK violations=0 worst_scaled_err=0.`0842937` chip_ns=343523 calls=1 unwritten=0 | mutant rc=OK violations=1020 CAUGHT 6 +PASS shared_xchg_probe n=4096 rc=OK violations=0 worst_scaled_err=0 chip_ns=121633 calls=1 unwritten=0 | mutant rc=OK violations=4096 CAUGHT 7 +PASS rmsnorm_4x2048 n=8192 rc=OK violations=0 worst_scaled_err=0.`0244808` chip_ns=114449 calls=1 unwritten=0 | mutant rc=OK violations=8192 CAUGHT 8 +PASS rmsnorm_1x256 n=256 rc=OK violations=0 worst_scaled_err=0.`0206888` chip_ns=567510 calls=1 unwritten=0 | mutant rc=OK violations=256 CAUGHT 9 +PASS rmsnorm_2x8192 n=16384 rc=OK violations=0 worst_scaled_err=0 chip_ns=113553 calls=1 unwritten=0 | mutant rc=OK violations=16384 CAUGHT 10 +PASS rope_32h_64d_pos17_theta10000 n=2048 rc=OK violations=0 worst_scaled_err=0 chip_ns=112658 calls=1 unwritten=0 | mutant rc=OK violations=1024 CAUGHT 11 +PASS rope_4h_64d_pos17_theta10000 n=256 rc=OK violations=0 worst_scaled_err=0 chip_ns=112785 calls=1 unwritten=0 | mutant rc=OK violations=128 CAUGHT 12 +PASS rope_32h_64d_pos1023_theta500000 n=2048 rc=OK violations=0 worst_scaled_err=0 chip_ns=686263 calls=1 unwritten=0 | mutant rc=OK violations=1024 CAUGHT 13 +PASS rope_8h_64d_pos1023_theta500000 n=512 rc=OK violations=0 worst_scaled_err=0 chip_ns=252738 calls=1 unwritten=0 | mutant rc=OK violations=256 CAUGHT 14 +PASS swiglu_5632 n=5632 rc=OK violations=0 worst_scaled_err=0.`0196297` chip_ns=111794 calls=1 unwritten=0 | mutant rc=OK violations=5630 CAUGHT 15 +PASS swiglu_8192 n=8192 rc=OK violations=0 worst_scaled_err=0.`0177689` chip_ns=791031 calls=1 unwritten=0 | mutant rc=OK violations=8192 CAUGHT 16 +PASS swiglu_1000 n=1000 rc=OK violations=0 worst_scaled_err=0.017264 chip_ns=112929 calls=1 unwritten=0 | mutant rc=OK violations=1000 CAUGHT 17 +PASS swiglu_131073 n=131073 rc=OK violations=0 worst_scaled_err=0.`0236441` chip_ns=312514 calls=2 unwritten=0 | mutant rc=OK violations=131059 CAUGHT 18 +PASS swiglu_`1572864` n=`1572864` rc=OK violations=0 worst_scaled_err=0.`0250368` chip_ns=`2421143` calls=12 unwritten=0 | mutant rc=OK violations=`1572612` CAUGHT 19 +PASS icache_reuse_rotation n=20 rc=OK violations=0 worst_scaled_err=0 chip_ns=`2457286` calls=20 unwritten=0 | mutant rc=OK violations=0 CAUGHT 20 +device_opens=1 21 +PASS: 43 checks, 0 failed evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`/README.txt new file mode 100644 @@ -0,0 +1,3 @@ 1 +omega-mv `ebbb089a580a854104ab872d1e9cc42d7077b42b`, fresh clone, GB10 spark-window 20261116T223719Z-a60c94 (exclusive, quiet none: values only, no speed claim) 2 +command: spark-window run ./build/gpu_elementwise_test --out receipt.json 3 +Xid count before 0, after 0 evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`/SHA256SUMS new file mode 100644 @@ -0,0 +1,3 @@ 1 +`7399a1ca24bfb10a32720a3f68aa7e764549cc21e7d426d9543fedcaee404a18` receipt.json 2 +`d274d8995f098c5e82d8dcbaa572450346ba7aad823957d939f209b535fecb99` chip.log 3 +`2908c44948f8a5e272f28e4284cd65bd292ec7028ca906a18a8f7f8c16281f62` README.txt evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`/chip.log new file mode 100644 @@ -0,0 +1,21 @@ 1 +PASS ex2_probe n=4096 rc=OK violations=0 worst_scaled_err=0.152538 chip_ns=151458 calls=1 unwritten=0 | mutant rc=OK violations=4096 CAUGHT 2 +ex2_ftz_probe inputs=217 model_differs_from_ieee=191 host_control_flagged=191 chip_differs_from_ieee=191 boundary_flush=0 3 +PASS ex2_ftz_probe n=217 rc=OK violations=0 worst_scaled_err=0.129999 chip_ns=`1944392` calls=1 unwritten=0 | mutant rc=OK violations=25 CAUGHT 4 +rsq_ftz_probe inputs=1029 model_differs_from_ieee=8 host_control_flagged=8 chip_differs_from_ieee=8 boundary_flush=0 5 +PASS rsq_ftz_probe n=1029 rc=OK violations=0 worst_scaled_err=0.`0842937` chip_ns=111073 calls=1 unwritten=0 | mutant rc=OK violations=1020 CAUGHT 6 +PASS shared_xchg_probe n=4096 rc=OK violations=0 worst_scaled_err=0 chip_ns=116737 calls=1 unwritten=0 | mutant rc=OK violations=4096 CAUGHT 7 +PASS rmsnorm_4x2048 n=8192 rc=OK violations=0 worst_scaled_err=0.`0244808` chip_ns=120546 calls=1 unwritten=0 | mutant rc=OK violations=8192 CAUGHT 8 +PASS rmsnorm_1x256 n=256 rc=OK violations=0 worst_scaled_err=0.`0206888` chip_ns=539175 calls=1 unwritten=0 | mutant rc=OK violations=256 CAUGHT 9 +PASS rmsnorm_2x8192 n=16384 rc=OK violations=0 worst_scaled_err=0 chip_ns=127490 calls=1 unwritten=0 | mutant rc=OK violations=16384 CAUGHT 10 +PASS rope_32h_64d_pos17_theta10000 n=2048 rc=OK violations=0 worst_scaled_err=0 chip_ns=119458 calls=1 unwritten=0 | mutant rc=OK violations=1024 CAUGHT 11 +PASS rope_4h_64d_pos17_theta10000 n=256 rc=OK violations=0 worst_scaled_err=0 chip_ns=125746 calls=1 unwritten=0 | mutant rc=OK violations=128 CAUGHT 12 +PASS rope_32h_64d_pos1023_theta500000 n=2048 rc=OK violations=0 worst_scaled_err=0 chip_ns=122241 calls=1 unwritten=0 | mutant rc=OK violations=1024 CAUGHT 13 +PASS rope_8h_64d_pos1023_theta500000 n=512 rc=OK violations=0 worst_scaled_err=0 chip_ns=117281 calls=1 unwritten=0 | mutant rc=OK violations=256 CAUGHT 14 +PASS swiglu_5632 n=5632 rc=OK violations=0 worst_scaled_err=0.`0196297` chip_ns=`2568367` calls=1 unwritten=0 | mutant rc=OK violations=5630 CAUGHT 15 +PASS swiglu_8192 n=8192 rc=OK violations=0 worst_scaled_err=0.`0177689` chip_ns=83073 calls=1 unwritten=0 | mutant rc=OK violations=8192 CAUGHT 16 +PASS swiglu_1000 n=1000 rc=OK violations=0 worst_scaled_err=0.017264 chip_ns=116673 calls=1 unwritten=0 | mutant rc=OK violations=1000 CAUGHT 17 +PASS swiglu_131073 n=131073 rc=OK violations=0 worst_scaled_err=0.`0236441` chip_ns=`3045077` calls=2 unwritten=0 | mutant rc=OK violations=131059 CAUGHT 18 +PASS swiglu_`1572864` n=`1572864` rc=OK violations=0 worst_scaled_err=0.`0250368` chip_ns=`7115241` calls=12 unwritten=0 | mutant rc=OK violations=`1572612` CAUGHT 19 +PASS icache_reuse_rotation n=20 rc=OK violations=0 worst_scaled_err=0 chip_ns=`5992891` calls=20 unwritten=0 | mutant rc=OK violations=0 CAUGHT 20 +device_opens=1 21 +PASS: 43 checks, 0 failed evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`/receipt.json new file mode 100644 @@ -0,0 +1 @@ 1 +{"schema":"OMEGA_GPU_ELEMENTWISE_V1","tolerances":{"ex2_rel":1e-6,"xchg":"exact","rmsnorm_rel":1e-5,"rmsnorm_abs":1e-6,"rope":"exact","swiglu_rel":1e-5,"swiglu_abs":1e-6,"ex2_ftz":"tests/bw_mufu_ftz.h model; zero, inf, NaN exact; normal results normal and 1e-6 rel; zero allowed within 2^-21 rel above FLT_MIN","rsq_ftz":"tests/bw_mufu_ftz.h model; zero, inf, NaN exact; normal results normal and 1e-6 rel"},"cases":[{"case":"ex2_probe","n":4096,"rc":"OK","violations":0,"worst_scaled_err":0.152538,"pass":true,"chip_elapsed_ns":151458,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":4096,"mutant_caught":true},{"case":"ex2_ftz_probe","n":217,"rc":"OK","violations":0,"worst_scaled_err":0.129999,"pass":true,"chip_elapsed_ns":`1944392`,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":25,"mutant_caught":true,"probe":{"model_differs_from_ieee":191,"host_control_flagged":191,"chip_differs_from_ieee":191,"boundary_flush":0}},{"case":"rsq_ftz_probe","n":1029,"rc":"OK","violations":0,"worst_scaled_err":0.`0842937`,"pass":true,"chip_elapsed_ns":111073,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":1020,"mutant_caught":true,"probe":{"model_differs_from_ieee":8,"host_control_flagged":8,"chip_differs_from_ieee":8,"boundary_flush":0}},{"case":"shared_xchg_probe","n":4096,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":116737,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":4096,"mutant_caught":true},{"case":"rmsnorm_4x2048","n":8192,"rc":"OK","violations":0,"worst_scaled_err":0.`0244808`,"pass":true,"chip_elapsed_ns":120546,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":8192,"mutant_caught":true},{"case":"rmsnorm_1x256","n":256,"rc":"OK","violations":0,"worst_scaled_err":0.`0206888`,"pass":true,"chip_elapsed_ns":539175,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":256,"mutant_caught":true},{"case":"rmsnorm_2x8192","n":16384,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":127490,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":16384,"mutant_caught":true},{"case":"rope_32h_64d_pos17_theta10000","n":2048,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":119458,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":1024,"mutant_caught":true},{"case":"rope_4h_64d_pos17_theta10000","n":256,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":125746,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":128,"mutant_caught":true},{"case":"rope_32h_64d_pos1023_theta500000","n":2048,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":122241,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":1024,"mutant_caught":true},{"case":"rope_8h_64d_pos1023_theta500000","n":512,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":117281,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":256,"mutant_caught":true},{"case":"swiglu_5632","n":5632,"rc":"OK","violations":0,"worst_scaled_err":0.`0196297`,"pass":true,"chip_elapsed_ns":`2568367`,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":5630,"mutant_caught":true},{"case":"swiglu_8192","n":8192,"rc":"OK","violations":0,"worst_scaled_err":0.`0177689`,"pass":true,"chip_elapsed_ns":83073,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":8192,"mutant_caught":true},{"case":"swiglu_1000","n":1000,"rc":"OK","violations":0,"worst_scaled_err":0.017264,"pass":true,"chip_elapsed_ns":116673,"chip_calls":1,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":1000,"mutant_caught":true},{"case":"swiglu_131073","n":131073,"rc":"OK","violations":0,"worst_scaled_err":0.`0236441`,"pass":true,"chip_elapsed_ns":`3045077`,"chip_calls":2,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":131059,"mutant_caught":true},{"case":"swiglu_`1572864`","n":`1572864`,"rc":"OK","violations":0,"worst_scaled_err":0.`0250368`,"pass":true,"chip_elapsed_ns":`7115241`,"chip_calls":12,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":`1572612`,"mutant_caught":true},{"case":"icache_reuse_rotation","n":20,"rc":"OK","violations":0,"worst_scaled_err":0,"pass":true,"chip_elapsed_ns":`5992891`,"chip_calls":20,"unwritten_words":0,"mutant_rc":"OK","mutant_violations":0,"mutant_caught":true}],"device_opens":1,"checks":43,"failed":0,"verdict":"OMEGA_GPU_ELEMENTWISE_PASS"} gpu/nvidia/checks/README.md @@ -87,7 +87,7 @@ Not retired from `tools/extract`: `audit-scan.sh`, its rule files `rules-secrets 87 87 88 88 ## Oracles 89 89 90 -Kept outside the repository by the lane, identified by sha256. Each was run from a CUDApp checkout at ``84b524cadaaa8bc9b556adfaea9d6dd2e0d67a66``, writing the table to stdout. 90 +Kept outside the repository by the lane, identified by sha256. Each was run from a CUDApp checkout at ``84b524cadaaa8bc9b556adfaea9d6dd2e0d67a66``, writing the table to stdout, except `bwhz_oracle.c`, which was run from an omega-mv checkout at ``50feb135306176947a999362dd637d37c907f6fc`` (its `src/omega_bw_hazard.c` is the fixed C of ``60b5d81e``). 91 91 92 92 | Oracle | sha256 | Writes | Build (run with no arguments) | 93 93 |---|---|---|---| @@ -144,6 +144,7 @@ Kept outside the repository by the lane, identified by sha256. Each was run from 144 144 | `build.sh` (arest) | ``f9be743bee2689b6679f9557d16fb5ad8da53723b6808f7e6db2f0f03bbed73c`` | every arest table | `sh build.sh OUTDIR` from the CUDApp root: `cc -O2 -std=gnu11 -ffp-contract=off -Isrc` the oracle alone with `CUDAPP_MIGRATION_PENDING_C_API_SHELLS`, so every `omega_api_*` of `src/omega_api_shells.h` is the pending C and no Omega is linked; then one run that writes every table | 145 145 | `apish_oracle.c` | ``c8ae104d3a097f3d5978af423122fcd1e17a3b65a7ac4927ae2d230dbc7c059a`` | `apish.tsv`, `apish-blk.tsv`, `apish-fp8x.tsv`, `apish-fp8xb.tsv` | built and run by the apish `build.sh` | 146 146 | `build.sh` (apish) | ``1924515d50ace7f3f26ca7221f86fac8d8ccfadcef30f0c311b0e13605f063d5`` | the four apish tables | `sh build.sh OUTDIR` from the CUDApp root: `cc -std=gnu11 -O2 -ffp-contract=off -ffunction-sections -fdata-sections -Isrc` the oracle, the test's own pending C `tests/api_shells_oracle.c` unchanged, and `src/omega_fp8_slot_table.c` with `CUDAPP_MIGRATION_PENDING_C_API_SHELLS` and `CUDAPP_MIGRATION_PENDING_API_VIEWS_REST=1` (its pending C branch), linked with `--gc-sections` so the table's query and stats entries, which the test never calls and which name Omega copy units, are dropped; no Omega is linked | 147 +| `bwhz_oracle.c` | ``887d0fa25019178498a0726049a92d2a32d5090a41c496395d9d4891997bb468`` | `bwhz.tsv`; with the argument `k`, the whole-check rows `bwhz-k.tsv` | `gcc -std=gnu11 -O1 -Wall -fsanitize=undefined -fno-sanitize-recover=all -Isrc -o bwhz_oracle bwhz_oracle.c` from the omega-mv root (the oracle includes `src/omega_bw_hazard.c`, for its static `pmin`); no Omega is linked. Kept in the DRA-606 lane records (`~/handoffs/omega-home-`20261116`/linear/DRA-606/oracle/` on the Spark) | 147 148 148 149 Which rows are the C's answers: 149 150 @@ -173,6 +174,7 @@ Which rows are the C's answers: 173 174 - `avtab-k.tsv`: every row. The `hmap` rows of the same oracle output with the mutant flag set and 0 < query heads < kv heads. The unit traps on the first row; the repaired unit gives every C answer. 174 175 - `arest-UNIT.tsv` and `arest-CHECK.tsv`: every row. `arest_oracle.c` is every block of `tests/api_rest_diff.c` and `tests/api_rest_partitions.h` with each `EQ` turned into a row: the inputs of the call and the answers the test expects, from its own expressions, from the pending C of `src/omega_api_shells.h` it calls (`omega_api_tcsp`, `omega_api_tgspec`, `omega_api_wok`, `omega_api_swsrc`, `omega_api_segend`, `omega_api_segb`, `omega_api_lane`, `omega_api_fp8mt`, `omega_api_fp8_defaults`, `omega_api_isnanb`, `omega_api_xfold`, `omega_api_xfold16`, `omega_api_scalef`, `omega_api_refb`, `omega_api_slot`) and from the retained C fragment packers. A row of a loop the test runs is one call: a `steps()` row holds the state the loop has before the call, and an `arnext` or `arxnext` row with its flag set continues from the state the row before it left, as the test's loop does, so those rows depend on their order. Where the test fills an array by a loop and compares the whole output, the row holds the loop's parameters and one digest of the expected output (FNV-1a over whole elements); the check ports the fill loop and digests what the unit wrote. Where the test's output array is not set before the call, the check fills it first with a value no expected element has (or, for the two byte copies, runs the call into all-0 and into all-255 bytes), so an element the unit leaves unwritten fails; where the test zeroes it first (`cg_pkh`, `arpfrat`), so does the check. The test's `omega_fp32_to_bf16` is Omega in the default build, so the oracle uses the retained C integer form `frag_f32_to_bf16` and stops if the compiler's own `(__bf16)` cast disagrees on any value that is not a NaN. `arest-pfhost.tsv` is `tests/test_prefill_host_rest.c` the same way: its register policy pairs are rows, and its float-class loop is one digest of the counts for every n, with four of the counts as rows of their own. 175 176 - `apish.tsv`, `apish-blk.tsv`, `apish-fp8x.tsv`, `apish-fp8xb.tsv`: every row. `apish_oracle.c` is `tests/api_shells_diff.c` with its Omega side taken out: each `eq_u32`, `eq_i` and `eq_u64` of the test keeps only the pending C answer (the `c_` functions of `tests/api_shells_oracle.c`) and adds it to the digest of its label. A row is a label, the number of comparisons under it, and the digest of the C answers in the test's order; the last row, `total`, is the number of all comparisons and the number of labels. Where the test called a C shell over the units (`omega_fp8_pack_scan_nan`, `omega_fp8_pack_scales`, the slot table), the oracle runs that shell's pending C branch and stops unless it gives the constant the test expects. 177 +- `bwhz.tsv`: every row. `bwhz_oracle.c` calls `omega_bw_decode` on the three forged control words of `tests/bw_hazard_test.c` (barrier 6 in the write field, the read field and both), on every write and read barrier pair 0 to 7 for S2R and LDG, and on random instructions over every opcode the decoder knows and some it does not, with both barrier fields drawn from 0 to 7, and prints whether it refused and, when it did not, the write barrier, read barrier and wait mask (`d` rows). The `j`, `l` and `w` rows are the C's pc tag expressions of `step()` and `join()` (the join, the late reader and the tag an entry keeps after a wait), on the C's own `pmin`, over tags and masks that cover 0, equal values, both orders and the extremes. 176 178 177 179 ## Checks 178 180 @@ -203,6 +205,7 @@ Which rows are the C's answers: 203 205 | `arestdata`, `arestpack`, `aresttile`, `aresttern`, `arestcalc`, `arestbf16`, `arestcopy`, `arestgseg`, `arestsstats`, `arestxnext`, `arestgath32`, `arestgath16`, `arestpkh`, `arestmrow` | the `packing()` and `prefill()` blocks of `tests/api_rest_diff.c` and the partitions of `tests/api_rest_partitions.h` (`data_parts`, `tile_parts`, `state_parts`, `calc_parts`, `misc_parts`, `slot_parts`); the `window` calls of `misc_parts` are rows of `arestmstep` | `arestdata`: `arfill`, `arcount`, `arargs`, `arpad`, `aridle`, `arroute`, `arperm`, `arwiden`, `arnext`, `arkey`, `arpfcopy`, `arpfrat`, `arsegok`, `arsegb`, `argspec`, `arslot`, `arsgate` over `apirest/data.om`. `arestpack`: `arnan`, `arscale`, `arfold`, `arfoldh`, `aracc`, `armag` over `apirest/pack.om`. `aresttile`: `argroups`, `arrun`, `artiles`, `artile`, `artg`, `argtile` over `apirest/tiledata.om`. `aresttern`: `artern`, `artrits`, `arrev` over `apirest/terndata.om`. `arestcalc`: `arcalc`, ops 0 to 13. `arestbf16`: `ar_bf16`, `artcperm`. `arestcopy`, `arestgseg`, `arestsstats`, `arestxnext`, `arestgath32`, `arestgath16`: the unit of that name. `arestpkh`: `cg_pklen` and `cg_pkh` of `gpu/nvidia/om/codegen/`. `arestmrow`: `mrow` of `codegen/cg_mrow.om`. Units of one head share a check, because a program has one dialect line. | Nothing of the test's calls: every `EQ` of the two files is a row or part of one. The seven mutants of `tests/api_rest_mutants.py` are rows of `mutants.tsv`; two of them are written differently, because as written they end the Omega check with trap 105 (a checked conversion), which the gate does not count as a caught mutant: `launch-low-half` and `slot-pin-wrap` drop the low-half mask there, and here the mask loses its lowest bit instead. A row's arrays are local arrays, so the sizes are the test's own (at most 65537 elements, 384 by 384 bytes for the prefill copy); a larger row is refused as a malformed table (exit 2). `tests/api_rest_run.sh` only built and ran the test. | 204 206 | `arestpfhost` | `tests/test_prefill_host_rest.c` | `gpu/nvidia/om/apirest/pfhost.om` (`pfreg` through the root `arpfreg` of `pfreg.om`, and `pfcount`) | Nothing: every pair of its register policy loop is a row, and the counts of its float-class loop are one digest row, with four counts as rows of their own. | 205 207 | `apish`, `apishblk`, `apishfp8x`, `apishfp8xb` | `tests/api_shells_diff.c` (its pending C side is `tests/api_shells_oracle.c`) | `apish`: `gpu/nvidia/om/api/apish_shp.om` (`apishp`, ops 1 to 61), `apish_pack.om` (`apishk`, ops 1 to 6), `apish_slot.om` (`apishl`), `apish_trit.om` (`apishr`), and through the C shells' calls `arnan`, `arscale` and `arslot` of `gpu/nvidia/om/apirest/`. `apishblk`: `apish_blk.om` (`apishb`), which has its own `refb`. `apishfp8x`, `apishfp8xb`: `av_fp8x` and `av_fp8xb` of `gpu/nvidia/om/apiviews/`, each with its own head. | Nothing of the test's comparisons: each is under its label, and the `total` row of each table holds the number of comparisons and of labels. The op numbers, argument orders and casts of the C header `src/omega_api_shells.h` are ported in `apish.om` (`xp`, `xk`, `as3`, `asi`, `as6`). The slot table block is ported as the `arslot` calls `src/omega_fp8_slot_table.c` makes; its idle test uses op 6 for each slot, the form of that file's pending branch (`aridle`, which the default build calls, is checked by `arestdata`). The C table's locks, NULL and range refusals are C-binding only. Two of the test's inputs are weak, and the port keeps them as they are: `block` and `block0` both answer one NaN whatever the weights and the scale (the test's bytes hold NaN codes and non-finite floats), so `apishblk` shows only that `apishb` returns that NaN, whose bit pattern is the one AArch64 arithmetic gives; and `trit` is given a non-trit byte, so only its refusal is seen. The test's `neg-control` (a flipped answer must differ from the C answer) is kept as the flipped value; the gate's table control does that job. The eight mutants of `tests/api_shells_mutants.py` are rows of `mutants.tsv`: five are the same one-line change, and three (lane, slot, dsplit) are stand-in mutants at the same site, changing the condition above the answer line the Python changed, because that answer line is not one unique line of the unit. The `apish-lib.om` row of `mutants.tsv` changes the check's own sign extension: it shows the check reads the sign of an answer, and says nothing about a unit. | 208 +| `bwhz` | the decode half of `tests/bw_hazard_test.c` `test_controls` (the barrier 6 refusal of DRA-606) | `gpu/nvidia/om/codegen/bw_hazard.om` with `bw_hazard_dec.om`: `hz_dec` (which is `hz_dec1`, the decode `hz_chk` runs on every reachable instruction), and the pc tag rules `hz_chk` uses for the smallest `src_pc` of DRA-606: `hz_jtag` (the join), `hz_ltag` (a late reader) and `hz_wtag` (an entry after a wait) | `hz_chk`, the whole check: its wire is a `3203584`-word `edit` view, and a program can neither hold that in local arrays (error 23, locals over 4 MiB) nor pass a global (error 19). The walk around the tag rules is therefore not run here. For DRA-606 it was compared outside the tree: lowered to C by omega-bridge as CUDApp `om/units.sh` lowers it and linked with CUDApp's wrapper `src/omega_bw_hazard.c`, it gives the fixed C's answer on all 1205 kernels of `bwhz_oracle.c k` (findings and their smallest `src_pc`) once the C is given the port's ATOMG register width (below); the lane records hold the commands and outputs. Known difference, not a `K` row because the check does not reach it: for ATOMG with size field (word 2 bits 9 to 11) 2 or 3 the port reads and writes two registers for Rd and Rb (`hz_atn`), the C one. | 206 209 207 210 Known differences. A `K` row of a check's table is an input on which the unit and the pending C answer differently. It records both answers, and the row passes only while the unit still gives its recorded answer and the recorded C answer still differs from it, so a change on either side fails the gate. The C answer comes from the oracle when the table is made; the unit's answer was recorded when the check first met the input. Nothing here changes either side: which answer is the contract is the unit owner's decision. 208 211 gpu/nvidia/checks/bwhz.om new file mode 100644 @@ -0,0 +1,101 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note gpu/nvidia/checks/bwhz.om: the scoreboard hazard checker of gpu/nvidia/om/codegen/bw_hazard.om and 3 +note bw_hazard_dec.om against the C it succeeds, src/omega_bw_hazard.c at `60b5d81e` (DRA-606: a scoreboard barrier 4 +note field holding 6 is refused, either field; src_pc is the smallest producer pc, whatever the visit order). 5 +note Composed after bw_hazard.om, bw_hazard_dec.om and gpu/nvidia/checks/lib.om; run with gpu/nvidia/checks/bwhz.tsv. 6 +note Rows, lowercase hex: 7 +note d WORDS RC WBAR RBAR WAIT: hz_dec of the 16 bytes WORDS refuses (-1) exactly when RC is 1, and otherwise 8 +note gives the write barrier, read barrier and wait mask of the C decode (record words 4, 5, 6). The oracle writes 9 +note 0 0 0 for a refused row, and a refused row passes only with those zeros, so every byte of every row is read 10 +note (the gate's table control changes the last byte of the first row, a refused one). 11 +note j DT SV ST TAG: hz_jtag, the join's pc tag. l R RT PC TAG: hz_ltag, a late reader's. w V T TAG: hz_wtag, the 12 +note tag of an entry after a wait. TAG is the C's expression on its own pmin (bwhz_oracle.c, README.md Oracles). 13 +note The whole check, hz_chk, takes a `3203584`-word wire: more than a program may hold in local arrays, and a global 14 +note is never an argument, so it is not run here; README.md (bwhz) says how it was compared with the C. 15 +text t_name "BWHZ" 16 +fn cname to void 17 +for i ulong len t_name bound 64 18 +ckoc ulong get t_name i 19 +end 20 +end 21 +fn bzx i ulong to ulong 22 +n = cklen i 23 +if or eq n 0 gt n 16 24 +ckbad 25 +end 26 +v = ulong 0 27 +for j ulong n bound 16 28 +v = or shl v 4 cknib ckch i j 29 +end 30 +ret v 31 +end 32 +fn crow to bool 33 +if ne cklen 0 1 34 +ckbad 35 +end 36 +k = ckch 0 0 37 +if eq k 106 38 +ret crowj 39 +end 40 +if eq k 108 41 +ret crowl 42 +end 43 +if eq k 119 44 +ret crowt 45 +end 46 +if ne k 100 47 +ckbad 48 +end 49 +ret crowd 50 +end 51 +fn crowd to bool 52 +if ne ckcnt 6 53 +ckbad 54 +end 55 +if ne ckhexn 1 16 56 +ckbad 57 +end 58 +b = new uchar 16 0 59 +d = new ulong 24 0 60 +for j ulong 16 61 +put b j uchar ckhex 1 j 62 +end 63 +rc = hz_dec b d 64 +rr = bzx 2 65 +if gt rr 1 66 +ckbad 67 +end 68 +if eq rr 1 69 +ok = eq rc long -1 70 +ok = and ok eq bzx 3 0 71 +ok = and ok eq bzx 4 0 72 +ret and ok eq bzx 5 0 73 +end 74 +if ne rc 0 75 +ret false 76 +end 77 +ok = eq get d 4 bzx 3 78 +ok = and ok eq get d 5 bzx 4 79 +ret and ok eq get d 6 bzx 5 80 +end 81 +fn crowj to bool 82 +if ne ckcnt 5 83 +ckbad 84 +end 85 +t = hz_jtag bzx 1 bzx 2 bzx 3 86 +ret eq t bzx 4 87 +end 88 +fn crowl to bool 89 +if ne ckcnt 5 90 +ckbad 91 +end 92 +t = hz_ltag bzx 1 bzx 2 bzx 3 93 +ret eq t bzx 4 94 +end 95 +fn crowt to bool 96 +if ne ckcnt 4 97 +ckbad 98 +end 99 +t = hz_wtag bzx 1 bzx 2 100 +ret eq t bzx 3 101 +end gpu/nvidia/checks/bwhz.tsv new file mode 100644 @@ -0,0 +1,1969 @@ 1 +# gpu/nvidia/checks/bwhz.tsv: written by bwhz_oracle.c against omega-mv src/omega_bw_hazard.c at `60b5d81e` 2 +# (DRA-606; see gpu/nvidia/checks/README.md, Oracles); do not edit by hand. 3 +d `19790100000000000000000000800d00` 1 0 0 0 4 +d `19790100000000000000000000800f00` 1 0 0 0 5 +d `19790100000000000000000000c00d00` 1 0 0 0 6 +d `1979010000000000000000000002f003` 0 0 0 3f 7 +d `81790402000000000001000000020000` 0 0 0 0 8 +d `1979010000000000000000000002f203` 0 0 1 3f 9 +d `81790402000000000001000000020200` 0 0 1 0 10 +d `1979010000000000000000000002f403` 0 0 2 3f 11 +d `81790402000000000001000000020400` 0 0 2 0 12 +d `1979010000000000000000000002f603` 0 0 3 3f 13 +d `81790402000000000001000000020600` 0 0 3 0 14 +d `1979010000000000000000000002f803` 0 0 4 3f 15 +d `81790402000000000001000000020800` 0 0 4 0 16 +d `1979010000000000000000000002fa03` 0 0 5 3f 17 +d `81790402000000000001000000020a00` 0 0 5 0 18 +d `1979010000000000000000000002fc03` 1 0 0 0 19 +d `81790402000000000001000000020c00` 1 0 0 0 20 +d `1979010000000000000000000002fe03` 0 0 7 3f 21 +d `81790402000000000001000000020e00` 0 0 7 0 22 +d `1979010000000000000000000042f003` 0 1 0 3f 23 +d `81790402000000000001000000420000` 0 1 0 0 24 +d `1979010000000000000000000042f203` 0 1 1 3f 25 +d `81790402000000000001000000420200` 0 1 1 0 26 +d `1979010000000000000000000042f403` 0 1 2 3f 27 +d `81790402000000000001000000420400` 0 1 2 0 28 +d `1979010000000000000000000042f603` 0 1 3 3f 29 +d `81790402000000000001000000420600` 0 1 3 0 30 +d `1979010000000000000000000042f803` 0 1 4 3f 31 +d `81790402000000000001000000420800` 0 1 4 0 32 +d `1979010000000000000000000042fa03` 0 1 5 3f 33 +d `81790402000000000001000000420a00` 0 1 5 0 34 +d `1979010000000000000000000042fc03` 1 0 0 0 35 +d `81790402000000000001000000420c00` 1 0 0 0 36 +d `1979010000000000000000000042fe03` 0 1 7 3f 37 +d `81790402000000000001000000420e00` 0 1 7 0 38 +d `1979010000000000000000000082f003` 0 2 0 3f 39 +d `81790402000000000001000000820000` 0 2 0 0 40 +d `1979010000000000000000000082f203` 0 2 1 3f 41 +d `81790402000000000001000000820200` 0 2 1 0 42 +d `1979010000000000000000000082f403` 0 2 2 3f 43 +d `81790402000000000001000000820400` 0 2 2 0 44 +d `1979010000000000000000000082f603` 0 2 3 3f 45 +d `81790402000000000001000000820600` 0 2 3 0 46 +d `1979010000000000000000000082f803` 0 2 4 3f 47 +d `81790402000000000001000000820800` 0 2 4 0 48 +d `1979010000000000000000000082fa03` 0 2 5 3f 49 +d `81790402000000000001000000820a00` 0 2 5 0 50 +d `1979010000000000000000000082fc03` 1 0 0 0 51 +d `81790402000000000001000000820c00` 1 0 0 0 52 +d `1979010000000000000000000082fe03` 0 2 7 3f 53 +d `81790402000000000001000000820e00` 0 2 7 0 54 +d `19790100000000000000000000c2f003` 0 3 0 3f 55 +d `81790402000000000001000000c20000` 0 3 0 0 56 +d `19790100000000000000000000c2f203` 0 3 1 3f 57 +d `81790402000000000001000000c20200` 0 3 1 0 58 +d `19790100000000000000000000c2f403` 0 3 2 3f 59 +d `81790402000000000001000000c20400` 0 3 2 0 60 +d `19790100000000000000000000c2f603` 0 3 3 3f 61 +d `81790402000000000001000000c20600` 0 3 3 0 62 +d `19790100000000000000000000c2f803` 0 3 4 3f 63 +d `81790402000000000001000000c20800` 0 3 4 0 64 +d `19790100000000000000000000c2fa03` 0 3 5 3f 65 +d `81790402000000000001000000c20a00` 0 3 5 0 66 +d `19790100000000000000000000c2fc03` 1 0 0 0 67 +d `81790402000000000001000000c20c00` 1 0 0 0 68 +d `19790100000000000000000000c2fe03` 0 3 7 3f 69 +d `81790402000000000001000000c20e00` 0 3 7 0 70 +d `1979010000000000000000000002f103` 0 4 0 3f 71 +d `81790402000000000001000000020100` 0 4 0 0 72 +d `1979010000000000000000000002f303` 0 4 1 3f 73 +d `81790402000000000001000000020300` 0 4 1 0 74 +d `1979010000000000000000000002f503` 0 4 2 3f 75 +d `81790402000000000001000000020500` 0 4 2 0 76 +d `1979010000000000000000000002f703` 0 4 3 3f 77 +d `81790402000000000001000000020700` 0 4 3 0 78 +d `1979010000000000000000000002f903` 0 4 4 3f 79 +d `81790402000000000001000000020900` 0 4 4 0 80 +d `1979010000000000000000000002fb03` 0 4 5 3f 81 +d `81790402000000000001000000020b00` 0 4 5 0 82 +d `1979010000000000000000000002fd03` 1 0 0 0 83 +d `81790402000000000001000000020d00` 1 0 0 0 84 +d `1979010000000000000000000002ff03` 0 4 7 3f 85 +d `81790402000000000001000000020f00` 0 4 7 0 86 +d `1979010000000000000000000042f103` 0 5 0 3f 87 +d `81790402000000000001000000420100` 0 5 0 0 88 +d `1979010000000000000000000042f303` 0 5 1 3f 89 +d `81790402000000000001000000420300` 0 5 1 0 90 +d `1979010000000000000000000042f503` 0 5 2 3f 91 +d `81790402000000000001000000420500` 0 5 2 0 92 +d `1979010000000000000000000042f703` 0 5 3 3f 93 +d `81790402000000000001000000420700` 0 5 3 0 94 +d `1979010000000000000000000042f903` 0 5 4 3f 95 +d `81790402000000000001000000420900` 0 5 4 0 96 +d `1979010000000000000000000042fb03` 0 5 5 3f 97 +d `81790402000000000001000000420b00` 0 5 5 0 98 +d `1979010000000000000000000042fd03` 1 0 0 0 99 +d `81790402000000000001000000420d00` 1 0 0 0 100 +d `1979010000000000000000000042ff03` 0 5 7 3f 101 +d `81790402000000000001000000420f00` 0 5 7 0 102 +d `1979010000000000000000000082f103` 1 0 0 0 103 +d `81790402000000000001000000820100` 1 0 0 0 104 +d `1979010000000000000000000082f303` 1 0 0 0 105 +d `81790402000000000001000000820300` 1 0 0 0 106 +d `1979010000000000000000000082f503` 1 0 0 0 107 +d `81790402000000000001000000820500` 1 0 0 0 108 +d `1979010000000000000000000082f703` 1 0 0 0 109 +d `81790402000000000001000000820700` 1 0 0 0 110 +d `1979010000000000000000000082f903` 1 0 0 0 111 +d `81790402000000000001000000820900` 1 0 0 0 112 +d `1979010000000000000000000082fb03` 1 0 0 0 113 +d `81790402000000000001000000820b00` 1 0 0 0 114 +d `1979010000000000000000000082fd03` 1 0 0 0 115 +d `81790402000000000001000000820d00` 1 0 0 0 116 +d `1979010000000000000000000082ff03` 1 0 0 0 117 +d `81790402000000000001000000820f00` 1 0 0 0 118 +d `19790100000000000000000000c2f103` 0 7 0 3f 119 +d `81790402000000000001000000c20100` 0 7 0 0 120 +d `19790100000000000000000000c2f303` 0 7 1 3f 121 +d `81790402000000000001000000c20300` 0 7 1 0 122 +d `19790100000000000000000000c2f503` 0 7 2 3f 123 +d `81790402000000000001000000c20500` 0 7 2 0 124 +d `19790100000000000000000000c2f703` 0 7 3 3f 125 +d `81790402000000000001000000c20700` 0 7 3 0 126 +d `19790100000000000000000000c2f903` 0 7 4 3f 127 +d `81790402000000000001000000c20900` 0 7 4 0 128 +d `19790100000000000000000000c2fb03` 0 7 5 3f 129 +d `81790402000000000001000000c20b00` 0 7 5 0 130 +d `19790100000000000000000000c2fd03` 1 0 0 0 131 +d `81790402000000000001000000c20d00` 1 0 0 0 132 +d `19790100000000000000000000c2ff03` 0 7 7 3f 133 +d `81790402000000000001000000c20f00` 0 7 7 0 134 +d `0070040c09000000ff000000004a0f00` 1 0 0 0 135 +d `ff0fff090d000000ff01000800c80900` 1 0 0 0 136 +d `24720a0c0d0000000201000000c00500` 0 7 2 0 137 +d `ac770d05090000000c02000000c00f00` 0 7 7 0 138 +d `0b72080705000000030d0000005c0f00` 0 5 7 0 139 +d `1979ff0c0e0000000000000000cc0100` 0 7 0 0 140 +d `0c7c020c020000000a00000800de0100` 0 7 0 0 141 +d `8139ff0d07000000000b000000d60b00` 0 7 5 0 142 +d `a879010c010000000201000000c80c00` 1 0 0 0 143 +d `45790704020000000502000800040700` 0 4 3 0 144 +d `4d7909ff0700000004060000000c0a00` 0 0 5 0 145 +d `27120b0d0200000003030000005a0e00` 0 1 7 0 146 +d `05130d08020000000e070008000a0700` 0 4 3 0 147 +d `a8790c050300000004020000009a0b00` 1 0 0 0 148 +d `08720901050000000307000000c00b00` 0 7 5 0 149 +d `2371030b050000000c010000001e9001` 1 0 0 0 150 +d `1979050b070000000100000000160f00` 0 4 7 0 151 +d `8869070b06000000ff0f000800d80400` 1 0 0 0 152 +d `3c720a000b0000000001000000840e00` 0 2 7 0 153 +d `247c0e0807000000030e000000dc0700` 0 7 3 0 154 +d `887307020a0000000000000000c00900` 0 7 4 0 155 +d `84090409040000000308000000c22101` 0 7 0 12 156 +d `19490c0603000000000000000056af03` 0 5 7 3a 157 +d `4d390506010000000e00000000c4b600` 0 3 3 b 158 +d `88330304ff0000000908000000c60a00` 0 3 5 0 159 +d `20720906080000000c06000800ce0a00` 0 3 5 0 160 +d `927905ff010000000b00000800062103` 0 4 0 32 161 +d `087301030a0000000401000000c60a00` 0 3 5 0 162 +d `3e720e09090000000901000000c47b00` 0 7 5 7 163 +d `19790d0507000000030e000000120d00` 1 0 0 0 164 +d `8409ff09000000000400000000580a00` 0 1 5 0 165 +d `3e72040a060000000b01000800580000` 0 1 0 0 166 +d `12720a0309000000040100080090c403` 0 2 2 3c 167 +d `47590800000000000100000000d00500` 0 7 2 0 168 +d `8873000505000000070e000000140400` 1 0 0 0 169 +d `452906070b0000000b000000001a4d03` 1 0 0 0 170 +d `1809040702000000050c000800140e00` 0 0 7 0 171 +d `1959020e050000000401000800120a00` 0 0 5 0 172 +d `1979030c0a0000000b00000000400200` 0 1 1 0 173 +d `08730cff040000000400000800960500` 1 0 0 0 174 +d `0c7c0608000000000d05000800060300` 0 4 1 0 175 +d `0c720d06040000000300000000d60f00` 0 7 7 0 176 +d `0b720901020000000801000000160f00` 0 4 7 0 177 +d `1879040d060000000400000800c00100` 0 7 0 0 178 +d `1979070a00000000050c000000100000` 0 0 0 0 179 +d `08730a02ff0000000c0d00000048f502` 0 5 2 2f 180 +d `a8790308090000000308000000960700` 1 0 0 0 181 +d `417902040b000000070f000000d20700` 0 7 3 0 182 +d `19790603080000000300000000d60300` 0 7 1 0 183 +d `19790a050700000003000000008a0400` 0 2 2 0 184 +d `19780802ff0000000500000000de0700` 0 7 3 0 185 +d `1979060606000000010b000000420400` 0 1 2 0 186 +d `19720c0a05000000ff00000000100900` 0 4 4 0 187 +d `2052000e0b0000000801000000d00e00` 0 3 7 0 188 +d `08020b0d000000000300000000040500` 0 4 2 0 189 +d `7a2202ff050000000000000000ca0f00` 0 7 7 0 190 +d `ac770d070a00000005010008004e0a00` 0 1 5 0 191 +d `887307ffff0000000301000000040700` 0 4 3 0 192 +d `454203040d000000010e000000560a00` 0 1 5 0 193 +d `21720d0a0c0000000600000800c40e00` 0 3 7 0 194 +d `47790c000000000004070000005e0100` 0 5 0 0 195 +d `197903050e000000ff0a000800d60000` 0 3 0 0 196 +d `23710e0804000000000b000000420d00` 1 0 0 0 197 +d `8f790501080000000c000000004e0b00` 0 5 5 0 198 +d `a829020c0a0000000c0f000000d40000` 0 3 0 0 199 +d `19790602050000000501000800580000` 0 1 0 0 200 +d `897f0802ff0000000300000000c60c00` 1 0 0 0 201 +d `19390407070000000401000000c00801` 0 3 4 10 202 +d `19790d0806000000ff010000001e0000` 0 0 0 0 203 +d `1979ff040a00000007000008001a9202` 0 0 1 29 204 +d `19790000060000000a04000800420200` 0 1 1 0 205 +d `237208080b0000000401000800040b00` 0 4 5 0 206 +d `1979090905000000040a000800040400` 0 0 2 0 207 +d `18390b0eff0000000d01000000580e00` 0 1 7 0 208 +d `19390008070000000800000800d00100` 0 7 0 0 209 +d `7a72090709000000000e000000d00f00` 0 7 7 0 210 +d `0b72010a000000000800000000860f00` 1 0 0 0 211 +d `8179040eff0000000900000000de0f00` 0 7 7 0 212 +d `1d5b0c03060000000601000800940400` 0 2 2 0 213 +d `4572020a060000000c00000000ce7903` 0 7 4 37 214 +d `23720eff0500000003080008009e0500` 1 0 0 0 215 +d `0c7200000c0000000c0000000002f401` 0 0 2 1f 216 +d `107209030400000005010000009c0800` 0 2 4 0 217 +d `ac770802ff0000000d0a000000c20c00` 1 0 0 0 218 +d `ac770e05070000000405000000de0900` 0 7 4 0 219 +d `8f39ff02090000000b00000000080700` 0 4 3 0 220 +d `927906050c0000000406000000d40000` 0 3 0 0 221 +d `25780d010e00000008030000008a0e00` 0 2 7 0 222 +d `19790c090200000007010000005c0200` 0 1 1 0 223 +d `0c72070e060000000a00000800120300` 0 4 1 0 224 +d `12720702010000000c00000800de2700` 0 7 3 2 225 +d `47390c00000000000401000000120d00` 1 0 0 0 226 +d `19790e0c0b0000000c00000000400f02` 0 5 7 20 227 +d `897f0809090000000307000000180c00` 1 0 0 0 228 +d `19790d0d0a0000000000000800020100` 0 4 0 0 229 +d `08730a0602000000010000080042d303` 0 5 1 3d 230 +d `84790500050000000c0a000000160300` 0 4 1 0 231 +d `1978ff0500000000030d000800c20200` 0 3 1 0 232 +d `84790606010000000309000000c88000` 0 3 0 8 233 +d `197901000d0000000408000000cc5d01` 1 0 0 0 234 +d `81790e00020000000a0d000800c00000` 0 3 0 0 235 +d `4d79050e090000000401000800420f00` 0 5 7 0 236 +d `897f0904020000000c06000000ca8701` 0 7 3 18 237 +d `09720a0d010000000201000000060f00` 0 4 7 0 238 +d `27720a04030000000200000800900f00` 1 0 0 0 239 +d `057307040a00000007000000000e0e00` 0 0 7 0 240 +d `21420e0207000000ff01000800860600` 0 2 3 0 241 +d `19790503030000000100000000966f02` 1 0 0 0 242 +d `247206090c0000000400000000de0800` 0 3 4 0 243 +d `84790907000000000401000000803702` 1 0 0 0 244 +d `197904020b000000ff000008008a0400` 0 2 2 0 245 +d `47790400000000000d0a000800c28b01` 0 7 5 18 246 +d `3c720c0c050000000c01000000c20d00` 1 0 0 0 247 +d `19790dff000000000a00000000180300` 0 4 1 0 248 +d `893f0708000000000908000000c80f00` 0 7 7 0 249 +d `7a320108020000000406000800dc0500` 0 7 2 0 250 +d `05730c030d00000000000008009e0800` 0 2 4 0 251 +d `09720e04000000000500000000cafd03` 1 0 0 0 252 +d `0b620204ff0000000501000800cc0300` 0 7 1 0 253 +d `0872060aff000000060d000800d40000` 0 3 0 0 254 +d `2062ff0b080000000d0c0000009c0200` 0 2 1 0 255 +d `18790406000000000000000800de0d00` 1 0 0 0 256 +d `897f040308000000070000080008f701` 0 4 3 1f 257 +d `3e720b02090000000c010008004e0200` 0 1 1 0 258 +d `0278080a040000000e010008004a4602` 0 1 3 24 259 +d `19790004090000000500000800580d00` 1 0 0 0 260 +d `0b7207010a0000000c000008008eb103` 1 0 0 0 261 +d `0272020b0d0000000d000000005cdd02` 1 0 0 0 262 +d `19790b020700000006000000009c3e01` 0 2 7 13 263 +d `0c72ff04ff000000010d000000de0900` 0 7 4 0 264 +d `41090a080a00000006000000008a0b00` 1 0 0 0 265 +d `4d7904ff000000000700000000104600` 0 0 3 4 266 +d `0c720801060000000000000000d00b00` 0 7 5 0 267 +d `41790b0000000000010a000000420400` 0 1 2 0 268 +d `19790809080000000c01000800da0400` 0 3 2 0 269 +d `2172ffff040000000900000000440900` 0 5 4 0 270 +d `196903000a0000000a01000000940f00` 1 0 0 0 271 +d `1208ff0d0d0000000600000800000500` 0 4 2 0 272 +d `19790c0d080000000500000000140900` 0 4 4 0 273 +d `19790501050000000e00000000000000` 0 0 0 0 274 +d `247806090a0000000c06000800480500` 0 5 2 0 275 +d `19790b0c030000000801000800480c00` 1 0 0 0 276 +d `197901080100000006010008009c0700` 1 0 0 0 277 +d `19790b020c0000000400000000cc0d00` 1 0 0 0 278 +d `ff4f0908040000000b0c000800900200` 1 0 0 0 279 +d `191900090e00000003000000004c0400` 0 1 2 0 280 +d `19790a04020000000306000800000100` 0 4 0 0 281 +d `81790500060000000800000800160f00` 0 4 7 0 282 +d `81790a08000000000601000800ce0500` 0 7 2 0 283 +d `2372020d090000000b0d000000805203` 0 2 1 35 284 +d `ac7702050a0000000d00000000580b00` 0 5 5 0 285 +d `1979010c0b00000003000008001e0a00` 0 0 5 0 286 +d `127800090d000000ff010000000c0100` 0 4 0 0 287 +d `895f0709080000000b0d000000868203` 0 2 1 38 288 +d `1278050a0e0000000c0d000800ca0f01` 0 7 7 10 289 +d `8f190808060000000102000800d80600` 0 3 3 0 290 +d `8f7905050e0000000200000000d20700` 0 7 3 0 291 +d `1978050e06000000060c000000540d00` 1 0 0 0 292 +d `47790400000000000d0c0000004e0500` 0 5 2 0 293 +d `277202040a0000000c07000000086b01` 0 4 5 16 294 +d `19790c01070000000900000800180b00` 0 4 5 0 295 +d `3c72070a0b0000000901000000442f02` 0 5 7 22 296 +d `19790302070000000004000000ce6500` 0 7 2 6 297 +d `0873000a0900000003000000000e2200` 0 0 1 2 298 +d `0872010b030000000600000000ca0800` 0 3 4 0 299 +d `92790a0a070000000300000800540c00` 1 0 0 0 300 +d `257804020e000000ff000000009e0602` 0 2 3 20 301 +d `8469050d06000000060d000000000a00` 0 0 5 0 302 +d `8f790005020000000505000000d40600` 0 3 3 0 303 +d `0573010eff0000000a01000800c00f00` 0 7 7 0 304 +d `827b0507030000000d0a000000c40500` 0 7 2 0 305 +d `19790d010d0000000d01000000c60900` 0 7 4 0 306 +d `8f79060b010000000c000008000c0200` 0 0 1 0 307 +d `921905020c00000003000000004a0b00` 0 5 5 0 308 +d `457901060b0000000c010008008cff00` 1 0 0 0 309 +d `197908090e0000000600000000c80700` 0 7 3 0 310 +d `127808060b0000000a0f000000480f00` 0 5 7 0 311 +d `0b72060c040000000107000000c80900` 0 7 4 0 312 +d `19720707040000000100000800582e03` 0 1 7 32 313 +d `0c7cff0d0a0000000501000000825d00` 1 0 0 0 314 +d `19790c000e0000000900000000da0f00` 0 7 7 0 315 +d `217202ff0c0000000000000000820b00` 1 0 0 0 316 +d `2772070a0e0000000d01000800d20b00` 0 7 5 0 317 +d `197901040100000002010000005c0300` 0 5 1 0 318 +d `ac27040e070000000200000000d42301` 0 7 1 12 319 +d `087308090b0000000901000000483100` 0 5 0 3 320 +d `45720c0e0d0000000c06000000d80e00` 0 3 7 0 321 +d `1979030c0b0000000d060008004a0f00` 0 5 7 0 322 +d `197904040500000002070000008c0a00` 0 2 5 0 323 +d `23720406090000000a06000000440d00` 1 0 0 0 324 +d `0872010501000000090c000000c00100` 0 7 0 0 325 +d `4d79080605000000050f0008004c0b00` 0 5 5 0 326 +d `27420b03010000000700000000dc0c00` 1 0 0 0 327 +d `24780c080d00000000010000009e0a00` 0 2 5 0 328 +d `19790e0d0d000000000c000800c2d700` 0 7 3 d 329 +d `19790e08080000000400000800c05502` 0 7 2 25 330 +d `026200ff050000000700000000980b00` 1 0 0 0 331 +d `0c48040c03000000ff00000000880d00` 1 0 0 0 332 +d `3e32070406000000010b000000dc0f00` 0 7 7 0 333 +d `92790d0900000000ff000008000c0500` 0 4 2 0 334 +d `24780c080e0000000100000000d80c00` 1 0 0 0 335 +d `827b09ff0b0000000404000000d4ce01` 0 3 7 1c 336 +d `19190404010000000b01000800980f00` 1 0 0 0 337 +d `19790a04050000000d030000004a0f00` 0 5 7 0 338 +d `19790c0306000000ff0c0008005a0a00` 0 1 5 0 339 +d `27720601080000000900000800180c00` 1 0 0 0 340 +d `197902010a000000040e000000420f00` 0 5 7 0 341 +d `2371080dff00000004000008000c2e03` 1 0 0 0 342 +d `056306060d0000000b0c000000180100` 0 4 0 0 343 +d `86490aff0e0000000c00000000c20a00` 0 3 5 0 344 +d `9279010c00000000ff00000000d60300` 0 7 1 0 345 +d `19590c0609000000050100080080a303` 1 0 0 0 346 +d `1979ff08060000000801000000dc0000` 0 3 0 0 347 +d `ac7701ff080000000d05000000440500` 0 5 2 0 348 +d `8479010d0b000000010c000000580500` 0 5 2 0 349 +d `0c720d0e050000000500000000840600` 0 2 3 0 350 +d `197908060100000000000000001c0200` 0 0 1 0 351 +d `197900ff0b00000009000000000a9302` 0 4 1 29 352 +d `00700106090000000b06000800d60e00` 1 0 0 0 353 +d `197900010100000000000008004e3c02` 1 0 0 0 354 +d `197907010700000001000008008c0f00` 1 0 0 0 355 +d `1979030a0e0000000500000000c80500` 0 7 2 0 356 +d `897f010b07000000000a000000dcb502` 0 7 2 2b 357 +d `19790201ff0000000700000000560f00` 0 5 7 0 358 +d `2072030d0a000000000c000800100000` 0 0 0 0 359 +d `02720d08ff00000007000008009c0900` 1 0 0 0 360 +d `19790d090b0000000c0c000800d21402` 0 3 2 21 361 +d `1d7b0601ff00000008060000005a9101` 0 5 0 19 362 +d `3e720906020000000203000800c80100` 0 7 0 0 363 +d `45720303060000000c000000009c0400` 0 2 2 0 364 +d `19790700030000000500000000900500` 1 0 0 0 365 +d `08730002090000000000000800d20400` 0 3 2 0 366 +d `19290708070000000c00000000820c00` 1 0 0 0 367 +d `24780406090000000c09000000ce0500` 0 7 2 0 368 +d `1272020e0d0000000b070000005e0500` 0 5 2 0 369 +d `2478010d02000000ff0d000000500700` 0 5 3 0 370 +d `2361070d0e0000000e01000000cc3f03` 1 0 0 0 371 +d `19790607000000000e0a0008000a0b00` 0 4 5 0 372 +d `887908ff0a000000070100000004dd03` 1 0 0 0 373 +d `1969030a070000000b09000000500200` 0 1 1 0 374 +d `45790d010c0000000d00000800da9a00` 0 3 5 9 375 +d `19720b00000000000101000000c6d903` 0 7 4 3d 376 +d `277206000d000000040b0000009e4901` 1 0 0 0 377 +d `3e7203070a0000000701000000c00d00` 1 0 0 0 378 +d `12720e010e0000000106000000d82700` 0 7 3 2 379 +d `1929030e0d0000000e00000000800400` 0 2 2 0 380 +d `23710c0b020000000e0000080056da03` 1 0 0 0 381 +d `8419ff06070000000302000000800000` 0 2 0 0 382 +d `10420c00ff0000000901000000400200` 0 1 1 0 383 +d `ac570e03020000000b03000000c6b900` 0 7 4 b 384 +d `20720204090000000400000000140200` 0 0 1 0 385 +d `02720706050000000508000800060e00` 0 0 7 0 386 +d `1278000c0200000006000000001a6101` 0 4 0 16 387 +d `1929070b010000000c00000000480200` 0 1 1 0 388 +d `1969ff010a000000020b0008005e0b00` 0 5 5 0 389 +d `827b0a040e0000000e00000000cc0500` 0 7 2 0 390 +d `02780e03060000000204000000920e00` 0 2 7 0 391 +d `27720c060a0000000a0f0000000e3f02` 0 4 7 23 392 +d `19690d05060000000b000008005c0200` 0 1 1 0 393 +d `0c72080207000000070c000800840a00` 0 2 5 0 394 +d `23710602010000000101000800d00100` 1 0 0 0 395 +d `88790d040b0000000c01000800520600` 0 1 3 0 396 +d `19790305030000000706000800d4e902` 0 7 4 2e 397 +d `19780400ff0000000d010008008ec001` 0 2 0 1c 398 +d `2538020102000000ff090008008e3603` 0 2 3 33 399 +d `27720c03020000000d00000800ce0400` 0 3 2 0 400 +d `00700a080c0000000a00000000dc0700` 1 0 0 0 401 +d `1979ff07070000000c00000000480b00` 0 5 5 0 402 +d `24720b03080000000603000000cc0900` 0 7 4 0 403 +d `12720d09090000000700000000cc0d00` 1 0 0 0 404 +d `19790a0c090000000800000800140a00` 0 0 5 0 405 +d `1972ff05060000000901000000980f00` 1 0 0 0 406 +d `897f060a070000000d0a000800ce0500` 0 7 2 0 407 +d `0c620c0e070000000a0a0008009c0400` 0 2 2 0 408 +d `1879ff00050000000700000000980700` 1 0 0 0 409 +d `2351ff04040000000500000000100800` 1 0 0 0 410 +d `24720e0e010000000401000000c00500` 0 7 2 0 411 +d `05730e0d0e0000000304000000980c00` 1 0 0 0 412 +d `10720a09010000000800000000980e00` 0 2 7 0 413 +d `0873020d070000000801000000d40500` 0 7 2 0 414 +d `27720e0c08000000050a000800480500` 0 5 2 0 415 +d `0278ff0aff000000040e00000010bf00` 0 4 7 b 416 +d `45190403080000000d000008005c0a00` 0 1 5 0 417 +d `1939020b0e0000000400000000d60b00` 0 7 5 0 418 +d `19490800030000000601000000020e00` 0 0 7 0 419 +d `0972010600000000050b000800505202` 0 1 1 25 420 +d `1979050909000000040f000000c40800` 0 3 4 0 421 +d `2478090402000000ff050000000a8602` 0 0 3 28 422 +d `02780c030800000006000000001a0700` 0 4 3 0 423 +d `197903050e0000000500000000da0900` 0 7 4 0 424 +d `19790d0b0b0000000902000000520f00` 0 5 7 0 425 +d `88730a0b02000000070f000000440900` 1 0 0 0 426 +d `0278ff0a0d0000000a01000000c00400` 0 3 2 0 427 +d `8f79090707000000ff06000800c6e702` 0 7 3 2e 428 +d `4d59000a0c0000000106000000d80800` 0 3 4 0 429 +d `21720204000000000800000800560b00` 0 5 5 0 430 +d `8479040d05000000070c000000d00000` 0 3 0 0 431 +d `0c7209ff030000000300000000880600` 0 2 3 0 432 +d `12220e0000000000ff0a000000d40900` 0 7 4 0 433 +d `0b32080d00000000090b0008001a0100` 0 4 0 0 434 +d `ff1f0a0c0d00000003010000005a0400` 1 0 0 0 435 +d `197906ff000000000b09000800460900` 0 5 4 0 436 +d `27720801ff0000000801000000100600` 0 0 3 0 437 +d `4779fc00fcffffff0900000000c43600` 0 3 3 3 438 +d `12320d090b0000000e0100000046c602` 0 1 3 2c 439 +d `10720803ff000000ff000000004c0200` 0 1 1 0 440 +d `1d7b08ffff0000000b04000000ce0300` 0 7 1 0 441 +d `3e32000b0a00000003000008005cb101` 0 5 0 1b 442 +d `826b080401000000060a000800940000` 0 2 0 0 443 +d `19790c00090000000404000800480900` 0 5 4 0 444 +d `a8790103060000000a00000800460c00` 1 0 0 0 445 +d `8f3901ff0a0000000701000800520e00` 0 1 7 0 446 +d `7a72080a0a0000000d02000000d00300` 0 7 1 0 447 +d `19790403020000000506000000cca400` 0 3 2 a 448 +d `0c68000304000000020100000018db02` 0 4 5 2d 449 +d `2772ff09040000000700000000c40500` 0 7 2 0 450 +d `197906010b0000000300000000900e00` 0 2 7 0 451 +d `196909060900000000010000004e9d02` 1 0 0 0 452 +d `1979000d090000000a06000000d60a01` 0 3 5 10 453 +d `247c0c08ff00000007000000009c0400` 0 2 2 0 454 +d `126807ff09000000050a000000900100` 1 0 0 0 455 +d `197901000600000008020000009a4c01` 1 0 0 0 456 +d `1979ff0d0900000002000000009a0802` 0 2 4 20 457 +d `197909070800000009000000005c0700` 0 5 3 0 458 +d `19720407030000000d010000004e0700` 0 5 3 0 459 +d `1d7b0e0c0900000003010008004c0b00` 0 5 5 0 460 +d `a829060c020000000900000000ceba02` 0 3 5 2b 461 +d `0c7c0c0e030000000000000800d00300` 0 7 1 0 462 +d `1278010aff0000000200000000040100` 0 4 0 0 463 +d `19790304040000000000000000c80300` 0 7 1 0 464 +d `1959050100000000020000000010ed01` 1 0 0 0 465 +d `19790609060000000c0b000000d40100` 0 7 0 0 466 +d `24680e010a0000000e00000000ce4901` 0 7 4 14 467 +d `19790e00000000000d00000800ca0d00` 1 0 0 0 468 +d `19790dff030000000702000000000600` 0 0 3 0 469 +d `24780402070000000600000000c40a00` 0 3 5 0 470 +d `457206020d0000000e040000001a0900` 0 4 4 0 471 +d `1979010d050000000c07000000de0700` 0 7 3 0 472 +d `100203ff0a0000000c010000008c5501` 1 0 0 0 473 +d `0212010d0c0000000d0a000800500e00` 0 1 7 0 474 +d `817909050b000000ff0e000000d40800` 1 0 0 0 475 +d `7a7206070d000000050e000000c40100` 0 7 0 0 476 +d `a8790a0601000000000c0008008c2e02` 0 2 7 22 477 +d `1272000d05000000010000080098df00` 1 0 0 0 478 +d `1979ff08050000000d01000000de0000` 0 3 0 0 479 +d `1072030e08000000ff00000000d86d01` 1 0 0 0 480 +d `884903010a000000070c000000500f00` 0 5 7 0 481 +d `197904ff010000000704000800960f00` 1 0 0 0 482 +d `19790c04050000000200000000c80400` 0 3 2 0 483 +d `7a7208070e00000000000008009c0c00` 1 0 0 0 484 +d `057307ff090000000400000000540d00` 1 0 0 0 485 +d `1929000b0d0000000b01000800d40000` 0 3 0 0 486 +d `1979020205000000010a000000c0f503` 0 7 2 3f 487 +d `0c7c0c0d030000000a01000000c20e00` 0 3 7 0 488 +d `0972050c00000000090d0000008c0e00` 0 2 7 0 489 +d `2371020e03000000080b000800c03201` 1 0 0 0 490 +d `0242020b040000000c01000000da0300` 0 7 1 0 491 +d `21620eff060000000609000000820a00` 0 2 5 0 492 +d `08330e050c0000000708000000800000` 0 2 0 0 493 +d `0873000e010000000706000000520a00` 0 1 5 0 494 +d `3e720a02080000000900000000500e00` 0 1 7 0 495 +d `1979040b0d0000000e070000005c0000` 0 1 0 0 496 +d `41790a020e00000004030000001acb02` 0 4 5 2c 497 +d `197906000c0000000502000800080c00` 1 0 0 0 498 +d `197902060e0000000d0b0000009c0a00` 0 2 5 0 499 +d `19790a08070000000703000000880900` 1 0 0 0 500 +d `1979ff050c0000000d08000800482f01` 0 5 7 12 501 +d `457206030b0000000a01000800820400` 0 2 2 0 502 +d `0c780505020000000d010000008ceb00` 1 0 0 0 503 +d `7a720eff030000000c00000000460f00` 0 5 7 0 504 +d `897f0908080000000200000800dc0d00` 1 0 0 0 505 +d `19790c0c080000000501000000980f00` 1 0 0 0 506 +d `9229ff000400000000000000001c0700` 0 4 3 0 507 +d `45720a0b060000000d09000000d40d00` 1 0 0 0 508 +d `19690d0602000000020e000000ce2203` 0 3 1 32 509 +d `12380408090000000d010000004c0a00` 0 1 5 0 510 +d `027806080b0000000700000000101e01` 0 0 7 11 511 +d `25580209040000000c0c000000d40300` 0 7 1 0 512 +d `1979060a080000000d000000000e0b00` 0 4 5 0 513 +d `7a32080d0e000000010f0000004e0000` 0 1 0 0 514 +d `1d7b0d0d0000000005020000009e0e00` 0 2 7 0 515 +d `240c00030a0000000b01000000400e00` 0 1 7 0 516 +d `4779fc00fcffffff0a01000800d20900` 0 7 4 0 517 +d `2432080e080000000901000000c40d00` 1 0 0 0 518 +d `09720503050000000a03000000040200` 0 0 1 0 519 +d `1272030202000000020a000000c00e00` 0 3 7 0 520 +d `1979070c080000000200000000d80b00` 0 7 5 0 521 +d `1929060e00000000080e000000440900` 0 5 4 0 522 +d `09720107ff0000000c0f0000004e0900` 0 5 4 0 523 +d `4d7901030500000009010000005a0f00` 0 5 7 0 524 +d `ff0f09070c000000060b000800560600` 1 0 0 0 525 +d `19790300090000000100000000560000` 0 1 0 0 526 +d `8679030709000000090b0000008ca902` 1 0 0 0 527 +d `19790c08010000000200000800060800` 0 0 4 0 528 +d `057300080d0000000d0a000000020000` 0 0 0 0 529 +d `ac77050bff0000000c00000000c80100` 0 7 0 0 530 +d `247807080500000004060008009a0200` 0 2 1 0 531 +d `19790a08000000000e08000000860000` 0 2 0 0 532 +d `027801ff0d000000ff04000000140e00` 0 0 7 0 533 +d `0c7805090e0000000e0c000000140300` 0 4 1 0 534 +d `1979060508000000090a000000c00600` 0 3 3 0 535 +d `4d790a0a020000000e0c000000c60a00` 0 3 5 0 536 +d `45790508000000000303000000dc0c00` 1 0 0 0 537 +d `197908040900000006000000004a0c00` 1 0 0 0 538 +d `277205ff020000000c0a000000520900` 0 5 4 0 539 +d `0c78ff0d070000000901000000d2d800` 0 3 4 d 540 +d `197909000c0000000200000000d60300` 0 7 1 0 541 +d `a8790501050000000d000000008c4000` 0 2 0 4 542 +d `7a720708000000000900000800960900` 1 0 0 0 543 +d `9279000c0d0000000c06000800423e00` 0 1 7 3 544 +d `02720c02080000000802000800c00100` 0 7 0 0 545 +d `ff7f0d040b0000000a000000005e0e00` 1 0 0 0 546 +d `8f09090c090000000300000800d0ff03` 0 7 7 3f 547 +d `4572030d010000000100000000d42503` 0 7 2 32 548 +d `197904090e0000000e00000000500200` 0 1 1 0 549 +d `19790a0b090000000b0e0008004e7300` 0 5 1 7 550 +d `197906010c00000005090008001cff01` 0 4 7 1f 551 +d `12780504070000000505000800d40b00` 0 7 5 0 552 +d `4532030d0c00000000000000001a0000` 0 0 0 0 553 +d `1979050a0d0000000000000000ca0200` 0 3 1 0 554 +d `194900ffff00000009040008005e0900` 0 5 4 0 555 +d `24580b0d0c000000010e000000cc0e00` 0 3 7 0 556 +d `1979ff03090000000b06000000440a00` 0 1 5 0 557 +d `027202030a0000000108000000563403` 0 1 2 33 558 +d `827b03010c0000000b0c0000001e0000` 0 0 0 0 559 +d `84790705060000000700000000500e00` 0 1 7 0 560 +d `19790b0e0c000000ff00000000c60f00` 0 7 7 0 561 +d `19790a0a010000000106000000980e00` 0 2 7 0 562 +d `127207050a000000080b000000001000` 0 0 0 1 563 +d `1979050b080000000304000000820900` 1 0 0 0 564 +d `00700006080000000c02000800d80700` 1 0 0 0 565 +d `247c00090100000000020000000a0200` 0 0 1 0 566 +d `0b7206030a0000000a0c00000080a100` 1 0 0 0 567 +d `3c72070aff0000000d05000000900700` 1 0 0 0 568 +d `19790b050b0000000a030008004c0500` 0 5 2 0 569 +d `1979060c0c000000080e0000004c0e00` 0 1 7 0 570 +d `1979000806000000020c0008001e0900` 0 4 4 0 571 +d `a8790a040b0000000a0e000000420900` 0 5 4 0 572 +d `417906020200000005000008000e0700` 0 4 3 0 573 +d `08730b070e0000000e00000000140300` 0 4 1 0 574 +d `107201ff0e0000000906000000d60f00` 0 7 7 0 575 +d `12180a07050000000400000000ca0d00` 1 0 0 0 576 +d `19190406020000000706000800cc0700` 0 7 3 0 577 +d `1d7b050eff0000000301000800400c00` 1 0 0 0 578 +d `3e3205050300000002000008008c0c00` 1 0 0 0 579 +d `09720d080a0000000700000800c45f00` 0 7 7 5 580 +d `21720c0b030000000d06000800d60b00` 0 7 5 0 581 +d `ff7f0e0a06000000090000000096ec01` 1 0 0 0 582 +d `0872050b070000000403000800c63b01` 0 7 5 13 583 +d `45790905070000000701000000c60900` 0 7 4 0 584 +d `7a720d0b0900000002010008009e4e00` 0 2 7 4 585 +d `27720802ff0000000e00000800c80f03` 0 7 7 30 586 +d `2578010d080000000003000800d00e00` 0 3 7 0 587 +d `1979010d010000000d06000000880e00` 0 2 7 0 588 +d `0c7201080e000000090a000000c8d502` 0 7 2 2d 589 +d `45790d00010000000209000800860e00` 0 2 7 0 590 +d `8f790300000000000d01000000122d01` 1 0 0 0 591 +d `2172090cff0000000a09000000420c00` 1 0 0 0 592 +d `19790502010000000b08000000940c00` 1 0 0 0 593 +d `8479ff040d0000000a08000800c40f00` 0 7 7 0 594 +d `0c72ff0b060000000806000800502a01` 0 1 5 12 595 +d `1978030e0e00000000040000005a0500` 0 5 2 0 596 +d `007008000b0000000002000000460d00` 1 0 0 0 597 +d `193902ff0d0000000a030000005c0000` 0 1 0 0 598 +d `19590c0a0400000006010000001e0a00` 0 0 5 0 599 +d `19790207040000000c01000000560e00` 0 1 7 0 600 +d `4779fc00fcffffff0906000800460800` 0 1 4 0 601 +d `ff6f0309080000000c00000000040d00` 1 0 0 0 602 +d `19790a0b060000000509000000927402` 0 2 2 27 603 +d `19790705040000000906000800c80300` 0 7 1 0 604 +d `19790003080000000b07000000820400` 0 2 2 0 605 +d `20720902000000000d020000009c0300` 1 0 0 0 606 +d `4d790d0805000000010a0008001e7503` 0 4 2 37 607 +d `19090c0c070000000a010000008e0400` 0 2 2 0 608 +d `1978030b010000000601000800120400` 0 0 2 0 609 +d `247c03090e00000001000000005e0900` 0 5 4 0 610 +d `1979090d070000000404000000dcd303` 0 7 1 3d 611 +d `19420a03080000000b01000000400f00` 0 5 7 0 612 +d `197908010a0000000e0e000000880200` 0 2 1 0 613 +d `1202080a010000000702000000d60100` 0 7 0 0 614 +d `19790b0eff0000000901000000960f00` 1 0 0 0 615 +d `19790800050000000d03000000dc0700` 0 7 3 0 616 +d `25480007080000000c05000000849303` 1 0 0 0 617 +d `10120506ff0000000101000000d80000` 0 3 0 0 618 +d `4579020e0d000000ff00000800ce0300` 0 7 1 0 619 +d `19390607020000000001000000040700` 0 4 3 0 620 +d `197904010e0000000104000000020d00` 1 0 0 0 621 +d `8f7901060b0000000501000000960a00` 0 2 5 0 622 +d `197908060500000003000000000ed801` 0 0 4 1d 623 +d `1979040b0a0000000a020000005ef903` 0 5 4 3f 624 +d `19790c0d0b0000000b01000000860100` 1 0 0 0 625 +d `19090008040000000400000000520800` 0 1 4 0 626 +d `1978ff020d0000000c0e00000094fa03` 0 2 5 3f 627 +d `19790707070000000c06000000dc0d00` 1 0 0 0 628 +d `0b72ff0b09000000070d0000004e0b00` 0 5 5 0 629 +d `4579080d0000000009060000009a0800` 0 2 4 0 630 +d `197905020a0000000b0d000800000b00` 0 4 5 0 631 +d `0c780607080000000100000800ca0e00` 0 3 7 0 632 +d `02720008ff000000020a000000dc1d00` 1 0 0 0 633 +d `45090301050000000e00000000003e00` 0 0 7 3 634 +d `24720d02040000000a0a000000067f02` 0 4 7 27 635 +d `3c720d090b0000000800000000c60600` 0 3 3 0 636 +d `19790d030a000000080e0008001e0f00` 0 4 7 0 637 +d `417907040a0000000100000000544a03` 0 1 5 34 638 +d `240c000c080000000302000800c20c00` 1 0 0 0 639 +d `197900070e0000000a0000080058f901` 0 5 4 1f 640 +d `a869000e07000000080e000000540000` 0 1 0 0 641 +d `1979000a010000000b000000001e0400` 0 0 2 0 642 +d `247205ff060000000604000000d20000` 0 3 0 0 643 +d `84090e060e0000000200000000080c00` 1 0 0 0 644 +d `ac770207ff00000004000000004a0f00` 0 5 7 0 645 +d `86790b040d0000000901000000c80300` 0 7 1 0 646 +d `88790407030000000d00000000ce8003` 0 3 0 38 647 +d `450903080c0000000b00000000160c00` 1 0 0 0 648 +d `a85904080a0000000105000800c40d00` 1 0 0 0 649 +d `1979ff070a00000008010000004e0500` 0 5 2 0 650 +d `19780effff0000000101000800020400` 0 0 2 0 651 +d `0c72010c0c000000000e000000840200` 0 2 1 0 652 +d `23710209010000000900000000480a00` 1 0 0 0 653 +d `827b0e0009000000ff09000000d20b00` 0 7 5 0 654 +d `0272020c050000000e01000800480500` 0 5 2 0 655 +d `827b0e0b0e0000000c0f0000005a0500` 1 0 0 0 656 +d `2372020209000000ff0a000000dede00` 0 3 7 d 657 +d `27720808050000000408000000c6d400` 0 3 2 d 658 +d `19780a0e07000000060c000800dab203` 0 3 1 3b 659 +d `02720c03090000000b04000000800f00` 1 0 0 0 660 +d `ff7f05020600000000010008004e0900` 1 0 0 0 661 +d `0c780103070000000b00000800ce0700` 0 7 3 0 662 +d `92190d020b0000000300000000920200` 0 2 1 0 663 +d `19790c00070000000a0c0000005a0d00` 1 0 0 0 664 +d `08720b0e0c0000000700000000060e00` 0 0 7 0 665 +d `ac770e030400000009000008001edc02` 1 0 0 0 666 +d `3c5201000d0000000600000000440200` 0 1 1 0 667 +d `414906090d000000ff01000000c0db02` 0 7 5 2d 668 +d `ac77040d02000000ff090000005e0e00` 0 1 7 0 669 +d `19790200080000000200000000860200` 0 2 1 0 670 +d `19790b0401000000ff0b000000da0c00` 1 0 0 0 671 +d `12020408010000000400000000420900` 0 5 4 0 672 +d `4179040a010000000406000000d80f00` 0 7 7 0 673 +d `19190503000000000900000000080300` 0 4 1 0 674 +d `19790e07050000000c01000000925202` 0 2 1 25 675 +d `ff7f0a010b0000000800000000140f00` 1 0 0 0 676 +d `1949020c020000000501000000c03002` 0 3 0 23 677 +d `247c08000c000000ff0f000000040e00` 0 0 7 0 678 +d `88790400060000000001000000420900` 0 5 4 0 679 +d `7a72ffff000000000b00000000580a00` 0 1 5 0 680 +d `ff2f0509000000000800000000920600` 1 0 0 0 681 +d `0c780a03020000000e0000080000a201` 0 0 1 1a 682 +d `ac770707090000000b00000000800100` 1 0 0 0 683 +d `24320503ff0000000400000000d40f00` 0 7 7 0 684 +d `09720902020000000900000800520000` 0 1 0 0 685 +d `027807070b000000010a0000008a0a00` 0 2 5 0 686 +d `2772ff06060000000d090000005c0b00` 0 5 5 0 687 +d `27720202010000000c01000000cc0000` 0 3 0 0 688 +d `247c00ff060000000e000008001c0b00` 0 4 5 0 689 +d `00700504000000000a01000000482003` 1 0 0 0 690 +d `2372020104000000080f000800140800` 0 0 4 0 691 +d `19090c0e0c0000000b0d000000860300` 1 0 0 0 692 +d `1909060c0e0000000d00000000d20f00` 0 7 7 0 693 +d `0c720d080100000009090000005a0300` 0 5 1 0 694 +d `0b720d00060000000200000800560900` 0 5 4 0 695 +d `927909000b0000000a06000000800500` 1 0 0 0 696 +d `1979060a01000000000a0000000c0b00` 0 4 5 0 697 +d `0c2c070a0a000000020c000000dc0800` 0 3 4 0 698 +d `7a72080aff000000090c000000500f00` 0 5 7 0 699 +d `2472010a0d0000000802000800c00c00` 1 0 0 0 700 +d `127800ff020000000300000800dc0500` 0 7 2 0 701 +d `a8790409030000000a00000000dc0500` 0 7 2 0 702 +d `0c7c0d0e0e0000000c010000008c0100` 1 0 0 0 703 +d `19790c010e000000ff00000000c02600` 0 3 3 2 704 +d `4709fc00fcffffff0d04000800160500` 0 4 2 0 705 +d `0573050e030000000601000800020b00` 0 4 5 0 706 +d `08730b0c0c0000000e00000000d6dd03` 1 0 0 0 707 +d `1d7b0600000000000d0b0000008a0100` 1 0 0 0 708 +d `19790d0b01000000030c000800820e00` 0 2 7 0 709 +d `19790104070000000402000800140100` 0 4 0 0 710 +d `8f790c050300000002080000004c0b00` 0 5 5 0 711 +d `19390408ff0000000d03000800c00e00` 0 3 7 0 712 +d `3c720c0b04000000070100000000be02` 0 0 7 2b 713 +d `127208060a0000000b0e0000004a0800` 0 1 4 0 714 +d `47790000000000000100000800460d00` 1 0 0 0 715 +d `8479070805000000090e000000d20100` 1 0 0 0 716 +d `9249030d090000000e00000000da0f00` 0 7 7 0 717 +d `927909ff07000000050e000000800400` 0 2 2 0 718 +d `0248020eff0000000700000000ce0700` 0 7 3 0 719 +d `ff7f0506090000000a02000800dc0300` 1 0 0 0 720 +d `08720a0a030000000600000800840900` 1 0 0 0 721 +d `0278060d070000000100000000540b00` 0 5 5 0 722 +d `88430e050c00000007000000001ae303` 0 4 1 3e 723 +d `02720509050000000501000000d20a00` 0 3 5 0 724 +d `19020e050e0000000c0a000000900300` 1 0 0 0 725 +d `0272ff0d0800000008000008000a0a00` 0 0 5 0 726 +d `0050070e040000000000000000880300` 1 0 0 0 727 +d `ac77ff0305000000ff00000000180800` 0 0 4 0 728 +d `1979040c020000000c01000000c60000` 0 3 0 0 729 +d `214202060c0000000d020000009c0100` 1 0 0 0 730 +d `0c7803ff000000000d00000000da1e01` 0 3 7 11 731 +d `02720d0207000000000600080054f803` 0 1 4 3f 732 +d `02720e06060000000301000000880200` 0 2 1 0 733 +d `4d790109040000000000000000000300` 0 4 1 0 734 +d `ac770d03090000000e00000000900f00` 1 0 0 0 735 +d `2578030b080000000e07000000160300` 0 4 1 0 736 +d `1979ff070e0000000800000800100f00` 0 4 7 0 737 +d `197909080d0000000e00000000960e00` 0 2 7 0 738 +d `1979040108000000050000000040bb01` 0 5 5 1b 739 +d `257805030a000000ff06000000d40500` 0 7 2 0 740 +d `19790c0903000000070b000800d00100` 0 7 0 0 741 +d `240c0c00090000000002000000120500` 0 4 2 0 742 +d `08330807010000000806000800dc1202` 0 3 1 21 743 +d `1909ff0a060000000501000000000900` 0 4 4 0 744 +d `02120303040000000d0a0008001eb401` 0 0 2 1b 745 +d `05730d000e0000000400000800de0100` 0 7 0 0 746 +d `10420b0e0900000007020008008a0d00` 1 0 0 0 747 +d `ac770904050000000507000000040300` 0 4 1 0 748 +d `2341ff06050000000800000800d00200` 1 0 0 0 749 +d `234204010b0000000806000800c80f00` 0 7 7 0 750 +d `087206020d000000030e000000ca0700` 0 7 3 0 751 +d `1978020dff0000000600000000c20100` 0 7 0 0 752 +d `1979ff09020000000903000000480f00` 0 5 7 0 753 +d `2372040e040000000008000000ce3e01` 0 3 7 13 754 +d `2478ff080900000008010008001a0400` 0 0 2 0 755 +d `19790504020000000700000000060100` 0 4 0 0 756 +d `1979040d0c0000000e000000005e0800` 0 1 4 0 757 +d `082309050500000005000000009e0e00` 0 2 7 0 758 +d `21720e0c0a000000020e000000c41e02` 0 3 7 21 759 +d `45790004ff0000000308000000802b00` 1 0 0 0 760 +d `197900020d00000005060008004cef00` 0 5 7 e 761 +d `47790000000000000a040000004a0100` 0 5 0 0 762 +d `21720a020d0000000b09000000880e00` 0 2 7 0 763 +d `21320a08060000000700000000de0800` 0 3 4 0 764 +d `ac770a0c040000000e000000008e0300` 1 0 0 0 765 +d `0232ff0cff0000000b0a000800c00f00` 0 7 7 0 766 +d `3e72020eff0000000d0f000000c20f00` 0 7 7 0 767 +d `19690a09090000000c00000000ce0e00` 0 3 7 0 768 +d `92790d0800000000050a0008008e0e00` 0 2 7 0 769 +d `21720b0602000000010c000000da0f00` 0 7 7 0 770 +d `24720a030a0000000106000800c8c503` 0 7 2 3c 771 +d `19790c03050000000300000000969203` 0 2 1 39 772 +d `3e6200060e0000000106000800ccb103` 0 7 0 3b 773 +d `1979040e06000000040a000800c20a00` 0 3 5 0 774 +d `a8790401ff0000000502000000940200` 0 2 1 0 775 +d `81790a06080000000908000000dc0c00` 1 0 0 0 776 +d `19790609000000000809000000440000` 0 1 0 0 777 +d `7a7200ff0e0000000907000800120b00` 0 4 5 0 778 +d `10220800050000000706000000c00a00` 0 3 5 0 779 +d `847900060c0000000a04000800c00e00` 0 3 7 0 780 +d `1979050e0c00000001070000001e0900` 0 4 4 0 781 +d `86290203080000000c01000800400100` 0 5 0 0 782 +d `12780600080000000004000000da0300` 0 7 1 0 783 +d `ac7704ff0c000000ff0100080050e800` 0 1 4 e 784 +d `057307020700000007010008005e0200` 0 1 1 0 785 +d `23720d0e020000000c01000000000f00` 0 4 7 0 786 +d `1939080d0c0000000b00000800481301` 0 5 1 11 787 +d `247202090700000009000000004e0b00` 0 5 5 0 788 +d `246201090b0000000700000000ce3b02` 0 7 5 23 789 +d `4d790b0d0a0000000104000000920b00` 1 0 0 0 790 +d `47790c00000000000201000000000400` 0 0 2 0 791 +d `0278ff06ff00000004010000009ef303` 1 0 0 0 792 +d `2478060e020000000a010000004a0000` 0 1 0 0 793 +d `19790e04060000000c00000000580400` 0 1 2 0 794 +d `827b060e0e0000000a0d000000ca0c00` 1 0 0 0 795 +d `0272050d0d0000000300000000c80e00` 0 3 7 0 796 +d `0272060a0d0000000d01000000080100` 0 4 0 0 797 +d `0c780c00050000000708000800c00e00` 0 3 7 0 798 +d `0c780105080000000601000000d40f00` 0 7 7 0 799 +d `23720304ff000000060200000052df00` 0 5 7 d 800 +d `02220305040000000203000000d40900` 0 7 4 0 801 +d `18090c0e0d000000000d000000c20e00` 0 3 7 0 802 +d `10720d03000000000a00000000125702` 0 4 3 25 803 +d `197907010000000000060000009e0900` 1 0 0 0 804 +d `0c6cff03ff000000080200080046e902` 0 5 4 2e 805 +d `1d7b01080600000006000000001e0d00` 1 0 0 0 806 +d `81790705070000000802000000140000` 0 0 0 0 807 +d `19390905040000000500000000d40f00` 0 7 7 0 808 +d `247c0500080000000405000000000c00` 1 0 0 0 809 +d `20720102ff0000000400000800020c00` 1 0 0 0 810 +d `9279000a0c0000000b0d000000160e00` 0 0 7 0 811 +d `7a7201070900000001010008001e0e00` 0 0 7 0 812 +d `827b0b0d0d0000000409000000160e00` 0 0 7 0 813 +d `1d7b05030e000000020600080096c903` 1 0 0 0 814 +d `02720804020000000100000000c80f00` 0 7 7 0 815 +d `1949040c0a0000000a020000008e7801` 0 2 4 17 816 +d `4d790e01030000000100000000580300` 0 5 1 0 817 +d `18790c05000000000401000000020b00` 0 4 5 0 818 +d `19090608090000000601000800560c00` 1 0 0 0 819 +d `ff7f04ff080000000300000000120901` 1 0 0 0 820 +d `19790203000000000e00000800580800` 0 1 4 0 821 +d `19790e080700000005000000009e0e00` 0 2 7 0 822 +d `194902000a000000000a000000509e00` 0 1 7 9 823 +d `19790006070000000d000000001e0500` 0 4 2 0 824 +d `897f0606000000000d00000000960900` 1 0 0 0 825 +d `0c7c0e020b0000000900000000d88700` 0 7 3 8 826 +d `8873060e090000000a0000080018f702` 0 4 3 2f 827 +d `05730b02ff0000000a000000001e0600` 0 0 3 0 828 +d `19720001ff0000000006000000880c00` 1 0 0 0 829 +d `4d790e0b060000000a000000004e7002` 0 1 0 27 830 +d `02180808010000000a00000000540700` 0 5 3 0 831 +d `ff7f0a0e0e0000000c00000800d80f00` 1 0 0 0 832 +d `41190104000000000801000000400300` 0 5 1 0 833 +d `21720c0009000000010a0008004c0c00` 1 0 0 0 834 +d `81790e060a00000008010000000c0600` 0 0 3 0 835 +d `ac770d0a0b0000000b00000000800100` 1 0 0 0 836 +d `19720407050000000b00000800dc0a00` 0 3 5 0 837 +d `19790104080000000e09000800069f02` 0 4 7 29 838 +d `2302000905000000040000000006dd03` 1 0 0 0 839 +d `8f790c03000000000c020008009a4b02` 1 0 0 0 840 +d `417906030e0000000e0a000000dcb802` 0 3 4 2b 841 +d `207209ff0e0000000d00000000c00f00` 0 7 7 0 842 +d `19790b01ff000000ff01000000040d00` 1 0 0 0 843 +d `00700d02000000000b01000000844700` 1 0 0 0 844 +d `19090704010000000a06000000860a00` 0 2 5 0 845 +d `8873020a040000000c00000000da0300` 0 7 1 0 846 +d `19290dff070000000b0e000000180f00` 0 4 7 0 847 +d `1979ff07060000000e0c0008009c0e00` 0 2 7 0 848 +d `8679010003000000ff0000080006af02` 0 4 7 2a 849 +d `23720108ff0000000700000000ca0d00` 1 0 0 0 850 +d `88730409080000000809000800dc0200` 0 3 1 0 851 +d `19790d0005000000020d000800000f00` 0 4 7 0 852 +d `18390905030000000304000800cc0f00` 0 7 7 0 853 +d `127201090e0000000a08000000080d00` 1 0 0 0 854 +d `2772060d0a000000020b000000d20900` 0 7 4 0 855 +d `24780a0b000000000200000000000600` 0 0 3 0 856 +d `19790109010000000b03000800d2af00` 0 7 7 a 857 +d `0c78030b0c0000000304000000580e00` 0 1 7 0 858 +d `1979040a020000000c00000800940f00` 1 0 0 0 859 +d `4779fc00fcffffff0a00000000140600` 0 0 3 0 860 +d `09720e0d0800000001000000005a0b00` 0 5 5 0 861 +d `0b720a070c0000000901000000100d00` 1 0 0 0 862 +d `19790a0d0a0000000b00000000140300` 0 4 1 0 863 +d `0278050d050000000001000000180500` 0 4 2 0 864 +d `47790c00000000000300000000d60e00` 0 3 7 0 865 +d `81790c080a0000000206000000800d00` 1 0 0 0 866 +d `8879030e030000000e01000800860a00` 0 2 5 0 867 +d `19390c0707000000090c0000008c0500` 1 0 0 0 868 +d `240208020e0000000c080000005cf402` 0 1 2 2f 869 +d `19790c080a0000000b01000800840300` 1 0 0 0 870 +d `897f06010a000000ff01000000d69302` 0 7 1 29 871 +d `8129040d090000000d01000000ce0300` 0 7 1 0 872 +d `05730609080000000e00000000c80100` 0 7 0 0 873 +d `4d790a010c00000006010000008a0200` 0 2 1 0 874 +d `18790e0c03000000050c000000940000` 0 2 0 0 875 +d `0c720201020000000e00000000dc0500` 0 7 2 0 876 +d `19790d00050000000b01000800d40f00` 0 7 7 0 877 +d `23720905040000000c000000009c0200` 0 2 1 0 878 +d `4d7903ff000000000000000000580300` 0 5 1 0 879 +d `197903000000000004010000008c0700` 1 0 0 0 880 +d `0972000e0b000000010a0000001c1001` 0 0 0 11 881 +d `19790cff0d000000070100000012b202` 0 0 1 2b 882 +d `3c7203010a0000000200000000d01800` 0 3 4 1 883 +d `05730b04020000000d02000000da0f00` 0 7 7 0 884 +d `45720709090000000701000000460400` 0 1 2 0 885 +d `45320901020000000d01000000da0f00` 0 7 7 0 886 +d `241c0c00070000000607000000860800` 0 2 4 0 887 +d `1929070e0d0000000e01000800000f00` 0 4 7 0 888 +d `86790c020a0000000203000000ce0e00` 0 3 7 0 889 +d `23720500ff0000000a00000000c40b00` 0 7 5 0 890 +d `457202090d0000000201000000da8102` 0 7 0 28 891 +d `4502000808000000080000000040ce00` 0 1 7 c 892 +d `867909060a0000000d00000000500700` 0 5 3 0 893 +d `88790b01090000000c00000800460900` 0 5 4 0 894 +d `1979ff0a0600000000020000004a0c00` 1 0 0 0 895 +d `24720c0302000000090d000000883703` 1 0 0 0 896 +d `19020d02030000000600000000c20d00` 1 0 0 0 897 +d `1979090a050000000400000800084f03` 0 4 7 34 898 +d `84490008020000000300000000c00900` 0 7 4 0 899 +d `a8790c050b0000000000000800cc0e00` 0 3 7 0 900 +d `1979010c0c0000000500000800d2e202` 0 3 1 2e 901 +d `087309080e0000000000000000de0300` 0 7 1 0 902 +d `247c060aff0000000100000800c40f00` 0 7 7 0 903 +d `45420b0b0d0000000407000000ca0f00` 0 7 7 0 904 +d `197905030700000007050000001e0b00` 0 4 5 0 905 +d `88730305050000000a0d000000d84700` 0 7 3 4 906 +d `47790800000000000e010000000e0100` 0 4 0 0 907 +d `1919050b010000000208000800960e00` 0 2 7 0 908 +d `19790905040000000500000800100e00` 0 0 7 0 909 +d `20720207060000000700000000020600` 0 0 3 0 910 +d `08020003030000000c0b0008001e4700` 0 4 3 4 911 +d `863907010b000000020b000000c46a00` 0 3 5 6 912 +d `19790d0e010000000d000000004e0900` 0 5 4 0 913 +d `247805ff010000000500000000c80500` 0 7 2 0 914 +d `1972070205000000ff00000000800000` 0 2 0 0 915 +d `ac77070c0b00000002020008009c0e00` 0 2 7 0 916 +d `19090c01010000000e00000000407e02` 0 1 7 27 917 +d `19290300010000000d0c000000de0000` 0 3 0 0 918 +d `08730c0c0b0000000a01000000560400` 0 1 2 0 919 +d `0c72070c090000000d070000000c0700` 0 4 3 0 920 +d `84290b0c000000000a01000000d60600` 0 3 3 0 921 +d `1228060c0a00000009000008005a0800` 0 1 4 0 922 +d `1979020e000000000401000000da0d00` 1 0 0 0 923 +d `7a720a060c0000000400000000560c00` 1 0 0 0 924 +d `1d5b0d0e0a0000000a010008000e0400` 0 0 2 0 925 +d `4d790c070a00000001040008004a0c00` 1 0 0 0 926 +d `12720d01010000000107000000000200` 0 0 1 0 927 +d `88790c0c04000000030100080002b801` 0 0 4 1b 928 +d `195900ff050000000200000800d80100` 0 7 0 0 929 +d `087308ff0e0000000908000800840a00` 0 2 5 0 930 +d `1929080307000000ff020000009e0600` 0 2 3 0 931 +d `197800040a00000007000000000a0600` 0 0 3 0 932 +d `19320b0c0200000000010000004e0600` 0 1 3 0 933 +d `ff7f03040c0000000e060000000a0500` 1 0 0 0 934 +d `19790906040000000002000000540900` 0 5 4 0 935 +d `19790b0d090000000700000000820200` 0 2 1 0 936 +d `8429060400000000010b000000c4a103` 0 7 0 3a 937 +d `827b09000b0000000200000800980e00` 0 2 7 0 938 +d `1d1b0a0d0c000000000e000000160300` 0 4 1 0 939 +d `1d7b090905000000010c000000984903` 1 0 0 0 940 +d `8809040c0a00000009020000005a9103` 0 5 0 39 941 +d `027800090b0000000d0c000800c40b00` 0 7 5 0 942 +d `4509030c0e0000000501000000dc0500` 0 7 2 0 943 +d `2772080906000000ff00000000989401` 0 2 2 19 944 +d `0c32030d06000000000f000800c40800` 0 3 4 0 945 +d `20020a0b02000000ff01000000120e00` 0 0 7 0 946 +d `ff7f020c08000000020a000800145c00` 1 0 0 0 947 +d `ac770c0eff0000000e02000000580400` 0 1 2 0 948 +d `2772ff0a0c0000000d01000000ce0400` 0 3 2 0 949 +d `4d79090801000000ff000000004a0000` 0 1 0 0 950 +d `247805ff0500000001050000005a0c00` 1 0 0 0 951 +d `08730d090d0000000805000000440a00` 0 1 5 0 952 +d `88730e040c0000000e0c000000540600` 0 1 3 0 953 +d `09720704060000000301000800880900` 1 0 0 0 954 +d `197901010e0000000d0c0000009a0700` 1 0 0 0 955 +d `204205090700000009050000009c0f00` 1 0 0 0 956 +d `1979ff090e0000000e0c000800ca0b00` 0 7 5 0 957 +d `19290500050000000000000000c00300` 0 7 1 0 958 +d `12280d0d0b0000000d0e000800020d00` 1 0 0 0 959 +d `8873010e0c0000000a00000000860f00` 1 0 0 0 960 +d `19790eff080000000001000000500500` 0 5 2 0 961 +d `21720c0c0d0000000e0c000800860e00` 0 2 7 0 962 +d `0573060c090000000300000000880f00` 1 0 0 0 963 +d `827b0c09060000000a01000000c60100` 0 7 0 0 964 +d `867906ffff0000000100000000d20202` 0 3 1 20 965 +d `19790bff010000000100000000060d00` 1 0 0 0 966 +d `19390106000000000e0c0000005a1c00` 1 0 0 0 967 +d `41790c0dff0000000d0c000800060b00` 0 4 5 0 968 +d `19790c000d0000000600000000920b00` 1 0 0 0 969 +d `88790609050000000200000000c00600` 0 3 3 0 970 +d `197904060900000007000008009c4301` 1 0 0 0 971 +d `20720105ff0000000b01000000469302` 0 5 1 29 972 +d `21720102080000000209000000d80500` 0 7 2 0 973 +d `12720b0c06000000ff0b000000880b00` 1 0 0 0 974 +d `1979ff04000000000b00000000540400` 0 1 2 0 975 +d `4779fc00fcffffff070c0000004c0e00` 0 1 7 0 976 +d `25780709ff0000000600000000c00a00` 0 3 5 0 977 +d `0c7c080006000000090e0008005c0e00` 0 1 7 0 978 +d `19790409ff0000000d0f0000000c0e00` 0 0 7 0 979 +d `4d790aff0e0000000a00000800083e03` 0 0 7 33 980 +d `0c780d06070000000208000800c60400` 0 3 2 0 981 +d `0503030d060000000800000000040f00` 0 4 7 0 982 +d `ff7f0207060000000e0c000800decb01` 1 0 0 0 983 +d `2312090d0c0000000d0000000000cd03` 1 0 0 0 984 +d `0c3801080a000000010e000800c20700` 0 7 3 0 985 +d `1979010e030000000400000800880100` 1 0 0 0 986 +d `02680d0a0b0000000003000800c80a00` 0 3 5 0 987 +d `05730c08ff0000000600000000c60500` 0 7 2 0 988 +d `92790e090b00000008000000000c5601` 0 0 3 15 989 +d `12080a0aff0000000b000008009c4602` 0 2 3 24 990 +d `19790a0c080000000e00000800c20200` 0 3 1 0 991 +d `1979090b000000000001000000c80b00` 0 7 5 0 992 +d `195906060a0000000300000800c20700` 0 7 3 0 993 +d `884301070200000002000000005c0c00` 1 0 0 0 994 +d `097205050c0000000000000000d20000` 0 3 0 0 995 +d `197909040c00000000080000008e0f00` 1 0 0 0 996 +d `0b720d0b020000000801000000dc0700` 0 7 3 0 997 +d `0b720b03060000000701000000880300` 1 0 0 0 998 +d `1949ff090b00000007020000009c0800` 0 2 4 0 999 +d `19790506080000000500000800060700` 0 4 3 0 1000 +d `927904010a0000000700000800480200` 0 1 1 0 1001 +d `197809ff010000000707000000960500` 1 0 0 0 1002 +d `00700b030e0000000c010008004e0c00` 1 0 0 0 1003 +d `187904ff03000000ff0f000000067f03` 0 4 7 37 1004 +d `1979040c0e000000070b0000009e0100` 1 0 0 0 1005 +d `19790700000000000601000800440f00` 0 5 7 0 1006 +d `8873090609000000030f000800480d00` 1 0 0 0 1007 +d `0c780e0e040000000400000800de1f01` 0 7 7 11 1008 +d `191809030c0000000500000800d40700` 0 7 3 0 1009 +d `08720903030000000e060000001a0500` 0 4 2 0 1010 +d `19790203090000000700000800940000` 0 2 0 0 1011 +d `0c720300040000000c0a000800960d00` 1 0 0 0 1012 +d `7a720107020000000700000000900200` 0 2 1 0 1013 +d `4579000d090000000000000000180f00` 0 4 7 0 1014 +d `3c720009030000000c00000800d00900` 0 7 4 0 1015 +d `19790c0604000000020300000094df03` 1 0 0 0 1016 +d `19790105ff0000000b01000000540d00` 1 0 0 0 1017 +d `1d7b09030d0000000900000000442900` 0 5 4 2 1018 +d `007001ff0d0000000e0d000000583f00` 1 0 0 0 1019 +d `4779fc00fcffffff0204000800000500` 0 4 2 0 1020 +d `1072040b000000000500000000da0900` 0 7 4 0 1021 +d `02720c0404000000010f000000820200` 0 2 1 0 1022 +d `1929ff030b00000003000000000a4001` 0 0 0 14 1023 +d `19790a0807000000080b000800cc0f00` 0 7 7 0 1024 +d `4d0907ff0a0000000d08000000c60c00` 1 0 0 0 1025 +d `887905080a00000007000000001e0900` 0 4 4 0 1026 +d `4779fc00fcffffff01000000008a0200` 0 2 1 0 1027 +d `197907000b0000000101000800440c00` 1 0 0 0 1028 +d `24780d0e070000000900000000480d00` 1 0 0 0 1029 +d `3c520b030d000000020a000000c40d00` 1 0 0 0 1030 +d `12780c000b00000008000000001e0b00` 0 4 5 0 1031 +d `92790a090700000009000000008c0300` 1 0 0 0 1032 +d `10620e0a020000000100000000420900` 0 5 4 0 1033 +d `1d7b060d080000000c00000000ca0b00` 0 7 5 0 1034 +d `884902080c0000000e00000800040e00` 0 0 7 0 1035 +d `1979070c0d0000000500000000920200` 0 2 1 0 1036 +d `19790c00ff0000000e02000000840700` 1 0 0 0 1037 +d `0573040d0e0000000a0d0000001ad901` 0 4 4 1d 1038 +d `19290a0907000000060c000000dc0100` 0 7 0 0 1039 +d `19090a01020000000601000000460a00` 0 1 5 0 1040 +d `12480907040000000b00000800160500` 0 4 2 0 1041 +d `4d79070c0b0000000a0000080054be03` 0 1 7 3b 1042 +d `19790505030000000a000008005e7200` 0 1 1 7 1043 +d `9279030e0b000000030f000000c20f00` 0 7 7 0 1044 +d `257800010b0000000701000000dc0300` 0 7 1 0 1045 +d `190908030a0000000e0100000098bc01` 1 0 0 0 1046 +d `19290b0b070000000e05000000507500` 0 5 2 7 1047 +d `247c080309000000ff00000000840a00` 0 2 5 0 1048 +d `1d7b0e09040000000d0600000042cb00` 0 5 5 c 1049 +d `8479010a0400000009010008004e0300` 0 5 1 0 1050 +d `19790aff0c000000000100000002f402` 0 0 2 2f 1051 +d `0c52070d000000000a00000000089f01` 0 4 7 19 1052 +d `0872080d0000000008080000009e0800` 0 2 4 0 1053 +d `47790c00000000000a01000800c60b00` 0 7 5 0 1054 +d `3c7209ff000000000000000000880b00` 1 0 0 0 1055 +d `12780805050000000501000000480300` 0 5 1 0 1056 +d `2072020d05000000070600000044db01` 0 5 5 1d 1057 +d `ff7f01ff020000000801000000c40b00` 1 0 0 0 1058 +d `84790e040e000000000f000000400e00` 1 0 0 0 1059 +d `1979040c060000000a000000008e0800` 0 2 4 0 1060 +d `08730a020d0000000600000800940000` 0 2 0 0 1061 +d `1929040a0b0000000d01000000d20e00` 0 3 7 0 1062 +d `18790d0702000000090e000000881202` 0 2 1 21 1063 +d `25780e00000000000501000000da0300` 0 7 1 0 1064 +d `1919000dff0000000700000000040e00` 0 0 7 0 1065 +d `0b120c0d0400000001020008000c0f00` 0 4 7 0 1066 +d `2072ff0805000000090e0008009c0900` 1 0 0 0 1067 +d `2371ff0708000000000e000800c40100` 1 0 0 0 1068 +d `1979010d030000000500000000180e00` 0 0 7 0 1069 +d `8f790d02090000000e020000004c6902` 0 5 4 26 1070 +d `08720c050200000002000000004e0e00` 0 1 7 0 1071 +d `4759fc00fcffffff0c04000000860f00` 1 0 0 0 1072 +d `8109020e030000000304000000120900` 0 4 4 0 1073 +d `1929080e06000000020c0000004e0400` 0 1 2 0 1074 +d `8f790905ff0000000e000008005e0400` 0 1 2 0 1075 +d `19790602ff000000ff000000000c0a00` 0 0 5 0 1076 +d `0c7208020c0000000a01000000100700` 0 4 3 0 1077 +d `88790d070c000000ff0000080010ed02` 1 0 0 0 1078 +d `19790505050000000400000000520200` 0 1 1 0 1079 +d `24720402050000000200000000120400` 0 0 2 0 1080 +d `19290109ff00000009080000000a0200` 0 0 1 0 1081 +d `1979ff04020000000600000000ca0000` 0 3 0 0 1082 +d `ff2fff0b00000000060c00000052f503` 1 0 0 0 1083 +d `0573020d070000000d0800080080b301` 1 0 0 0 1084 +d `3e720a0c0a000000ff09000800920b00` 1 0 0 0 1085 +d `19790d0d06000000010300000046e401` 0 1 2 1e 1086 +d `23720a070b000000040000080044c602` 0 1 3 2c 1087 +d `0972020e0a0000000e01000000862a03` 0 2 5 32 1088 +d `4779080000000000070c00000086de03` 0 2 7 3d 1089 +d `1979050e0a0000000901000800140200` 0 0 1 0 1090 +d `21720e01040000000e00000800c80600` 0 3 3 0 1091 +d `197907020a0000000902000800440f00` 0 5 7 0 1092 +d `197905070c000000060100080052e402` 0 1 2 2e 1093 +d `456904ff040000000200000000440200` 0 1 1 0 1094 +d `23720a0b0b0000000606000000ce0800` 0 3 4 0 1095 +d `1278ff0a000000000b01000000520800` 0 1 4 0 1096 +d `0020ff05060000000601000800020d00` 1 0 0 0 1097 +d `0972080e0b00000002000000008a0600` 0 2 3 0 1098 +d `ac57090a0900000004000000009c0200` 0 2 1 0 1099 +d `1979030a0a0000000400000000c80c00` 1 0 0 0 1100 +d `1979020c040000000303000800840100` 1 0 0 0 1101 +d `2472050c020000000900000000860100` 1 0 0 0 1102 +d `19590e030b0000000501000800580200` 0 1 1 0 1103 +d `1d7b0b0b090000000c01000000d00200` 0 3 1 0 1104 +d `ac77010c080000000201000000c60300` 0 7 1 0 1105 +d `4579070a070000000301000000880b00` 1 0 0 0 1106 +d `19490909060000000700000000842f02` 1 0 0 0 1107 +d `19790e0e030000000a00000000cc0800` 0 3 4 0 1108 +d `19790108060000000b00000000183e00` 0 0 7 3 1109 +d `887909080b000000ff010008001a0e00` 0 0 7 0 1110 +d `19790d000e0000000a070000001a0e00` 0 0 7 0 1111 +d `1979050d07000000ff08000000120e00` 0 0 7 0 1112 +d `1979ff0dff000000ff010008001a0500` 0 4 2 0 1113 +d `19390806080000000700000800d4cf02` 0 7 7 2c 1114 +d `19780507ff0000000a0a000000020d00` 1 0 0 0 1115 +d `4d59090a0b000000020c000000c26802` 0 3 4 26 1116 +d `3e720107070000000a010008009e0300` 1 0 0 0 1117 +d `0c720e020e0000000d030008005a0500` 0 5 2 0 1118 +d `19020908000000000401000800c20900` 0 7 4 0 1119 +d `00600c030a0000000a01000000d20800` 1 0 0 0 1120 +d `45790103000000000e010000001c0b00` 0 4 5 0 1121 +d `197800090c0000000a050000005c0200` 0 1 1 0 1122 +d `3e02040c050000000b09000000d60d00` 1 0 0 0 1123 +d `00400b0d080000000500000000dac302` 1 0 0 0 1124 +d `4179000304000000080d000000402902` 0 5 4 22 1125 +d `0b02ff0102000000050700080004fa00` 0 0 5 f 1126 +d `2072070cff0000000e000000005e0100` 0 5 0 0 1127 +d `08130a09040000000800000800da4f01` 0 7 7 14 1128 +d `0070ff02020000000300000000460d00` 1 0 0 0 1129 +d `09720705060000000a01000800cc0f00` 0 7 7 0 1130 +d `1919030605000000060c0000001c0c00` 1 0 0 0 1131 +d `18790608090000000703000000920000` 0 2 0 0 1132 +d `895f0705040000000701000800806d01` 1 0 0 0 1133 +d `0b720b0209000000ff01000000d20c00` 1 0 0 0 1134 +d `19790c060e0000000c00000000da0802` 0 3 4 20 1135 +d `08730000050000000200000800420a00` 0 1 5 0 1136 +d `1979000a060000000501000800569402` 0 1 2 29 1137 +d `3e72030a080000000704000000060100` 0 4 0 0 1138 +d `247809080b0000000d01000800440700` 0 5 3 0 1139 +d `1d0b0305090000000a01000000c80e00` 0 3 7 0 1140 +d `27720c020d00000002000000001e0a00` 0 0 5 0 1141 +d `1979090b0b00000005060008008a0100` 1 0 0 0 1142 +d `08730d05090000000301000000980b00` 1 0 0 0 1143 +d `0872070d09000000010d000000c60b00` 0 7 5 0 1144 +d `02720b07000000000d00000800da0e00` 0 3 7 0 1145 +d `92790e0a050000000d00000000c60f00` 0 7 7 0 1146 +d `237100ff070000000400000000d00c00` 1 0 0 0 1147 +d `10720a04000000000501000000c20200` 0 3 1 0 1148 +d `1979020c0a0000000d00000000840e00` 0 2 7 0 1149 +d `ac770e09060000000b020008005e0c00` 1 0 0 0 1150 +d `7a720e00030000000101000000c46c01` 1 0 0 0 1151 +d `457207080100000004000000000a0b00` 0 4 5 0 1152 +d `19790b07080000000000000000d00c00` 1 0 0 0 1153 +d `1d7b0300040000000700000000088f00` 0 4 7 8 1154 +d `0218ff030a0000000501000000460f00` 0 5 7 0 1155 +d `1949090b000000000500000000140900` 0 4 4 0 1156 +d `25780704040000000401000000c80b00` 0 7 5 0 1157 +d `826b0e0901000000070d0000008a0300` 1 0 0 0 1158 +d `88790b08030000000500000000de0e00` 0 3 7 0 1159 +d `247203090c000000010c000000020c00` 1 0 0 0 1160 +d `45720806ff0000000100000800140100` 0 4 0 0 1161 +d `ff1f010a030000000b0d000800120800` 1 0 0 0 1162 +d `ac170c0905000000020a0000009a7f03` 1 0 0 0 1163 +d `9279020807000000070a000800da0b00` 0 7 5 0 1164 +d `0c7c0701080000000a0b000800420100` 0 5 0 0 1165 +d `882904020a0000000b090008009e0b00` 1 0 0 0 1166 +d `1979020bff0000000700000000180000` 0 0 0 0 1167 +d `9279030908000000010a000000da0900` 0 7 4 0 1168 +d `3e720309050000000c000000004a0800` 0 1 4 0 1169 +d `1d0b020000000000ff01000000009903` 0 4 4 39 1170 +d `19690c050a000000080100080086c702` 1 0 0 0 1171 +d `4759fc00fcffffff0c00000800cc0b00` 0 7 5 0 1172 +d `21720e02070000000c0c0008004efe02` 0 1 7 2f 1173 +d `0b7203010c0000000308000000480500` 0 5 2 0 1174 +d `0278050b0b0000000100000000502f01` 0 5 7 12 1175 +d `0c5c05000e00000005000008008a0e00` 0 2 7 0 1176 +d `0c780c04050000000100000800500000` 0 1 0 0 1177 +d `3e720100000000000801000000ca0900` 0 7 4 0 1178 +d `246205040d0000000804000000540100` 0 5 0 0 1179 +d `237107050d000000ff05000000080300` 1 0 0 0 1180 +d `19490c06030000000d00000000120000` 0 0 0 0 1181 +d `1929060e060000000b0b000000dcf402` 0 3 2 2f 1182 +d `19790b01000000000701000800820500` 1 0 0 0 1183 +d `827b030a0c000000090e000000c6b902` 1 0 0 0 1184 +d `9279090d0d0000000300000000de1f03` 0 7 7 31 1185 +d `0c620404020000000d00000000520900` 0 5 4 0 1186 +d `897f06090000000007000000009eee00` 0 2 7 e 1187 +d `12780c02000000000704000800c06302` 0 7 1 26 1188 +d `0272000e0a0000000d0a000800c20d00` 1 0 0 0 1189 +d `197905ff0e0000000802000800cc0f00` 0 7 7 0 1190 +d `247c01030d000000030f000000ccd501` 0 7 2 1d 1191 +d `02780503040000000c01000000c8d300` 0 7 1 d 1192 +d `2072020a0300000003000000001c0a00` 0 0 5 0 1193 +d `250804080b0000000604000800820100` 1 0 0 0 1194 +d `19290608030000000e000008000a0600` 0 0 3 0 1195 +d `0c78010a0e0000000406000800d83803` 0 3 4 33 1196 +d `27720904000000000800000000580e00` 0 1 7 0 1197 +d `897f010601000000ff07000000c60f00` 0 7 7 0 1198 +d `19180e04060000000b0c000000de0f00` 0 7 7 0 1199 +d `005002050300000002080000009a0800` 1 0 0 0 1200 +d `19790002020000000306000000c40900` 0 7 4 0 1201 +d `12220402080000000900000000980b00` 1 0 0 0 1202 +d `20720a090900000003010000008a0d00` 1 0 0 0 1203 +d `182909080b00000007010000008cc500` 1 0 0 0 1204 +d `45520dff090000000401000800180500` 0 4 2 0 1205 +d `12680b01060000000900000000d81302` 0 7 1 21 1206 +d `197900000d0000000d0e0000000e0f00` 0 4 7 0 1207 +d `19490d02000000000700000000d88102` 0 7 0 28 1208 +d `245c07020a000000080800000082ce02` 0 2 7 2c 1209 +d `092200040100000000030008001e0800` 0 0 4 0 1210 +d `0c780c0c04000000020a0008008e0f00` 1 0 0 0 1211 +d `4572ff0808000000010f0000009e4903` 1 0 0 0 1212 +d `08720a02000000000c040008004a0a00` 0 1 5 0 1213 +d `ac7703040a000000ff01000800d60000` 0 3 0 0 1214 +d `217205000500000005080008005e0900` 0 5 4 0 1215 +d `1879000608000000ff00000000900900` 1 0 0 0 1216 +d `197908ff000000000301000000d0cb02` 0 7 5 2c 1217 +d `18790d0a07000000ff0a000000ca7001` 0 3 0 17 1218 +d `02580009080000000c01000000dc0b00` 0 7 5 0 1219 +d `1969ff0b010000000e000000004e0500` 0 5 2 0 1220 +d `27720401ff0000000103000800ca0100` 0 7 0 0 1221 +d `25780400060000000a01000800860900` 1 0 0 0 1222 +d `197904030a0000000508000800900300` 1 0 0 0 1223 +d `19790207000000000b06000000980e00` 0 2 7 0 1224 +d `193801000d0000000706000000cc0c00` 1 0 0 0 1225 +d `81790e08040000000300000000d80d00` 1 0 0 0 1226 +d `4d790004ff0000000c00000000160100` 0 4 0 0 1227 +d `ff7f090508000000030c0000001c0b00` 1 0 0 0 1228 +d `19790e0c03000000060c000000c82e03` 0 3 7 32 1229 +d `8179020302000000080100000018de02` 0 0 7 2d 1230 +d `1979040402000000090a000000ca0e00` 0 3 7 0 1231 +d `2772050c070000000d010000005e0c00` 1 0 0 0 1232 +d `ac37080e020000000008000800480400` 0 1 2 0 1233 +d `247203ff090000000100000800d20f00` 0 7 7 0 1234 +d `057309060e0000000e00000000466f01` 0 5 7 16 1235 +d `1979060c0800000007000008000c0900` 0 4 4 0 1236 +d `195902020a0000000700000800d02701` 0 7 3 12 1237 +d `1979ffff0e0000000a000000008a0000` 0 2 0 0 1238 +d `8f190e0aff000000000a000800580b00` 0 5 5 0 1239 +d `09420507080000000b02000800920e00` 0 2 7 0 1240 +d `1919ff0d060000000800000000120f00` 0 4 7 0 1241 +d `19790700ff000000010c000000d82b02` 0 7 5 22 1242 +d `247c0204060000000601000800480300` 0 5 1 0 1243 +d `ff7f0302030000000c01000000c20e00` 1 0 0 0 1244 +d `2332ff050a0000000c02000800ce0b00` 0 7 5 0 1245 +d `0b7204ff0900000001060000008e0e00` 0 2 7 0 1246 +d `92790d02030000000d00000800d80d00` 1 0 0 0 1247 +d `057307000c0000000401000800c00800` 0 3 4 0 1248 +d `257806ff060000000400000000840e00` 0 2 7 0 1249 +d `19790c04ff0000000900000000dc0200` 0 3 1 0 1250 +d `12720a06010000000800000800824102` 1 0 0 0 1251 +d `19780d030500000003000008009afe01` 0 2 7 1f 1252 +d `1979080a0700000009000000004e0700` 0 5 3 0 1253 +d `45790200040000000c00000000540600` 0 1 3 0 1254 +d `1979010b070000000d00000800cc0e00` 0 3 7 0 1255 +d `41790d02050000000e000000001c0c00` 1 0 0 0 1256 +d `19790004090000000906000000ca0d00` 1 0 0 0 1257 +d `86790c05060000000e00000000020900` 0 4 4 0 1258 +d `4d790b06010000000100000800dac603` 0 3 3 3c 1259 +d `23420103060000000304000000940700` 1 0 0 0 1260 +d `232107010000000000000000001a0300` 1 0 0 0 1261 +d `4d290904030000000801000800560600` 0 1 3 0 1262 +d `19790c0b0d000000060a000000580e00` 0 1 7 0 1263 +d `237100020600000000010000005a0e00` 1 0 0 0 1264 +d `25780c0c010000000e0e000000580b00` 0 5 5 0 1265 +d `0c780704080000000800000000d8a301` 0 7 1 1a 1266 +d `02720102040000000701000800c40500` 0 7 2 0 1267 +d `1042090d090000000201000000d22f01` 0 7 7 12 1268 +d `1978040b070000000501000000900400` 0 2 2 0 1269 +d `19790d040b0000000100000800480800` 0 1 4 0 1270 +d `19790208040000000a07000000c80c00` 1 0 0 0 1271 +d `88730809010000000a01000000cc0900` 0 7 4 0 1272 +d `19790c0a020000000800000800800900` 1 0 0 0 1273 +d `242c020b0600000004010008000a0f00` 0 4 7 0 1274 +d `08730304000000000b0600000046a302` 0 5 1 2a 1275 +d `ac370c06ff000000070e0008004ec802` 1 0 0 0 1276 +d `1978090202000000ff000008008e0100` 1 0 0 0 1277 +d `19790809ff0000000900000000c60500` 0 7 2 0 1278 +d `1272060bff0000000c0e000000ca0800` 0 3 4 0 1279 +d `247802ff050000000307000000502301` 0 5 1 12 1280 +d `897f03090b0000000a050008008a0f00` 1 0 0 0 1281 +d `190902050b000000ff01000000dc0a00` 0 3 5 0 1282 +d `19790a0403000000050a000000420a00` 0 1 5 0 1283 +d `19790707020000000800000000ce0500` 0 7 2 0 1284 +d `02780c08010000000e010008000e0d00` 1 0 0 0 1285 +d `197902070c0000000a00000000980b00` 1 0 0 0 1286 +d `81090e08000000000200000000c20f00` 0 7 7 0 1287 +d `197902ff090000000200000000040e00` 0 0 7 0 1288 +d `1909020204000000030e0000005a4003` 0 1 0 34 1289 +d `057302ff0d000000010b000800020100` 0 4 0 0 1290 +d `4d790d0c0a0000000700000000d60f00` 0 7 7 0 1291 +d `05730d040e0000000b020008005c0d00` 1 0 0 0 1292 +d `087305ff090000000207000000d00200` 0 3 1 0 1293 +d `122801020b000000070e000000dea903` 0 7 4 3a 1294 +d `187903ff090000000000000000cc0400` 0 3 2 0 1295 +d `12720a0a030000000e00000000800c00` 1 0 0 0 1296 +d `00600b0d09000000ff00000800560c00` 1 0 0 0 1297 +d `18590202080000000605000800c0ff03` 0 7 7 3f 1298 +d `1252010c0c0000000e0d000000d60c00` 1 0 0 0 1299 +d `09320c0e060000000900000800061402` 0 0 2 21 1300 +d `19790e0e070000000504000000060100` 0 4 0 0 1301 +d `027802090000000000000000001a0700` 0 4 3 0 1302 +d `45720602020000000900000000c49003` 0 3 0 39 1303 +d `21720506060000000c0e000000c40d00` 1 0 0 0 1304 +d `19790508070000000c0c0000008c0c00` 1 0 0 0 1305 +d `197904090a0000000904000800ce0d00` 1 0 0 0 1306 +d `a809000eff000000030a000000080c00` 1 0 0 0 1307 +d `194903ff0a0000000308000000940c00` 1 0 0 0 1308 +d `19790b0c05000000ff0b000000d80600` 0 3 3 0 1309 +d `1979020e070000000b01000000c80900` 0 7 4 0 1310 +d `2472010e03000000ff00000000040d00` 1 0 0 0 1311 +d `925905ff010000000a0b0000008e0900` 1 0 0 0 1312 +d `12380b00080000000001000000d00d00` 1 0 0 0 1313 +d `0b2206020b0000000801000000d82901` 0 7 4 12 1314 +d `0862010c04000000030e000800d80700` 0 7 3 0 1315 +d `1979050a080000000300000000cc0f00` 0 7 7 0 1316 +d `09720407090000000901000000920300` 1 0 0 0 1317 +d `847903090600000005000008008a5e00` 0 2 7 5 1318 +d `827b080d070000000b0f000000980800` 1 0 0 0 1319 +d `2772030600000000ff01000000c80200` 0 3 1 0 1320 +d `821b0203050000000c07000800060c00` 1 0 0 0 1321 +d `236100070b00000004000000008e0f00` 1 0 0 0 1322 +d `0c2c0802040000000c020000009e0f00` 1 0 0 0 1323 +d `197204070c000000ff00000000900700` 1 0 0 0 1324 +d `1859030e04000000ff00000000d88a01` 0 3 5 18 1325 +d `19720a0e070000000600000800900f00` 1 0 0 0 1326 +d `887904ff0d000000080e000800cce901` 1 0 0 0 1327 +d `197906030b00000006010000009a0400` 0 2 2 0 1328 +d `191901ff0b000000080b000000d43200` 0 3 1 3 1329 +d `4d790bff0b0000000a000000009e5602` 0 2 3 25 1330 +d `2371080c0c0000000106000000d40f00` 1 0 0 0 1331 +d `1979060e0c0000000404000800420a00` 0 1 5 0 1332 +d `1978030c0c000000090000080006b301` 0 4 1 1b 1333 +d `19790704040000000200000000c4e500` 0 7 2 e 1334 +d `08720eff050000000000000000da0000` 0 3 0 0 1335 +d `24780901050000000a00000000580800` 0 1 4 0 1336 +d `09720e020200000007040000004e0500` 0 5 2 0 1337 +d `41790e0c000000000a0f000000560e00` 0 1 7 0 1338 +d `0c38060d03000000010a000800c40d00` 1 0 0 0 1339 +d `1979030908000000080b000000daae00` 0 3 7 a 1340 +d `a8790d090b0000000e04000000da6502` 0 7 2 26 1341 +d `1062030c020000000301000800ce1b02` 0 7 5 21 1342 +d `2172070cff0000000807000000ce4101` 0 7 0 14 1343 +d `19790a0909000000090a000800528503` 0 5 2 38 1344 +d `25780b080000000008000000005a0a00` 0 1 5 0 1345 +d `00700c070d0000000908000800040000` 1 0 0 0 1346 +d `7a320307030000000700000000440100` 0 5 0 0 1347 +d `2558ff0102000000050c000000c20300` 0 7 1 0 1348 +d `19790b05050000000c02000800d4ff03` 0 7 7 3f 1349 +d `007001ff0400000000000000004a5e00` 1 0 0 0 1350 +d `250800080b000000070c000000d28f03` 0 7 7 38 1351 +d `1979000a0a000000090000080080c802` 0 2 4 2c 1352 +d `1979080e0a00000004020000008a8900` 1 0 0 0 1353 +d `08730300010000000909000800c00d00` 1 0 0 0 1354 +d `19790e04040000000706000800480f00` 0 5 7 0 1355 +d `3e7203040400000003000008001ea701` 0 4 3 1a 1356 +d `3c720c050c0000000e040000009e0e00` 0 2 7 0 1357 +d `19790b05ff0000000d06000800ce0900` 0 7 4 0 1358 +d `19290302ff00000001010008008a0300` 1 0 0 0 1359 +d `2472030e0c0000000d0b000800ca0c00` 1 0 0 0 1360 +d `7a72090d090000000304000800d00500` 0 7 2 0 1361 +d `19790807060000000b090000009ee201` 0 2 1 1e 1362 +d `19790c0c0e000000040b000000500e00` 0 1 7 0 1363 +d `197902070a00000007000000005c0f00` 0 5 7 0 1364 +d `19790501090000000201000000cc0f00` 0 7 7 0 1365 +d `19790b030800000007000000001c0f00` 0 4 7 0 1366 +d `827b0b09ff00000001000000005a0300` 0 5 1 0 1367 +d `4779000000000000090c000800500000` 0 1 0 0 1368 +d `ff7f00090b0000000c00000000840400` 1 0 0 0 1369 +d `7a120400040000000c02000000ce0000` 0 3 0 0 1370 +d `8679010a06000000030d000800000300` 0 4 1 0 1371 +d `197808090a0000000901000000520100` 0 5 0 0 1372 +d `19090e08090000000100000800480d00` 1 0 0 0 1373 +d `ff7f0302000000000e08000000c00e00` 1 0 0 0 1374 +d `81790302020000000706000800d67a00` 0 3 5 7 1375 +d `057304040e00000001000008009a1602` 0 2 3 21 1376 +d `09720a090a000000ff010008001c0e00` 0 0 7 0 1377 +d `45790206050000000c00000000866e02` 0 2 7 26 1378 +d `84090e05030000000900000000506e03` 0 1 7 36 1379 +d `417909040c0000000d01000000847602` 0 2 3 27 1380 +d `2372070809000000010c0008009a0e00` 0 2 7 0 1381 +d `10720c010c00000002000008004a0800` 0 1 4 0 1382 +d `1979ff0c0d000000ff00000800c62d03` 1 0 0 0 1383 +d `3c720c030b0000000a00000800140300` 0 4 1 0 1384 +d `25780009050000000301000800c20500` 0 7 2 0 1385 +d `821b0109010000000a04000000c4af00` 0 7 7 a 1386 +d `12780b0b0a0000000400000000d80d00` 1 0 0 0 1387 +d `1979030d0100000007080000008e0f00` 1 0 0 0 1388 +d `45720504080000000100000000460a00` 0 1 5 0 1389 +d `827b0708080000000d0c0000009a0d00` 1 0 0 0 1390 +d `1939000900000000010b00080018af02` 0 4 7 2a 1391 +d `027203070e0000000301000000d80f00` 0 7 7 0 1392 +d `19390506040000000801000000540900` 0 5 4 0 1393 +d `27720209080000000b000008008c9303` 1 0 0 0 1394 +d `a839050e040000000503000800ccaa02` 0 3 5 2a 1395 +d `23510e03020000000b0c0000000e7803` 1 0 0 0 1396 +d `927901070400000007000000008c0900` 1 0 0 0 1397 +d `08730c080b0000000600000000800700` 1 0 0 0 1398 +d `25780c0e04000000020c0008000c0100` 0 4 0 0 1399 +d `8f79ff0c000000000900000000ce0f00` 0 7 7 0 1400 +d `19190c0906000000090400080080a801` 0 2 4 1a 1401 +d `0c7c06040a00000001010008001c0c00` 1 0 0 0 1402 +d `84590c0901000000040a0008009c0f00` 1 0 0 0 1403 +d `3c520704020000000401000000960a01` 0 2 5 10 1404 +d `0573040c0e000000ff0d000000186201` 0 0 1 16 1405 +d `1938030b090000000403000800940b00` 1 0 0 0 1406 +d `0873010d020000000900000800040400` 0 0 2 0 1407 +d `4539040e040000000a010000008a0900` 1 0 0 0 1408 +d `19780d02020000000209000000440f00` 0 5 7 0 1409 +d `197904040c0000000d0100080014f102` 0 4 0 2f 1410 +d `1979090706000000010c000800d80e00` 0 3 7 0 1411 +d `2312030e0c0000000500000000d40300` 0 7 1 0 1412 +d `3e020203ff0000000500000800dc0700` 0 7 3 0 1413 +d `12780008000000000200000000820e00` 0 2 7 0 1414 +d `1979060e050000000301000000980f00` 1 0 0 0 1415 +d `847908000c000000020a000800560c00` 1 0 0 0 1416 +d `05730906020000000400000000d03903` 0 7 4 33 1417 +d `4d7901ff030000000d0a0000000e0600` 0 0 3 0 1418 +d `0c42ff0d0a0000000100000000880d00` 1 0 0 0 1419 +d `19790b0b0d0000000200000000cc0500` 0 7 2 0 1420 +d `19790703000000000d00000800c60500` 0 7 2 0 1421 +d `1979020c070000000d00000800c40300` 0 7 1 0 1422 +d `20720c020700000005010000000e0f00` 0 4 7 0 1423 +d `0813010c080000000b020000008cb101` 1 0 0 0 1424 +d `8f790309050000000401000800cc4401` 0 3 2 14 1425 +d `19190b0cff0000000502000000d8e503` 0 7 2 3e 1426 +d `0b7207ff0a0000000207000800d40d00` 1 0 0 0 1427 +d `197904060400000006000000004a5103` 0 5 0 35 1428 +d `19780c09010000000a09000000580800` 0 1 4 0 1429 +d `1979090305000000060b000000d80100` 0 7 0 0 1430 +d `21520703070000000e01000000da0a00` 0 3 5 0 1431 +d `0b72030b0600000001000000001e0300` 0 4 1 0 1432 +d `86790b030b0000000600000000c42e00` 0 3 7 2 1433 +d `197901050a0000000b0c0000008c0400` 0 2 2 0 1434 +d `197908010a0000000302000000180f00` 0 4 7 0 1435 +d `19180c0a0c000000ff0000080098af01` 1 0 0 0 1436 +d `19790e020e0000000600000000000a00` 0 0 5 0 1437 +d `191902000d000000ff0b000000920700` 1 0 0 0 1438 +d `8439020509000000ff02000000980200` 0 2 1 0 1439 +d `4572020c080000000d01000800ca0500` 0 7 2 0 1440 +d `025808000a0000000d04000800c80400` 0 3 2 0 1441 +d `19790b0e05000000090f000800520000` 0 1 0 0 1442 +d `3c720b0907000000ff0a000800c07f02` 0 7 7 27 1443 +d `197903040e0000000500000000540600` 0 1 3 0 1444 +d `027206ff0e0000000000000800080e00` 0 0 7 0 1445 +d `19780e0407000000030b0000004c0a00` 0 1 5 0 1446 +d `1922070504000000ff000008001e5a00` 0 0 5 5 1447 +d `4d290d070d00000008010008009c0500` 1 0 0 0 1448 +d `88790a03080000000d0c000000520e02` 0 1 7 20 1449 +d `19790108060000000d000000004e0200` 0 1 1 0 1450 +d `247c07080e0000000206000800c8cb00` 0 7 5 c 1451 +d `19190402000000000b08000800ccbb02` 0 7 5 2b 1452 +d `ff7f0200090000000601000000d43f01` 1 0 0 0 1453 +d `88790d010d0000000908000000d89e02` 0 3 7 29 1454 +d `0b720901090000000a01000800560100` 0 5 0 0 1455 +d `194905070b0000000409000000860300` 1 0 0 0 1456 +d `10720408ff0000000001000800800800` 0 2 4 0 1457 +d `19290903040000000b04000000d80600` 0 3 3 0 1458 +d `19780a0a0100000006030000005eb800` 0 1 4 b 1459 +d `027204ff000000000c00000000180f00` 0 4 7 0 1460 +d `1948ff0d040000000506000000480e00` 0 1 7 0 1461 +d `845906070300000002000000005ed702` 0 5 3 2d 1462 +d `19790e04040000000404000000c40e00` 0 3 7 0 1463 +d `243809020a0000000400000000d40300` 0 7 1 0 1464 +d `000004090a0000000006000000840900` 1 0 0 0 1465 +d `86790e02000000000508000800d00600` 0 3 3 0 1466 +d `1839040e060000000e000000009a6f01` 1 0 0 0 1467 +d `19290b00ff00000008010008005a2601` 0 1 3 12 1468 +d `19390e080e0000000401000000dc0400` 0 3 2 0 1469 +d `19790dff0b0000000900000000980a00` 0 2 5 0 1470 +d `886306020b0000000c00000000040d00` 1 0 0 0 1471 +d `0c580b06040000000700000000d00700` 0 7 3 0 1472 +d `19790401070000000600000000940200` 0 2 1 0 1473 +d `4d790b050b00000000080008000ed802` 0 0 4 2d 1474 +d `19790702040000000900000000d00900` 0 7 4 0 1475 +d `840907000a0000000e00000000c20d03` 1 0 0 0 1476 +d `0c78050a0d0000000c0e0000008a0f00` 1 0 0 0 1477 +d `19190d09060000000707000000920500` 1 0 0 0 1478 +d `a879070508000000ff09000000440000` 0 1 0 0 1479 +d `7a520d060800000008030000009a5303` 1 0 0 0 1480 +d `08530204070000000c00000000447801` 0 1 4 17 1481 +d `897f06ff000000000800000800880400` 0 2 2 0 1482 +d `8179ff08060000000500000000120f00` 0 4 7 0 1483 +d `21720a080b0000000801000000d60100` 0 7 0 0 1484 +d `257807050900000002020000001c0d00` 1 0 0 0 1485 +d `1d6b09090d0000000e00000800c00600` 0 3 3 0 1486 +d `19790505070000000301000000d80d00` 1 0 0 0 1487 +d `1072030b00000000080c00000014cb03` 0 4 5 3c 1488 +d `1979ff070500000004020000008c0100` 1 0 0 0 1489 +d `277202000c0000000b010008009c0100` 1 0 0 0 1490 +d `92790309070000000c01000000180000` 0 0 0 0 1491 +d `21720e07040000000501000800860e00` 0 2 7 0 1492 +d `3c320d030b0000000d000008005a0f00` 0 5 7 0 1493 +d `08720bff0b000000080100080044ee03` 0 1 7 3e 1494 +d `23720105030000000100000800860c00` 1 0 0 0 1495 +d `7a420102080000000a07000000963501` 1 0 0 0 1496 +d `867906030400000003000000001e0f00` 0 4 7 0 1497 +d `19790b05090000000100000000465e01` 0 1 7 15 1498 +d `19780602060000000e00000000020700` 0 4 3 0 1499 +d `88730d0e070000000a020000001a0900` 0 4 4 0 1500 +d `0c72050209000000ff04000800580600` 0 1 3 0 1501 +d `097200060e0000000701000000cc5100` 0 7 0 5 1502 +d `3c72070104000000030b000800c60300` 0 7 1 0 1503 +d `8f79ff0600000000000f0008001a2f02` 0 4 7 22 1504 +d `10720905070000000906000000c60700` 0 7 3 0 1505 +d `1979ff09080000000204000800c80a00` 0 3 5 0 1506 +d `12780b05020000000700000000c4d500` 0 7 2 d 1507 +d `1979030e0e0000000c0f000000d20400` 0 3 2 0 1508 +d `19790b03050000000600000000d6ab02` 0 7 5 2a 1509 +d `08720eff090000000100000000040800` 0 0 4 0 1510 +d `02720805060000000d00000800ce0500` 0 7 2 0 1511 +d `1979040300000000050a000800080d00` 1 0 0 0 1512 +d `24720a0c0b000000010000080096ca00` 0 2 5 c 1513 +d `247c090c05000000000c0000009a0900` 1 0 0 0 1514 +d `197907040e0000000d000000001a0f00` 0 4 7 0 1515 +d `241c0c050d0000000001000800120e00` 0 0 7 0 1516 +d `08720301030000000609000000801600` 0 2 3 1 1517 +d `41290b0707000000070c0000008e0100` 1 0 0 0 1518 +d `0873000a0a0000000306000000d20f00` 0 7 7 0 1519 +d `0972030101000000ff01000000ca0900` 0 7 4 0 1520 +d `ac470103090000000302000000840000` 0 2 0 0 1521 +d `45720701010000000a000000005e0e00` 0 1 7 0 1522 +d `88790bff080000000e01000000460e00` 0 1 7 0 1523 +d `12720bff0c0000000300000000940e00` 0 2 7 0 1524 +d `4d79090c060000000001000000da0e00` 0 3 7 0 1525 +d `3c720c07050000000d00000000400100` 0 5 0 0 1526 +d `1d6b01ff010000000e0000080088f603` 0 2 3 3f 1527 +d `0c620101070000000d0b0000008a0e00` 0 2 7 0 1528 +d `197909070b0000000300000800486e01` 0 1 7 16 1529 +d `022206010100000005000000004c0700` 0 5 3 0 1530 +d `1979050e010000000301000000c07d02` 1 0 0 0 1531 +d `19290c0a0e0000000208000000140a00` 0 0 5 0 1532 +d `4179080a0e00000000000000009e0800` 0 2 4 0 1533 +d `88730e08ff0000000b0c0000001c0f00` 0 4 7 0 1534 +d `0c7c0e000800000008000008004a0700` 0 5 3 0 1535 +d `19790008020000000506000000d60e00` 0 3 7 0 1536 +d `45720200020000000c0e00080058bf02` 0 5 7 2b 1537 +d `19690d03000000000a00000000867900` 1 0 0 0 1538 +d `0c72040405000000ff00000000500600` 0 1 3 0 1539 +d `41790d06030000000000000000d60700` 0 7 3 0 1540 +d `887908090700000003040000000a0b00` 0 4 5 0 1541 +d `007003ff080000000501000800880500` 1 0 0 0 1542 +d `867906000d0000000a0a000800460800` 0 1 4 0 1543 +d `816900060100000002000000009a0400` 0 2 2 0 1544 +d `897f060c08000000040b000000980d00` 1 0 0 0 1545 +d `1859030907000000050c000000920d00` 1 0 0 0 1546 +d `4109050a020000000a00000000d49d00` 1 0 0 0 1547 +d `4719fc00fcffffff06000000000e0900` 0 4 4 0 1548 +d `45790107060000000600000800960000` 0 2 0 0 1549 +d `19790705030000000701000000de0b00` 0 7 5 0 1550 +d `827b07ffff0000000701000000860d00` 1 0 0 0 1551 +d `86290205030000000506000000c20f00` 0 7 7 0 1552 +d `4572020400000000060c000000d00d00` 1 0 0 0 1553 +d `0b22ff09060000000600000000500100` 0 5 0 0 1554 +d `1979ff000d0000000008000000080300` 0 4 1 0 1555 +d `0873ff06020000000b00000800968501` 1 0 0 0 1556 +d `81790b0c0a000000090a000000500400` 0 1 2 0 1557 +d `8873020b070000000001000000080b00` 0 4 5 0 1558 +d `8f7908090500000002000000004ed100` 0 5 0 d 1559 +d `3c720004030000000200000000580100` 0 5 0 0 1560 +d `0272ff020d0000000909000800480300` 0 5 1 0 1561 +d `1979ff03020000000d00000000920c00` 1 0 0 0 1562 +d `27720a0bff0000000100000000840f00` 1 0 0 0 1563 +d `19790d0b010000000d00000000900400` 0 2 2 0 1564 +d `3c720d0c030000000a01000800940800` 0 2 4 0 1565 +d `09520e040e0000000d0f0000008c0d00` 1 0 0 0 1566 +d `197908090c000000020b0008001e0b00` 0 4 5 0 1567 +d `21620d00030000000908000800000f00` 0 4 7 0 1568 +d `12720d07ff0000000902000800da0100` 0 7 0 0 1569 +d `23720b08000000000100000000920a00` 0 2 5 0 1570 +d `ac770e0708000000010e0008009e0200` 1 0 0 0 1571 +d `45790706010000000600000000d47d01` 1 0 0 0 1572 +d `02720a0c020000000901000000de0b00` 0 7 5 0 1573 +d `19590c090b0000000e00000800d20f00` 0 7 7 0 1574 +d `3c3208ff0c000000ff01000800560f00` 0 5 7 0 1575 +d `247c0d0b09000000000f0008009a0600` 0 2 3 0 1576 +d `245807040b0000000d0d000800420b00` 0 5 5 0 1577 +d `20720806080000000b0d000000060800` 0 0 4 0 1578 +d `a879010e050000000801000800820700` 1 0 0 0 1579 +d `0c320802040000000308000000560000` 0 1 0 0 1580 +d `00700d0a0d0000000101000000160700` 1 0 0 0 1581 +d `0c780409040000000601000000120500` 0 4 2 0 1582 +d `00700202010000000d09000000c80500` 1 0 0 0 1583 +d `1979080b0d000000080c000800c00100` 0 7 0 0 1584 +d `ff7f060e06000000010b0008004e3a00` 1 0 0 0 1585 +d `8f790d010a000000ff00000800480000` 0 1 0 0 1586 +d `24420807030000000501000000082400` 0 0 2 2 1587 +d `05230305040000000300000000de0a00` 0 3 5 0 1588 +d `8f790aff0e00000008060000000cff03` 0 4 7 3f 1589 +d `9259ff040d000000080000000002c303` 0 4 1 3c 1590 +d `19790403080000000901000000040e00` 0 0 7 0 1591 +d `19790a090d0000000b0e000000cc0700` 0 7 3 0 1592 +d `7a720505050000000201000800560700` 0 5 3 0 1593 +d `1979ff0204000000ff01000000ce0800` 0 3 4 0 1594 +d `19790d0600000000050e000800800f00` 1 0 0 0 1595 +d `19190e080d0000000701000000da5b03` 0 7 5 35 1596 +d `45720205030000000709000000040a00` 0 0 5 0 1597 +d `19790806060000000008000000d60900` 0 7 4 0 1598 +d `09420701020000000800000800ce0800` 0 3 4 0 1599 +d `08520500020000000603000000562702` 0 5 3 22 1600 +d `0c120005070000000006000800960a00` 0 2 5 0 1601 +d `197905000400000003000000008a0300` 1 0 0 0 1602 +d `45790a0c0e000000050a0000004e0e00` 0 1 7 0 1603 +d `107206050a00000006010000005aab01` 0 5 5 1a 1604 +d `27720807080000000c0100000040af00` 0 5 7 a 1605 +d `8f490d0a030000000900000000dc0600` 0 3 3 0 1606 +d `7a720800030000000501000000182a01` 0 0 5 12 1607 +d `2172ff000c0000000300000000c60800` 0 3 4 0 1608 +d `88730906000000000003000800ce0f00` 0 7 7 0 1609 +d `927905080c00000005000000009ae403` 0 2 2 3e 1610 +d `47290c00000000000100000000da0f00` 0 7 7 0 1611 +d `47790800000000000e01000800d81302` 0 7 1 21 1612 +d `10220903ff0000000301000800c00a00` 0 3 5 0 1613 +d `19790b07ff00000001000000000a0600` 0 0 3 0 1614 +d `7a72040208000000ff08000800880b00` 1 0 0 0 1615 +d `21720e080b0000000301000800008e01` 0 0 7 18 1616 +d `88430d0c070000000a0a000800943800` 0 2 4 3 1617 +d `1979030e020000000907000000528f03` 0 5 7 38 1618 +d `187901000c00000007000000000c0c00` 1 0 0 0 1619 +d `1979040e0c0000000200000000100700` 0 4 3 0 1620 +d `197901070a00000000000000008c0700` 1 0 0 0 1621 +d `24720c0c0e0000000c01000800cc0500` 0 7 2 0 1622 +d `0c72070b0a000000ff0c000000000b00` 0 4 5 0 1623 +d `925903ff01000000ff00000800d40400` 0 3 2 0 1624 +d `23420b0c09000000030c0000005c8203` 0 1 1 38 1625 +d `2478ff0bff0000000300000000860200` 0 2 1 0 1626 +d `193906ff04000000020700080018f502` 0 4 2 2f 1627 +d `0972040e03000000ff040008000e0700` 0 4 3 0 1628 +d `19790c0d06000000060d000000100300` 0 4 1 0 1629 +d `24780808020000000d000000001a3900` 0 4 4 3 1630 +d `3c72ff04090000000800000000c40200` 0 3 1 0 1631 +d `231108ff0c0000000500000000060300` 1 0 0 0 1632 +d `2478000b060000000000000000d42701` 0 7 3 12 1633 +d `3c720903000000000300000000d00400` 0 3 2 0 1634 +j 0 0 0 0 1635 +j 0 0 1 0 1636 +j 0 0 2 0 1637 +j 0 0 3 0 1638 +j 0 0 7 0 1639 +j 0 0 800 0 1640 +j 0 0 801 0 1641 +j 0 0 ffffffff 0 1642 +j 0 1 0 0 1643 +j 0 1 1 1 1644 +j 0 1 2 2 1645 +j 0 1 3 3 1646 +j 0 1 7 7 1647 +j 0 1 800 800 1648 +j 0 1 801 801 1649 +j 0 1 ffffffff ffffffff 1650 +j 0 `8000000000000000` 0 0 1651 +j 0 `8000000000000000` 1 1 1652 +j 0 `8000000000000000` 2 2 1653 +j 0 `8000000000000000` 3 3 1654 +j 0 `8000000000000000` 7 7 1655 +j 0 `8000000000000000` 800 800 1656 +j 0 `8000000000000000` 801 801 1657 +j 0 `8000000000000000` ffffffff ffffffff 1658 +j 1 0 0 1 1659 +j 1 0 1 1 1660 +j 1 0 2 1 1661 +j 1 0 3 1 1662 +j 1 0 7 1 1663 +j 1 0 800 1 1664 +j 1 0 801 1 1665 +j 1 0 ffffffff 1 1666 +j 1 1 0 1 1667 +j 1 1 1 1 1668 +j 1 1 2 1 1669 +j 1 1 3 1 1670 +j 1 1 7 1 1671 +j 1 1 800 1 1672 +j 1 1 801 1 1673 +j 1 1 ffffffff 1 1674 +j 1 `8000000000000000` 0 1 1675 +j 1 `8000000000000000` 1 1 1676 +j 1 `8000000000000000` 2 1 1677 +j 1 `8000000000000000` 3 1 1678 +j 1 `8000000000000000` 7 1 1679 +j 1 `8000000000000000` 800 1 1680 +j 1 `8000000000000000` 801 1 1681 +j 1 `8000000000000000` ffffffff 1 1682 +j 2 0 0 2 1683 +j 2 0 1 2 1684 +j 2 0 2 2 1685 +j 2 0 3 2 1686 +j 2 0 7 2 1687 +j 2 0 800 2 1688 +j 2 0 801 2 1689 +j 2 0 ffffffff 2 1690 +j 2 1 0 2 1691 +j 2 1 1 1 1692 +j 2 1 2 2 1693 +j 2 1 3 2 1694 +j 2 1 7 2 1695 +j 2 1 800 2 1696 +j 2 1 801 2 1697 +j 2 1 ffffffff 2 1698 +j 2 `8000000000000000` 0 2 1699 +j 2 `8000000000000000` 1 1 1700 +j 2 `8000000000000000` 2 2 1701 +j 2 `8000000000000000` 3 2 1702 +j 2 `8000000000000000` 7 2 1703 +j 2 `8000000000000000` 800 2 1704 +j 2 `8000000000000000` 801 2 1705 +j 2 `8000000000000000` ffffffff 2 1706 +j 3 0 0 3 1707 +j 3 0 1 3 1708 +j 3 0 2 3 1709 +j 3 0 3 3 1710 +j 3 0 7 3 1711 +j 3 0 800 3 1712 +j 3 0 801 3 1713 +j 3 0 ffffffff 3 1714 +j 3 1 0 3 1715 +j 3 1 1 1 1716 +j 3 1 2 2 1717 +j 3 1 3 3 1718 +j 3 1 7 3 1719 +j 3 1 800 3 1720 +j 3 1 801 3 1721 +j 3 1 ffffffff 3 1722 +j 3 `8000000000000000` 0 3 1723 +j 3 `8000000000000000` 1 1 1724 +j 3 `8000000000000000` 2 2 1725 +j 3 `8000000000000000` 3 3 1726 +j 3 `8000000000000000` 7 3 1727 +j 3 `8000000000000000` 800 3 1728 +j 3 `8000000000000000` 801 3 1729 +j 3 `8000000000000000` ffffffff 3 1730 +j 7 0 0 7 1731 +j 7 0 1 7 1732 +j 7 0 2 7 1733 +j 7 0 3 7 1734 +j 7 0 7 7 1735 +j 7 0 800 7 1736 +j 7 0 801 7 1737 +j 7 0 ffffffff 7 1738 +j 7 1 0 7 1739 +j 7 1 1 1 1740 +j 7 1 2 2 1741 +j 7 1 3 3 1742 +j 7 1 7 7 1743 +j 7 1 800 7 1744 +j 7 1 801 7 1745 +j 7 1 ffffffff 7 1746 +j 7 `8000000000000000` 0 7 1747 +j 7 `8000000000000000` 1 1 1748 +j 7 `8000000000000000` 2 2 1749 +j 7 `8000000000000000` 3 3 1750 +j 7 `8000000000000000` 7 7 1751 +j 7 `8000000000000000` 800 7 1752 +j 7 `8000000000000000` 801 7 1753 +j 7 `8000000000000000` ffffffff 7 1754 +j 800 0 0 800 1755 +j 800 0 1 800 1756 +j 800 0 2 800 1757 +j 800 0 3 800 1758 +j 800 0 7 800 1759 +j 800 0 800 800 1760 +j 800 0 801 800 1761 +j 800 0 ffffffff 800 1762 +j 800 1 0 800 1763 +j 800 1 1 1 1764 +j 800 1 2 2 1765 +j 800 1 3 3 1766 +j 800 1 7 7 1767 +j 800 1 800 800 1768 +j 800 1 801 800 1769 +j 800 1 ffffffff 800 1770 +j 800 `8000000000000000` 0 800 1771 +j 800 `8000000000000000` 1 1 1772 +j 800 `8000000000000000` 2 2 1773 +j 800 `8000000000000000` 3 3 1774 +j 800 `8000000000000000` 7 7 1775 +j 800 `8000000000000000` 800 800 1776 +j 800 `8000000000000000` 801 800 1777 +j 800 `8000000000000000` ffffffff 800 1778 +j 801 0 0 801 1779 +j 801 0 1 801 1780 +j 801 0 2 801 1781 +j 801 0 3 801 1782 +j 801 0 7 801 1783 +j 801 0 800 801 1784 +j 801 0 801 801 1785 +j 801 0 ffffffff 801 1786 +j 801 1 0 801 1787 +j 801 1 1 1 1788 +j 801 1 2 2 1789 +j 801 1 3 3 1790 +j 801 1 7 7 1791 +j 801 1 800 800 1792 +j 801 1 801 801 1793 +j 801 1 ffffffff 801 1794 +j 801 `8000000000000000` 0 801 1795 +j 801 `8000000000000000` 1 1 1796 +j 801 `8000000000000000` 2 2 1797 +j 801 `8000000000000000` 3 3 1798 +j 801 `8000000000000000` 7 7 1799 +j 801 `8000000000000000` 800 800 1800 +j 801 `8000000000000000` 801 801 1801 +j 801 `8000000000000000` ffffffff 801 1802 +j ffffffff 0 0 ffffffff 1803 +j ffffffff 0 1 ffffffff 1804 +j ffffffff 0 2 ffffffff 1805 +j ffffffff 0 3 ffffffff 1806 +j ffffffff 0 7 ffffffff 1807 +j ffffffff 0 800 ffffffff 1808 +j ffffffff 0 801 ffffffff 1809 +j ffffffff 0 ffffffff ffffffff 1810 +j ffffffff 1 0 ffffffff 1811 +j ffffffff 1 1 1 1812 +j ffffffff 1 2 2 1813 +j ffffffff 1 3 3 1814 +j ffffffff 1 7 7 1815 +j ffffffff 1 800 800 1816 +j ffffffff 1 801 801 1817 +j ffffffff 1 ffffffff ffffffff 1818 +j ffffffff `8000000000000000` 0 ffffffff 1819 +j ffffffff `8000000000000000` 1 1 1820 +j ffffffff `8000000000000000` 2 2 1821 +j ffffffff `8000000000000000` 3 3 1822 +j ffffffff `8000000000000000` 7 7 1823 +j ffffffff `8000000000000000` 800 800 1824 +j ffffffff `8000000000000000` 801 801 1825 +j ffffffff `8000000000000000` ffffffff ffffffff 1826 +l 0 0 0 1 1827 +l 0 0 1 2 1828 +l 0 0 6 7 1829 +l 0 0 7ff 800 1830 +l 0 0 fffffffe ffffffff 1831 +l 0 1 0 1 1832 +l 0 1 1 2 1833 +l 0 1 6 7 1834 +l 0 1 7ff 800 1835 +l 0 1 fffffffe ffffffff 1836 +l 0 2 0 1 1837 +l 0 2 1 2 1838 +l 0 2 6 7 1839 +l 0 2 7ff 800 1840 +l 0 2 fffffffe ffffffff 1841 +l 0 3 0 1 1842 +l 0 3 1 2 1843 +l 0 3 6 7 1844 +l 0 3 7ff 800 1845 +l 0 3 fffffffe ffffffff 1846 +l 0 7 0 1 1847 +l 0 7 1 2 1848 +l 0 7 6 7 1849 +l 0 7 7ff 800 1850 +l 0 7 fffffffe ffffffff 1851 +l 0 800 0 1 1852 +l 0 800 1 2 1853 +l 0 800 6 7 1854 +l 0 800 7ff 800 1855 +l 0 800 fffffffe ffffffff 1856 +l 0 801 0 1 1857 +l 0 801 1 2 1858 +l 0 801 6 7 1859 +l 0 801 7ff 800 1860 +l 0 801 fffffffe ffffffff 1861 +l 0 ffffffff 0 1 1862 +l 0 ffffffff 1 2 1863 +l 0 ffffffff 6 7 1864 +l 0 ffffffff 7ff 800 1865 +l 0 ffffffff fffffffe ffffffff 1866 +l 1 0 0 1 1867 +l 1 0 1 2 1868 +l 1 0 6 7 1869 +l 1 0 7ff 800 1870 +l 1 0 fffffffe ffffffff 1871 +l 1 1 0 1 1872 +l 1 1 1 1 1873 +l 1 1 6 1 1874 +l 1 1 7ff 1 1875 +l 1 1 fffffffe 1 1876 +l 1 2 0 1 1877 +l 1 2 1 2 1878 +l 1 2 6 2 1879 +l 1 2 7ff 2 1880 +l 1 2 fffffffe 2 1881 +l 1 3 0 1 1882 +l 1 3 1 2 1883 +l 1 3 6 3 1884 +l 1 3 7ff 3 1885 +l 1 3 fffffffe 3 1886 +l 1 7 0 1 1887 +l 1 7 1 2 1888 +l 1 7 6 7 1889 +l 1 7 7ff 7 1890 +l 1 7 fffffffe 7 1891 +l 1 800 0 1 1892 +l 1 800 1 2 1893 +l 1 800 6 7 1894 +l 1 800 7ff 800 1895 +l 1 800 fffffffe 800 1896 +l 1 801 0 1 1897 +l 1 801 1 2 1898 +l 1 801 6 7 1899 +l 1 801 7ff 800 1900 +l 1 801 fffffffe 801 1901 +l 1 ffffffff 0 1 1902 +l 1 ffffffff 1 2 1903 +l 1 ffffffff 6 7 1904 +l 1 ffffffff 7ff 800 1905 +l 1 ffffffff fffffffe ffffffff 1906 +l `8000000000000000` 0 0 1 1907 +l `8000000000000000` 0 1 2 1908 +l `8000000000000000` 0 6 7 1909 +l `8000000000000000` 0 7ff 800 1910 +l `8000000000000000` 0 fffffffe ffffffff 1911 +l `8000000000000000` 1 0 1 1912 +l `8000000000000000` 1 1 1 1913 +l `8000000000000000` 1 6 1 1914 +l `8000000000000000` 1 7ff 1 1915 +l `8000000000000000` 1 fffffffe 1 1916 +l `8000000000000000` 2 0 1 1917 +l `8000000000000000` 2 1 2 1918 +l `8000000000000000` 2 6 2 1919 +l `8000000000000000` 2 7ff 2 1920 +l `8000000000000000` 2 fffffffe 2 1921 +l `8000000000000000` 3 0 1 1922 +l `8000000000000000` 3 1 2 1923 +l `8000000000000000` 3 6 3 1924 +l `8000000000000000` 3 7ff 3 1925 +l `8000000000000000` 3 fffffffe 3 1926 +l `8000000000000000` 7 0 1 1927 +l `8000000000000000` 7 1 2 1928 +l `8000000000000000` 7 6 7 1929 +l `8000000000000000` 7 7ff 7 1930 +l `8000000000000000` 7 fffffffe 7 1931 +l `8000000000000000` 800 0 1 1932 +l `8000000000000000` 800 1 2 1933 +l `8000000000000000` 800 6 7 1934 +l `8000000000000000` 800 7ff 800 1935 +l `8000000000000000` 800 fffffffe 800 1936 +l `8000000000000000` 801 0 1 1937 +l `8000000000000000` 801 1 2 1938 +l `8000000000000000` 801 6 7 1939 +l `8000000000000000` 801 7ff 800 1940 +l `8000000000000000` 801 fffffffe 801 1941 +l `8000000000000000` ffffffff 0 1 1942 +l `8000000000000000` ffffffff 1 2 1943 +l `8000000000000000` ffffffff 6 7 1944 +l `8000000000000000` ffffffff 7ff 800 1945 +l `8000000000000000` ffffffff fffffffe ffffffff 1946 +w 0 0 0 1947 +w 0 1 0 1948 +w 0 2 0 1949 +w 0 3 0 1950 +w 0 7 0 1951 +w 0 800 0 1952 +w 0 801 0 1953 +w 0 ffffffff 0 1954 +w 1 0 0 1955 +w 1 1 1 1956 +w 1 2 2 1957 +w 1 3 3 1958 +w 1 7 7 1959 +w 1 800 800 1960 +w 1 801 801 1961 +w 1 ffffffff ffffffff 1962 +w `8000000000000000` 0 0 1963 +w `8000000000000000` 1 1 1964 +w `8000000000000000` 2 2 1965 +w `8000000000000000` 3 3 1966 +w `8000000000000000` 7 7 1967 +w `8000000000000000` 800 800 1968 +w `8000000000000000` 801 801 1969 +w `8000000000000000` ffffffff ffffffff gpu/nvidia/checks/checks.tsv @@ -69,3 +69,4 @@ apish gpu/nvidia/checks/apish.tsv gpu/nvidia/om/apirest/pack.om gpu/nvidia/om/ap 69 69 apishblk gpu/nvidia/checks/apish-blk.tsv gpu/nvidia/om/api/attn_om2.om gpu/nvidia/om/api/apish_blk.om gpu/nvidia/checks/lib.om gpu/nvidia/checks/lib-om2.om gpu/nvidia/checks/apish-blk.om gpu/nvidia/checks/apish-lib.om 70 70 apishfp8x gpu/nvidia/checks/apish-fp8x.tsv gpu/nvidia/om/apiviews/fp8x.om gpu/nvidia/checks/lib.om gpu/nvidia/checks/lib-om2.om gpu/nvidia/checks/apish-fp8x.om gpu/nvidia/checks/apish-lib.om 71 71 apishfp8xb gpu/nvidia/checks/apish-fp8xb.tsv gpu/nvidia/om/apiviews/fp8xb.om gpu/nvidia/checks/lib.om gpu/nvidia/checks/lib-om2.om gpu/nvidia/checks/apish-fp8xb.om gpu/nvidia/checks/apish-lib.om 72 +bwhz gpu/nvidia/checks/bwhz.tsv gpu/nvidia/om/codegen/bw_hazard.om gpu/nvidia/om/codegen/bw_hazard_dec.om gpu/nvidia/checks/lib.om gpu/nvidia/checks/bwhz.om gpu/nvidia/checks/mutants.tsv @@ -310,3 +310,11 @@ apish gpu/nvidia/om/apirest/slot.om put rec 6 1 put rec 6 0 310 310 apishblk gpu/nvidia/om/api/apish_blk.om ret bitcast ulong acc ret bitcast ulong sd 311 311 arestdata gpu/nvidia/om/apirest/data.om put y add n i 0.0f32 put y n 0.0f32 312 312 aresttern gpu/nvidia/om/apirest/terndata.om put y i 0 put y 0 0 313 +bwhz gpu/nvidia/om/codegen/bw_hazard.om if or eq get d add o 4 6 eq get d add o 5 6 if eq get d add o 4 6 314 +bwhz gpu/nvidia/om/codegen/bw_hazard.om if or eq get d add o 4 6 eq get d add o 5 6 if eq get d add o 5 6 315 +bwhz gpu/nvidia/om/codegen/bw_hazard.om put d add o 6 and shr w3 20 63 put d add o 6 and shr w3 20 31 316 +bwhz gpu/nvidia/om/codegen/bw_hazard.om put d add o 4 and shr w3 14 7 put d add o 4 and shr w3 14 3 317 +bwhz gpu/nvidia/om/codegen/bw_hazard.om ret hz_pmin dt st ret st 318 +bwhz gpu/nvidia/om/codegen/bw_hazard.om t = hz_pmin rt t t = t 319 +bwhz gpu/nvidia/om/codegen/bw_hazard.om if lt a b if gt a b 320 +bwhz gpu/nvidia/om/codegen/bw_hazard.om if eq v 0 if eq v 1 gpu/nvidia/native/models/flash-next/README.md new file mode 100644 @@ -0,0 +1,26 @@ 1 +# Flash-Next file-backed n-gram embeddings 2 + 3 +`lookup.om` reads one sequence of little-endian uint32 token IDs from standard input. For each token it emits 2,560 little-endian BF16 values. The first input starts a new sequence. The checkpoint EOS token resets the n-gram history for subsequent tokens. 4 + 5 +With `--decoder-input`, the same executable reads only the BF16 vocabulary embedding in checkpoint shard 130. Each token yields the four 2,560-value residual streams that enter the first decoder layer, in their checkpoint order. This mode reads one row per token. 6 + 7 +The input profile is Qwen/Qwen3.8-Flash-Next-FP8 revision ``7fb48d708ca6cd8eeed8f4db0433be18af96984f``. Run the binary with the verified checkpoint as its working directory. At startup it reads the safetensors headers of files 5 through 37, locates each of the 128 row tensors by name, checks the dtype, shape and byte ranges, and reads the three hash multipliers, head offsets, vocabulary sizes and scale from the checkpoint. At each token it reads 16 FP8 rows by file offset. This host component supplies the n-gram input to the model's PLE layer. GPU execution and text generation require the rest of the model and driver. 8 + 9 +Build on AArch64 Linux from the repository root. The executable uses seeded Omega for JSON, file I/O, FP8 conversion and BF16 rounding. 10 + 11 +```sh 12 +out="$PWD/build/flash-next" 13 +mkdir -p "$out" 14 +sha256sum -c seed/out/omc.sha256 15 +cat gpu/nvidia/om/apiviews/bf16.om seed/json/json.om \ 16 + gpu/nvidia/native/models/fp8.om gpu/nvidia/native/models/flash-next/lookup.om \ 17 + > "$out/lookup.full.om" 18 +seed/out/omc < "$out/lookup.full.om" > "$out/lookup" && chmod +x "$out/lookup" 19 +(cd "$CHECKPOINT" && "$out/lookup") < tokens.u32 > embeddings.bf16 20 +``` 21 + 22 +The comparison uses Python, Transformers, Torch and safetensors as an independent reference. It calls the installed Transformers n-gram layer with the checkpoint buffers and replaces its dense table with sliced on-disk reads. The checks cover the arithmetic chat prompt, sequence boundaries, all table shards, invalid input and a malformed shard. Exit codes from the Omega program are 1 for arguments, 2 for checkpoint preparation, 3 for token input, 4 for a row read and 5 for output I/O. A streaming caller must check the exit status before accepting a complete sequence. 23 + 24 +```sh 25 +python3 gpu/nvidia/native/models/flash-next/check.py "$out/lookup" "$CHECKPOINT" 26 +``` gpu/nvidia/native/models/flash-next/check.py new file mode 100644 @@ -0,0 +1,186 @@ 1 +"""Compare the seeded lookup with the installed Transformers model and real FP8 rows.""" 2 +import argparse 3 +import bisect 4 +import contextlib 5 +import hashlib 6 +import json 7 +import random 8 +import struct 9 +import subprocess 10 +import tempfile 11 +from pathlib import Path 12 + 13 +import torch 14 +from safetensors import safe_open 15 +from transformers import AutoConfig 16 +from transformers.models.qwen4_exp.modeling_qwen4_exp import ( 17 + Qwen4ExpTextModel, Qwen4ExpTextNGramEmbedding, Qwen4ExpTextRotaryEmbedding, 18 +) 19 + 20 + 21 +PREFIX = "model.language_model.layers.1.ple.ple_embedding." 22 +INDEX_HASH = "`0419e2c2dfbb925257d7409405433a793cf7ff7d96f3eba882a815ec6d9fe7a6`" 23 +CHAT = [248045, 846, 198, 20206, 440, 799, 15262, 1132, 13, 220, 17, 10, 24 + 17, 30, 248046, 198, 248045, 74455, 198, 248068, 271, 248069, 271, 19, 248046] 25 + 26 + 27 +class ReferenceTable(torch.nn.Module): 28 + def __init__(self, tables, scale): 29 + super().__init__() 30 + self.register_buffer("weight", torch.empty(0)) 31 + self.tables = tables 32 + self.scale = scale 33 + self.ends = [] 34 + self.used = set() 35 + rows = 0 36 + for table in tables: 37 + count, width = table.get_shape() 38 + assert width == 160 39 + rows += count 40 + self.ends.append(rows) 41 + 42 + def forward(self, indices): 43 + rows = [] 44 + for row in indices.flatten().tolist(): 45 + shard = bisect.bisect_right(self.ends, row) 46 + self.used.add(shard) 47 + local = row - (self.ends[shard - 1] if shard else 0) 48 + rows.append(self.tables[shard][local:local + 1]) 49 + values = torch.cat(rows).float() * self.scale.float() 50 + return values.bfloat16().reshape(*indices.shape, 160) 51 + 52 + 53 +def decoder_input(cfg, weight, ids): 54 + """Capture the real input to the first Transformers decoder block without loading later blocks.""" 55 + class ReachedDecoder(Exception): 56 + pass 57 + 58 + def capture(_module, args): 59 + raise ReachedDecoder(args[0].view(torch.uint16).numpy().tobytes()) 60 + 61 + with torch.device("meta"): 62 + model = Qwen4ExpTextModel(cfg) 63 + model.embed_tokens = torch.nn.Embedding.from_pretrained(weight) 64 + model.rotary_emb = Qwen4ExpTextRotaryEmbedding(cfg) 65 + model.layers[0].register_forward_pre_hook(capture) 66 + masks = {"linear_attention": None, "qwen_sparse_attention": None} 67 + try: 68 + with torch.inference_mode(): 69 + model(torch.tensor([ids]), attention_mask=masks, use_cache=False) 70 + except ReachedDecoder as result: 71 + return result.args[0] 72 + raise AssertionError("Transformers did not enter the first decoder block") 73 + 74 + 75 +def check(exe, model): 76 + index = (model / "model.safetensors.index.json").read_bytes() 77 + assert hashlib.sha256(index).hexdigest() == INDEX_HASH 78 + locations = json.loads(index)["weight_map"] 79 + cfg = AutoConfig.from_pretrained(model, local_files_only=True).text_config 80 + rng = random.Random(1331) 81 + ids = CHAT + [cfg.eos_token_id, 0, cfg.eos_token_id, cfg.eos_token_id, 82 + cfg.vocab_size - 1] + [rng.randrange(cfg.vocab_size) for _ in range(240)] 83 + data = struct.pack(f"<{len(ids)}I", *ids) 84 + with safe_open(model / locations["model.language_model.embed_tokens.weight"], framework="pt") as shard: 85 + weight = shard.get_tensor("model.language_model.embed_tokens.weight") 86 + assert weight.shape == (cfg.vocab_size, cfg.hidden_size) 87 + residual = decoder_input(cfg, weight, ids) 88 + 89 + def input_run(payload, cwd=model, mode="--decoder-input"): 90 + return subprocess.run([exe, mode], input=payload, stdout=subprocess.PIPE, cwd=cwd, timeout=60) 91 + 92 + actual = input_run(data) 93 + assert actual.returncode == 0 and actual.stdout == residual 94 + assert len(residual) == len(ids) * 4 * 5120 95 + assert input_run(b"").returncode == 0 96 + for bad in (b"x", struct.pack(". rx_aegis.c needs the native AIENOS 7 +# PHYSICS_DIR=. rx_aegis.c needs the native Aienux 8 8 # capability library; point VISOR_AUTH_CAP_LIB (default $(AIENOS_CAP_LIB)) 9 9 # at a built libaienos_capability.a. 10 10 # visor-authority-check link check: no Visor object references/defines an authority-mutating symbol. native/control/README.md new file mode 100644 @@ -0,0 +1,218 @@ 1 +# Om control contracts 2 + 3 +Live record: Linear DRA-312. Historical references (GitHub, no longer a forge 4 +for this project; No GitHub rule, 2026-11-11): omega-mv issues #659, #649 and #651. 5 + 6 +Three bounded Om modules implement action recovery decisions, delegation 7 +constraints and KV reuse admission. They use caller-owned fixed arrays. They 8 +perform no I/O and allocate no global application state. Tests are Om programs 9 +compiled by the existing seeded compiler. There is no foreign runtime fallback. 10 + 11 +These are component implementations awaiting integration into the existing 12 +trusted owners. They are not a new authority root, journal, scheduler, cache, 13 +daemon, transport or production entry point. The old active implementations 14 +remain migration work until their consumers have qualified Om replacements. 15 +No existing C/Rust consumer has been switched by this patch. 16 + 17 +## Trust and integration contract 18 + 19 +Inputs to these functions are **trusted host facts**, never unchecked model, 20 +RPC or client assertions. In particular, `authorized=1` and `verified=1` do not 21 +authenticate themselves. The existing capability/approval owner must derive 22 +them from its real authorization and receipt verification. Callers serialize 23 +each operation through their existing transaction/lock owner. 24 + 25 +The durable effect owner must: 26 + 27 +1. Construct exact request, operation, provider, scope, policy and grant 28 + identities. An operation ID names an intentional action, not just its 29 + arguments. Retrying that action keeps the ID; a second intentional action 30 + gets a new ID. The request digest covers the method, complete canonical 31 + arguments and relevant contract version. 32 +2. Check current authority and resource generation under the existing execution 33 + fence. Call `actstart`, then durably persist the resulting in-flight record 34 + **before** dispatch. A failed persistence step forbids dispatch. A snapshot 35 + comparison alone cannot prevent revocation racing with dispatch. 36 +3. Pass the same operation identity as the provider idempotency key when the 37 + provider supports that contract. An ordinary request header alone is not 38 + deduplication. 39 +4. Treat a recovered in-flight record as unknown with `actlost`. An interrupted 40 + call, timeout, missing response or missing receipt cannot establish that the 41 + effect did not happen. Reconcile against the authoritative provider. 42 +5. Persist reconciliation before exposing the next state. A terminal 43 + not-performed result must also guarantee that the old attempt cannot later 44 + complete. If the provider cannot prove that, use unknown. A read that returns 45 + "not found" without such a guarantee is insufficient. 46 +6. Recheck current authority, generation, expiry and exact bindings on every 47 + retry. Do not change a frozen request to make a refused attempt pass. 48 + 49 +The modules do not provide atomic disk writes, crash-consistent replay, 50 +cross-process exclusion, cryptographic receipt verification or complete 51 +mediation of application entry points. Those integration gates remain open 52 +under #649/#651 and their existing owners. Hashes identify bytes; signatures, 53 +authorization and rollback freshness remain separate obligations. 54 + 55 +## Action record v1 56 + 57 +All arrays below contain exactly 32 `ulong` words. A different length is a 58 +compiler refusal, not a supported alternate wire format. These are in-memory 59 +contracts, not a newly standardized on-disk serialization. 60 + 61 +| Words | Stored record | Current admission facts | Reconciliation facts | 62 +|---|---|---|---| 63 +| 0 | Version, exactly 1 | Version, exactly 1 | Version, exactly 1 | 64 +| 1 | State | Authorized, exactly 1 | Outcome: 0 unknown, 1 not performed, 2 performed | 65 +| 2 | Attempt count | Current monotonic time | Exact attempt being reconciled | 66 +| 3 | Attempt limit, 1..1024 | Reserved, zero | Receipt verified by owner, exactly 1 | 67 +| 4 | Resource generation, nonzero | Current generation | Original generation | 68 +| 5 | Authority epoch, nonzero | Current epoch | Original epoch | 69 +| 6 | Exclusive expiry, nonzero | Reserved, zero | Reserved, zero | 70 +| 7 | Reserved, zero | Reserved, zero | Reserved, zero | 71 +| 8..11 | Operation ID | Same operation ID | Same operation ID | 72 +| 12..15 | Exact request digest | Same digest | Same digest | 73 +| 16..19 | Scope ID | Same scope | Same scope | 74 +| 20..23 | Provider identity | Same provider | Same provider | 75 +| 24..27 | Policy identity | Same policy | Same policy | 76 +| 28..31 | Grant/approval identity | Same grant | Same grant | 77 + 78 +Each four-word identity must be nonzero as a group; zero is the missing-identity 79 +sentinel. Generations and epochs are supplied by their authoritative owners. 80 +Expiry and current time must share the same clock domain. Attempt counts never 81 +wrap; a record exceeding its limit is malformed. 82 + 83 +| Function | Behavior | 84 +|---|---| 85 +| `actvalid(record)` | Validate the stored record without mutation. | 86 +| `actstart(record, current)` | Ready -> in-flight; increment attempt only after every check. | 87 +| `actlost(record)` | In-flight -> unknown; already unknown is idempotent. | 88 +| `actrecon(record, receipt)` | In-flight/unknown -> ready, unknown or performed, according to the verified outcome. | 89 + 90 +States are 1 ready, 2 in-flight, 3 unknown and 4 performed. A performed effect 91 +is terminal even if a higher-level task failed. Successful observation of an 92 +unknown outcome returns 21 and sets state 3. This is the one nonzero result 93 +that changes a record; malformed or rejected inputs leave it unchanged. 94 +Observation may record a past result after grant expiry; it grants no new work. 95 + 96 +| Result | Meaning | 97 +|---|---| 98 +| 0 | Transition accepted | 99 +| 11 / 12 | Unsupported version / malformed record or reserved field | 100 +| 20 / 21 / 22 / 23 | Wrong state / outcome unknown / already performed / attempt limit | 101 +| 30 / 31 / 32 / 33 | Not authorized / generation mismatch / epoch mismatch / expired | 102 +| 35 / 36 | Wrong attempt / unverified reconciliation | 103 +| 40..45 | Operation, request, scope, provider, policy or grant mismatch, respectively | 104 + 105 +## Delegation v1 106 + 107 +`capchild(parent, candidate, now)` is a predicate over two 24-word records. It 108 +does not issue credentials. The authority owner verifies the parent, checks 109 +revocation, reserves aggregate budgets and issues the child only after success. 110 + 111 +| Words | Meaning | 112 +|---|---| 113 +| 0 | Version 1 | 114 +| 1 | Opaque 64-bit rights set in the verified parent's authority namespace | 115 +| 2 / 3 | Memory and work/fuel ceiling; zero grants none | 116 +| 4 | Exclusive expiry in the same clock domain as `now` | 117 +| 5 | Remaining delegation depth, 0..64 | 118 +| 6 / 7 | Reserved, zero | 119 +| 8..11 / 12..15 | Exact resource scope / authority-root identity | 120 +| 16..19 / 20..23 | Subject / grant identity | 121 + 122 +Rights retain their existing authority-owner meanings; effect-class labels do 123 +not substitute for permission bits. All identities must be present. Scope and 124 +root stay equal. Subject and grant 125 +must change. Child rights are a subset, ceilings cannot increase, expiry cannot 126 +extend, and depth strictly decreases. Depth zero is terminal. Comparisons avoid 127 +increment/decrement overflow. No behavioral score participates in this contract. 128 + 129 +Individual child ceilings do not enforce the **sum across siblings**. The 130 +existing quota owner must reserve and account for shared budgets. The scope 131 +profile permits only exact resource equality; path prefixes, subnets and 132 +wildcard containment require separately qualified authority semantics. 133 + 134 +Results: 61 version, 62 malformed, 64 parent expired, 65 child expired, 66 rights 135 +increase, 67 memory increase, 68 fuel increase, 69 expiry increase, 70 changed 136 +scope, 71 changed root, 72 terminal parent, 73 depth not reduced, 74 unchanged 137 +subject, 75 unchanged grant. Zero means the predicate passed, not that a 138 +credential was minted or that the caller is authorized. 139 + 140 +## KV reuse v1 141 + 142 +`kvmatch(saved, expected, actual_payload_sha256)` accepts two 40-word records 143 +and a four-word payload digest. `expected` comes from the current trusted 144 +consumer, not from the saved header. `actual_payload_sha256` must be computed 145 +from the complete immutable payload by the existing digest/store owner. Merely 146 +copying the header digest into this argument would defeat integrity checking. 147 + 148 +| Words | Meaning | 149 +|---|---| 150 +| 0 | Format, exactly 1 | 151 +| 1 | Nonzero semantic profile identifier | 152 +| 2 / 3 | Prefix token count / context capacity; positive, prefix <= capacity | 153 +| 4 | Nonzero cache-layout profile identifier | 154 +| 5 | Dtype profile: 1 FP32, 2 FP16, 3 BF16, 4 quantized with complete numeric-config identity | 155 +| 6 / 7 | Nonzero RoPE profile identifier / reserved zero | 156 +| 8..11 | Model identity | 157 +| 12..15 | Exact weight-content identity | 158 +| 16..19 | Engine/compiler/build identity | 159 +| 20..23 | Tokenizer identity | 160 +| 24..27 | Tenant/authority scope identity | 161 +| 28..31 | Complete prefix token-sequence identity | 162 +| 32..35 | Numeric/target configuration identity | 163 +| 36..39 | Payload digest in `saved`; must be zero in `expected` | 164 + 165 +The numeric/target identity must cover every result-affecting setting, including 166 +actual RoPE parameters, rounding, quantization scales/layout, target arithmetic 167 +profile and relevant runtime configuration. A profile label alone is not that 168 +identity. Tokenize the complete prompt with the bound tokenizer before choosing 169 +a prefix; concatenating separately tokenized strings can change boundary tokens. 170 +No missing identity receives a default. This profile refuses empty-prefix caches. 171 + 172 +Results: 100 format, 102 reserved field, 103 invalid scalar profile/count, 104 173 +missing identity, 111..116 scalar mismatch in words 1..6, 120..126 identity 174 +mismatch in the table's seven groups, 127 payload digest mismatch, 128 invalid 175 +expected payload field. Zero permits this identity/integrity comparison only. 176 +The consumer still checks current authorization, payload bounds and supported 177 +deserialization before exposing data. Neither this module nor a cache hit is 178 +evidence of a speedup or a new hardware run. 179 + 180 +## Build and evidence 181 + 182 +Compiler: the in-tree `seed/out/omc` of the omega-mv revision being built. Its 183 +sha256 is in `seed/out/omc.sha256`; do not copy that value here. The original 184 +2026-10-23 run used compiler source ``57f5f4258cebf3d5b2c22853cd062e351265c525`` 185 +under QEMU ([evidence/659](evidence/659/README.md)). The 2026-11-16 replay onto 186 +main ran natively on AArch64 with the main compiler of that day 187 +([evidence/replay-`20261116`](evidence/replay-`20261116`/README.md)). 188 +On a supported AArch64 host, a module's test is built as one source unit: 189 + 190 +```sh 191 +cat native/control/src/action.om native/control/tests/action.om > /tmp/action.om 192 +seed/out/omc < /tmp/action.om > /tmp/action.elf 193 +chmod +x /tmp/action.elf 194 +/tmp/action.elf 195 +``` 196 + 197 +Use `delegate` and `reuse` for the other suites. Source concatenation and command 198 +invocation here are temporary build transport, not new runtime semantics or a 199 +project-owned shell test runner. Native import/build ownership remains with the 200 +seeded tool owners. In the recorded x86_64 run, QEMU invoked the AArch64 compiler 201 +and output programs. That is **EMULATED**, not Spark hardware qualification. 202 + 203 +## Research provenance and selection 204 + 205 +The implementation is original Om code. No external implementation was copied. 206 + 207 +| Project reviewed | Pattern used or disposition | 208 +|---|---| 209 +| [Delentia](https://github.com/delentia-labs/Delentia-OS/tree/`5602c9bb57106543ed799719be8d6dc79773c860`) | Intent/result separation, uncertain effects, exact-payload approval, fresh authority on retry. | 210 +| [OctantOS public docs](https://github.com/MatrixForgeLabs/OctantOS-Public-Docs/tree/`35f90f4dd4f03ce77f23733af2b8a39e9a459d9b`) | Parent-child attenuation. Public documentation is not an inspected enforcement implementation. | 211 +| [Aither AWdk](https://github.com/Aitherium/awdk/tree/`eca903dc7c84f98db7df72ae48d7e396e06bffc6`) | Complete cache bindings and diagnostic refusals. Reuse the existing AIEN KV/store owner. | 212 +| [SomaOS](https://github.com/avsribhas/SomaOS/tree/`ef3a42afe2cca50f0047294e4a42c6bb31fd7e9d`) | Shared typed application state for human/agent interfaces belongs in #648. No behavior-based authority escalation is adopted. | 213 +| [khy](https://pypi.org/project/khy-os/1.1.7/) | Published source package reviewed separately; no code incorporated. Its source-available terms require separate permission for modification/redistribution. | 214 +| [KIRA author's thread](https://news.ycombinator.com/item?id=`44584958`) | No matching public implementation located. No kernel/AGI claims adopted as implementation evidence. | 215 + 216 +Production dispatch integration, authoritative durability, independent final 217 +source review and hardware execution remain open. This change does not close 218 +the parent issues or declare these projects' wider claims verified. native/control/RESEARCH.md new file mode 100644 @@ -0,0 +1,145 @@ 1 +# AI OS source review, 2026-10-23 2 + 3 +This review inspected public source and documentation. It did not boot or 4 +qualify the six operating systems. Founder background, team size, line counts 5 +and use of AI in development are not evidence of correctness or performance. 6 + 7 +The most transferable implementation ideas are explicit uncertain outcomes, 8 +exact request binding, attenuated authority and fully identified reusable 9 +artifacts. The accompanying Om code implements bounded contracts for those 10 +ideas. System integration and hardware qualification remain separate gates. 11 + 12 +## OctantOS 13 + 14 +The canonical public repository found was 15 +[MatrixForgeLabs/OctantOS-Public-Docs](https://github.com/MatrixForgeLabs/OctantOS-Public-Docs/tree/`35f90f4dd4f03ce77f23733af2b8a39e9a459d9b`). 16 +The inspected tree contains documentation and diagrams, not kernel source. 17 +Its [capability manifest design](https://github.com/MatrixForgeLabs/OctantOS-Public-Docs/blob/`35f90f4dd4f03ce77f23733af2b8a39e9a459d9b`/docs/capability-manifests.md) 18 +describes signed manifests, parent-child permission intersection, bounded 19 +resources, delegation depth and lifetime. Enforcement is described through 20 +Linux namespaces, seccomp and cgroups. That public material does not let us 21 +verify a custom Rust kernel or the claimed security guarantees. 22 + 23 +Useful: authority should diminish through delegation; resource bounds and 24 +expiry belong in the same contract. `src/delegate.om` implements the bounded 25 +predicate. The existing authority owner still verifies credentials, reserves 26 +budgets and issues grants. Documentation about a security mechanism is not an 27 +independent test of its enforcement. 28 + 29 +## khy 30 + 31 +The [khy-os 1.1.7 PyPI release](https://pypi.org/project/khy-os/1.1.7/) 32 +provides a source archive. Its linked GitHub repository, `kodehu03/khy-os`, was 33 +unavailable during review. The downloaded source archive's SHA-256 was 34 +``9c8fe8263e6cddd04af0d668a841aeb8d3899d4fbcc92fd81498995ce375391d``. 35 + 36 +Unlike a documentation-only project, the archive contains C kernel source, 37 +boot assembly, a scheduler, memory management, loaders, capabilities and 38 +agent request/response code. `kernel/src/agentask.c` uses a bounded waiter 39 +table, kernel-selected sequence IDs, deadlines and explicit response/timeout 40 +states. Its interrupt-masking concurrency model explicitly assumes one CPU; 41 +it is not a portable multicore synchronization design. 42 + 43 +The kernel README calls the kernel educational/experimental and separates it 44 +from the host-side terminal and web control planes. Installing a host CLI is 45 +not proof that the complete agent stack runs inside that kernel. The archive's 46 +license restricts copying, modification, distribution and commercial use. 47 +No source was incorporated. Bounded request correlation is a useful general 48 +pattern, but the existing AIEN effect/transport owners already own that role. 49 + 50 +## Delentia OS 51 + 52 +[Delentia-OS](https://github.com/delentia-labs/Delentia-OS/tree/`5602c9bb57106543ed799719be8d6dc79773c860`) 53 +is primarily an SDK/control plane in the inspected code. It offers substantial 54 +agent-governance machinery; the name does not make it a bare-metal kernel. 55 + 56 +The strongest material is 57 +[episode journaling](https://github.com/delentia-labs/Delentia-OS/blob/`5602c9bb57106543ed799719be8d6dc79773c860`/rct_control_plane/episode_journal.py), 58 +[idempotency](https://github.com/delentia-labs/Delentia-OS/blob/`5602c9bb57106543ed799719be8d6dc79773c860`/rct_control_plane/idempotency.py) 59 +and [approval execution](https://github.com/delentia-labs/Delentia-OS/blob/`5602c9bb57106543ed799719be8d6dc79773c860`/rct_control_plane/approvals.py). 60 +Intent without a result remains uncertain. Reconciliation does not silently 61 +repeat the action. Approval binds an exact payload, and execution claims have 62 +durable state. Provider-supported idempotency is distinct from local tracking. 63 + 64 +The tests also contain useful negative controls: the same attempted write 65 +is driven through multiple entry points, and removing the authorization gate 66 +makes the adverse effect observable. Adopt that test principle when wiring 67 +Om into actual dispatch, not just a test that mocks the gate's answer. 68 + 69 +The project's own 70 +[readiness snapshot](https://github.com/delentia-labs/Delentia-OS/blob/`5602c9bb57106543ed799719be8d6dc79773c860`/docs/release/READINESS_SNAPSHOT.md) 71 +leaves model, host, pilot and review evidence incomplete. Its test counts are 72 +self-reported, not rerun here. They do not establish the broad 73 +"production-stable AI OS" description. Some model/LoRA paths permit mock 74 +behavior, so their timing must not be presented as native training performance. 75 + 76 +`src/action.om` adopts the recovery and exact-binding contracts independently. 77 +Actual durable journaling, provider receipt verification and entry-point 78 +coverage remain with #649's existing owners. 79 + 80 +## KIRA OS 81 + 82 +The matching source was the 83 +[author's launch discussion](https://news.ycombinator.com/item?id=`44584958`). 84 +In the same thread, the author clarified that the demonstrable AI engine ran 85 +on existing operating systems, while the OS itself remained in development. 86 +No matching public source repository was located. Several unrelated projects 87 +use the KIRA name, so they were not substituted as evidence. 88 + 89 +No kernel architecture or local-AGI claim from this project is an implementation 90 +input. Revisit when a canonical source tree, reproducible build and concrete 91 +workload measurements are available. 92 + 93 +## AitherOS 94 + 95 +The public `Aitherium/aither` URL redirects to 96 +[Aitherium/awdk](https://github.com/Aitherium/awdk/tree/`eca903dc7c84f98db7df72ae48d7e396e06bffc6`), 97 +an SDK in a larger Linux-based ecosystem. The inspected code does not establish 98 +a newly implemented hardware kernel. 99 + 100 +[KV artifacts](https://github.com/Aitherium/awdk/blob/`eca903dc7c84f98db7df72ae48d7e396e06bffc6`/adk/kvartifact.py) 101 +bind reusable state to model/runtime configuration and verify payload digests. 102 +[KV slots](https://github.com/Aitherium/awdk/blob/`eca903dc7c84f98db7df72ae48d7e396e06bffc6`/adk/kvslot.py) 103 +also illustrate the importance of tokenizing the complete prompt before 104 +choosing a reusable prefix. Different tokenization at a concatenation boundary 105 +can invalidate a cache key even when the visible strings appear compatible. 106 + 107 +Some binding fields can be left blank by a caller. Our bounded Om contract 108 +instead refuses missing identity groups and names the mismatched dimension. 109 +AIEN already has model/runtime-bound persistent KV machinery in 110 +[`shared_kv.rs`](https://github.com/aien-dev/aien-sovereign-core-mv/blob/`11842d678c72e19d78a311de2b11710c98896027`/crates/aien-runtime/src/shared_kv.rs). 111 +This is an integration/test improvement for its Om successor, not a reason to 112 +create a second cache. 113 + 114 +The receipt code also states an important limitation honestly: a local signed 115 +hash chain cannot by itself prove that a deleted tail or a replaced local 116 +anchor never existed. Freshness needs an independently protected anchor. 117 +Preserve AIEN's existing separation of integrity, authentication and rollback 118 +freshness. No new cryptographic subsystem is introduced here. 119 + 120 +## SomaOS 121 + 122 +The current 123 +[avsribhas/SomaOS tree](https://github.com/avsribhas/SomaOS/tree/`ef3a42afe2cca50f0047294e4a42c6bb31fd7e9d`) 124 +uses a Linux/Buildroot image and Rust components. That differs from the 125 +bare-metal Rust characterization. 126 + 127 +The valuable pattern is a shared application state and typed action interface: 128 +the agent's sheet capability sends structured commands, and compositor events 129 +update the same app-state cache used by observation. This is relevant to 130 +Omega #648's existing frontend/backend contract. It is more concrete than 131 +having an agent infer every application action from screenshots. 132 + 133 +The implementation also demonstrates pitfalls to avoid. State reflection can 134 +substitute dummy disk values when telemetry is unavailable. Action-tier logic 135 +can advance authority based on recent behavioral scores. Missing measurements 136 +should remain explicitly unknown, and successful behavior must not itself mint 137 +permissions. The Om delegation predicate includes no such escalation input. 138 + 139 +## What the review does not establish 140 + 141 +None of the inspected material supplies evidence of a faster CUDA-free GB10 142 +execution path or a qualified replacement for the existing CUDApp backend. 143 +No performance, training-quality or recursive-self-improvement gain is claimed 144 +for these Om contracts. Their benefit is precise, testable refusal and recovery 145 +behavior at existing integration boundaries. native/control/evidence/659/README.md new file mode 100644 @@ -0,0 +1,117 @@ 1 +# Issue 659 evidence 2 + 3 +Evidence class: **EMULATED**. The host is x86_64 Linux. QEMU executes both the 4 +AArch64 seeded compiler and the AArch64 test programs. No performance timing, 5 +Spark/GB10 execution, production dispatch or power-loss qualification is claimed. 6 + 7 +Functional source is recorded separately from evidence-only follow-up commits. 8 +The final source-bound run is in `qualified/receipt.json` when present. Files 9 +directly in this directory are chronological development evidence and do not 10 +independently bind a clean source commit. They are preserved, including the 11 +initial failing controls and the later delegation rights-profile correction. 12 + 13 +## Tools 14 + 15 +- Seed/compiler source: `aien-dev/omega-mv@`57f5f4258cebf3d5b2c22853cd062e351265c525``. 16 +- Compiler SHA-256: ``01b1545b23e8ff40cb5691e20b5df910ea4acaefde3495f0d62d270465b98cd6``. 17 +- QEMU: `qemu-aarch64 version 8.2.2 (Debian 1:8.2.2+ds-0ubuntu1.18)`. 18 +- QEMU executable SHA-256: ``e4f8d99e9ff69c3cefffab71cee358ce2af1ecba1282d04c3eeb44ef76f5a71e``. 19 +- Ubuntu package SHA-256: ``5bb397f66063efa349f6fd5cb3b68cd96f29edd0994e4ba5115cf0859a716bf0``. 20 +- The package was extracted into the scratch tool directory. It is an external 21 + execution emulator, not a project build/runtime dependency. 22 + 23 +The seed reconstruction starts with the existing `seed/rung0/load0.sh`, then 24 +runs seed0 -> hex1 -> asm2 -> om4 -> omc stage1 -> stage2 -> stage3 under QEMU. 25 +Each reconstructed rung matches the pinned published binary. All three omc 26 +stages match one another and `seed/out/omc`. 27 +`seed-rebuild.sha256` records the actual output hashes. This checks the 28 +reconstruction and fixed point; it is not diverse-double-compilation proof. 29 + 30 +## Replay commands 31 + 32 +The source and tools must be pinned before replay. `qemu-aarch64-static` below 33 +is the executable with the hash above, and `OMC` is the verified compiler. 34 +Use a private output directory; never replace the source compiler or evidence. 35 + 36 +```sh 37 +OMC=/absolute/path/to/verified/omc 38 +QEMU=/absolute/path/to/qemu-aarch64-static 39 +OUT=/absolute/path/to/private-output 40 +mkdir -p "$OUT" 41 +cat native/control/src/action.om native/control/tests/action.om > "$OUT/action.om" 42 +"$QEMU" "$OMC" < "$OUT/action.om" > "$OUT/action.elf" 43 +chmod +x "$OUT/action.elf" 44 +"$QEMU" "$OUT/action.elf" 45 + 46 +cat native/control/src/delegate.om native/control/tests/delegate.om > "$OUT/delegate.om" 47 +"$QEMU" "$OMC" < "$OUT/delegate.om" > "$OUT/delegate.elf" 48 +chmod +x "$OUT/delegate.elf" 49 +"$QEMU" "$OUT/delegate.elf" 50 + 51 +cat native/control/src/reuse.om native/control/tests/reuse.om > "$OUT/reuse.om" 52 +"$QEMU" "$OMC" < "$OUT/reuse.om" > "$OUT/reuse.elf" 53 +chmod +x "$OUT/reuse.elf" 54 +"$QEMU" "$OUT/reuse.elf" 55 +``` 56 + 57 +Expected final output of the 2026-10-23 source, respectively (the tests have 58 +since gained assertions; the current counts are in 59 +[../replay-`20261116`/README.md](../replay-`20261116`/README.md)): 60 + 61 +```text 62 +action checks=219 000 63 +delegate checks=074 000 64 +reuse checks=074 000 65 +``` 66 + 67 +Each program returns 0 on those results, 1 on a failed assertion and 2 on failed 68 +report output. Each assertion is executed in Om. The reporting counters are not 69 +host-calculated. Source concatenation and process invocation are external 70 +build/test transport, not a shipped foreign test implementation. 71 + 72 +For the three baseline negative controls, replace `src/MODULE.om` in the same 73 +commands with `tests/negative/MODULE-stub.om`. Each must compile with exit 0, 74 +run with exit 1 and print failed assertions. The original RED tests were run 75 +before writing each real implementation; the final-source replay repeats the 76 +controls against the current tests. 77 + 78 +For the ten guard mutants, apply the corresponding `qualified/*.diff` with 79 +`git apply --unidiff-zero` in an isolated scratch checkout to a 80 +scratch copy of the production module, then compile it with the unchanged Om 81 +tests. Every mutant must compile successfully and fail assertions with exit 1. 82 +A compiler error, signal or timeout does not count as detecting a mutant. 83 + 84 +The three compile-refusal inputs are concatenated after the named production 85 +module and compiled in the same way: 86 + 87 +| Input under `tests/negative/` | Module | Expected compiler exit | 88 +|---|---|---| 89 +| `wrong-action-size.om` | action | 7 | 90 +| `aliased-action.om` | action | 19 | 91 +| `wrong-payload-size.om` | reuse | 7 | 92 + 93 +No test binary should be run from a refused compilation. Aliasing a mutable 94 +record as its own independent authority-facts argument must remain refused. 95 + 96 +## What remains 97 + 98 +2026-10-23 final functional source: ``baa1587fc1542177595b90dccf36f98b1e294b0a``. 99 +The clean-source replay in [qualified/receipt.json](qualified/receipt.json) 100 +records 367 passing assertions, three detected always-accept stubs, ten 101 +detected compiled guard mutants and three expected compiler refusals. Each 102 +mutant ran and failed assertions; none was counted from a compiler error. 103 + 104 +- Independent review of the final functional source: run on 2026-11-16 for the 105 + replay onto omega-mv main (see [../replay-`20261116`/README.md](../replay-`20261116`/README.md)); 106 + its findings were fixed before landing. 107 +- Trusted authority/receipt verification and durable store/dispatch integration: 108 + NOT_RUN. These modules accept facts produced by those owners. 109 +- Concurrent actors, actual crash/restart, persistence failure and revocation 110 + racing with dispatch: NOT_RUN at the integration boundary. 111 +- Spark/GB10 GPU and other hardware profiles: NOT_RUN. Native AArch64 CPU 112 + execution on the Spark host ran on 2026-11-16 (replay record above). 113 +- Full existing runtime suite: NOT_RUN; no legacy runtime source or build target 114 + changes. The full new component suites and compiled controls are exercised. 115 +- Landing: by the lane's own exact-head review and receipt (receipts, not 116 + approvals; no review desk, Drake 2026-11-11). A passing component receipt is 117 + not permission to mark the parent issues complete. native/control/evidence/659/action-attempt-compile.log new file mode 100644 native/control/evidence/659/action-attempt.diff new file mode 100644 @@ -0,0 +1,13 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -137,9 +137,7 @@ 4 + if ne get s 3 1 5 + ret 36 6 + end 7 +-if ne get s 2 get r 2 8 +-ret 35 9 +-end 10 ++note MUTANT accepts stale attempt receipt 11 + if ne get s 4 get r 4 12 + ret 31 13 + end native/control/evidence/659/action-attempt.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 003 native/control/evidence/659/action-authority-compile.log new file mode 100644 native/control/evidence/659/action-authority.diff new file mode 100644 @@ -0,0 +1,13 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -60,9 +60,7 @@ 4 + if or ne get c 3 0 or ne get c 6 0 ne get c 7 0 5 + ret 12 6 + end 7 +-if ne get c 1 1 8 +-ret 30 9 +-end 10 ++note MUTANT skips authorization 11 + if ne get r 4 get c 4 12 + ret 31 13 + end native/control/evidence/659/action-authority.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 008 native/control/evidence/659/action-binding-compile.log new file mode 100644 native/control/evidence/659/action-binding.diff new file mode 100644 @@ -0,0 +1,5 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -75 +75 @@ 4 +-ret actbind r c 5 ++ret 0 native/control/evidence/659/action-binding.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 072 native/control/evidence/659/action-compile.log new file mode 100644 native/control/evidence/659/action-deny-none-compile.log new file mode 100644 native/control/evidence/659/action-deny-none.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 124 native/control/evidence/659/action-epoch-compile.log new file mode 100644 native/control/evidence/659/action-epoch.diff new file mode 100644 @@ -0,0 +1,13 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -66,9 +66,7 @@ 4 + if ne get r 4 get c 4 5 + ret 31 6 + end 7 +-if ne get r 5 get c 5 8 +-ret 32 9 +-end 10 ++note MUTANT skips epoch 11 + if ge get c 2 get r 6 12 + ret 33 13 + end native/control/evidence/659/action-epoch.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 003 native/control/evidence/659/action-final-compile.log new file mode 100644 native/control/evidence/659/action-final.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 000 native/control/evidence/659/action-red-compile.log new file mode 100644 native/control/evidence/659/action-red.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=215 121 native/control/evidence/659/action-unknown-compile.log new file mode 100644 native/control/evidence/659/action-unknown.diff new file mode 100644 @@ -0,0 +1,11 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -81,7 +81,7 @@ 4 + ret err 5 + end 6 + if eq get r 1 3 7 +-ret 21 8 ++put r 1 1 9 + end 10 + if eq get r 1 4 11 + ret 22 native/control/evidence/659/action-unknown.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 013 native/control/evidence/659/action.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=215 000 native/control/evidence/659/aliased-action-compile.log new file mode 100644 @@ -0,0 +1 @@ 1 +omc: line 169: error 19 native/control/evidence/659/delegate-compile.log new file mode 100644 native/control/evidence/659/delegate-deny-none-compile.log new file mode 100644 native/control/evidence/659/delegate-deny-none.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=072 059 native/control/evidence/659/delegate-depth-compile.log new file mode 100644 native/control/evidence/659/delegate-depth.diff new file mode 100644 @@ -0,0 +1,13 @@ 1 +--- a/native/control/src/delegate.om 2 ++++ b/native/control/src/delegate.om 3 +@@ -71,9 +71,7 @@ 4 + if eq get p 5 0 5 + ret 72 6 + end 7 +-if ge get c 5 get p 5 8 +-ret 73 9 +-end 10 ++note MUTANT accepts unattenuated depth 11 + if capeq p c 16 12 + ret 74 13 + end native/control/evidence/659/delegate-depth.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=072 001 native/control/evidence/659/delegate-final-compile.log new file mode 100644 native/control/evidence/659/delegate-final.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=072 000 native/control/evidence/659/delegate-red-compile.log new file mode 100644 native/control/evidence/659/delegate-red.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=072 059 native/control/evidence/659/delegate-rights-compile.log new file mode 100644 native/control/evidence/659/delegate-rights.diff new file mode 100644 @@ -0,0 +1,13 @@ 1 +--- a/native/control/src/delegate.om 2 ++++ b/native/control/src/delegate.om 3 +@@ -50,9 +50,7 @@ 4 + if ge now get c 4 5 + ret 65 6 + end 7 +-if ne and get c 1 get p 1 get c 1 8 +-ret 66 9 +-end 10 ++note MUTANT accepts rights escalation 11 + if gt get c 2 get p 2 12 + ret 67 13 + end native/control/evidence/659/delegate-rights.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=072 026 native/control/evidence/659/delegate-scope-compile.log new file mode 100644 native/control/evidence/659/delegate-scope.diff new file mode 100644 @@ -0,0 +1,13 @@ 1 +--- a/native/control/src/delegate.om 2 ++++ b/native/control/src/delegate.om 3 +@@ -62,9 +62,7 @@ 4 + if gt get c 4 get p 4 5 + ret 69 6 + end 7 +-if not capeq p c 8 8 +-ret 70 9 +-end 10 ++note MUTANT accepts other resource 11 + if not capeq p c 12 12 + ret 71 13 + end native/control/evidence/659/delegate-scope.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=072 004 native/control/evidence/659/delegate-v2-compile.log new file mode 100644 native/control/evidence/659/delegate-v2.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=074 000 native/control/evidence/659/delegate.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=072 000 native/control/evidence/659/qualified/action-attempt.compile.log new file mode 100644 native/control/evidence/659/qualified/action-attempt.diff new file mode 100644 @@ -0,0 +1,7 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -140,3 +140 @@ 4 +-if ne get s 2 get r 2 5 +-ret 35 6 +-end 7 ++note MUTANT accepts stale attempt receipt native/control/evidence/659/qualified/action-attempt.stderr.log new file mode 100644 native/control/evidence/659/qualified/action-attempt.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 003 native/control/evidence/659/qualified/action-authority.compile.log new file mode 100644 native/control/evidence/659/qualified/action-authority.diff new file mode 100644 @@ -0,0 +1,7 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -63,3 +63 @@ 4 +-if ne get c 1 1 5 +-ret 30 6 +-end 7 ++note MUTANT skips authorization native/control/evidence/659/qualified/action-authority.stderr.log new file mode 100644 native/control/evidence/659/qualified/action-authority.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 008 native/control/evidence/659/qualified/action-binding.compile.log new file mode 100644 native/control/evidence/659/qualified/action-binding.diff new file mode 100644 @@ -0,0 +1,5 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -75 +75 @@ 4 +-ret actbind r c 5 ++ret 0 native/control/evidence/659/qualified/action-binding.stderr.log new file mode 100644 native/control/evidence/659/qualified/action-binding.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 072 native/control/evidence/659/qualified/action-deny-none.compile.log new file mode 100644 native/control/evidence/659/qualified/action-deny-none.stderr.log new file mode 100644 native/control/evidence/659/qualified/action-deny-none.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 124 native/control/evidence/659/qualified/action-epoch.compile.log new file mode 100644 native/control/evidence/659/qualified/action-epoch.diff new file mode 100644 @@ -0,0 +1,7 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -69,3 +69 @@ 4 +-if ne get r 5 get c 5 5 +-ret 32 6 +-end 7 ++note MUTANT skips epoch native/control/evidence/659/qualified/action-epoch.stderr.log new file mode 100644 native/control/evidence/659/qualified/action-epoch.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 003 native/control/evidence/659/qualified/action-unknown.compile.log new file mode 100644 native/control/evidence/659/qualified/action-unknown.diff new file mode 100644 @@ -0,0 +1,5 @@ 1 +--- a/native/control/src/action.om 2 ++++ b/native/control/src/action.om 3 +@@ -84 +84 @@ 4 +-ret 21 5 ++put r 1 1 native/control/evidence/659/qualified/action-unknown.stderr.log new file mode 100644 native/control/evidence/659/qualified/action-unknown.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 013 native/control/evidence/659/qualified/action.compile.log new file mode 100644 native/control/evidence/659/qualified/action.stderr.log new file mode 100644 native/control/evidence/659/qualified/action.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +action checks=219 000 native/control/evidence/659/qualified/aliased-action.compile.log new file mode 100644 @@ -0,0 +1 @@ 1 +omc: line 169: error 19 native/control/evidence/659/qualified/commands.txt new file mode 100644 @@ -0,0 +1,35 @@ 1 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action.elf 2 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action.elf 3 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-deny-none.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-deny-none.elf 4 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-deny-none.elf 5 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate.elf 6 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate.elf 7 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-deny-none.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-deny-none.elf 8 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-deny-none.elf 9 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse.elf 10 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse.elf 11 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-deny-none.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-deny-none.elf 12 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-deny-none.elf 13 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-unknown.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-unknown.elf 14 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-unknown.elf 15 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-authority.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-authority.elf 16 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-authority.elf 17 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-epoch.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-epoch.elf 18 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-epoch.elf 19 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-attempt.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-attempt.elf 20 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-attempt.elf 21 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-binding.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-binding.elf 22 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-binding.elf 23 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-rights.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-rights.elf 24 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-rights.elf 25 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-depth.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-depth.elf 26 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-depth.elf 27 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-scope.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-scope.elf 28 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-scope.elf 29 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-identity.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-identity.elf 30 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-identity.elf 31 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-payload.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-payload.elf 32 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-payload.elf 33 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/wrong-action-size.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/wrong-action-size.elf 34 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/aliased-action.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/aliased-action.elf 35 +/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 < /workspace/scratch/`7aa7ae786696`/omega-published/build/control/wrong-payload-size.om > /workspace/scratch/`7aa7ae786696`/omega-published/build/control/wrong-payload-size.elf native/control/evidence/659/qualified/delegate-deny-none.compile.log new file mode 100644 native/control/evidence/659/qualified/delegate-deny-none.stderr.log new file mode 100644 native/control/evidence/659/qualified/delegate-deny-none.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=074 060 native/control/evidence/659/qualified/delegate-depth.compile.log new file mode 100644 native/control/evidence/659/qualified/delegate-depth.diff new file mode 100644 @@ -0,0 +1,7 @@ 1 +--- a/native/control/src/delegate.om 2 ++++ b/native/control/src/delegate.om 3 +@@ -74,3 +74 @@ 4 +-if ge get c 5 get p 5 5 +-ret 73 6 +-end 7 ++note MUTANT accepts unattenuated depth native/control/evidence/659/qualified/delegate-depth.stderr.log new file mode 100644 native/control/evidence/659/qualified/delegate-depth.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=074 001 native/control/evidence/659/qualified/delegate-rights.compile.log new file mode 100644 native/control/evidence/659/qualified/delegate-rights.diff new file mode 100644 @@ -0,0 +1,7 @@ 1 +--- a/native/control/src/delegate.om 2 ++++ b/native/control/src/delegate.om 3 +@@ -53,3 +53 @@ 4 +-if ne and get c 1 get p 1 get c 1 5 +-ret 66 6 +-end 7 ++note MUTANT accepts rights escalation native/control/evidence/659/qualified/delegate-rights.stderr.log new file mode 100644 native/control/evidence/659/qualified/delegate-rights.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=074 028 native/control/evidence/659/qualified/delegate-scope.compile.log new file mode 100644 native/control/evidence/659/qualified/delegate-scope.diff new file mode 100644 @@ -0,0 +1,7 @@ 1 +--- a/native/control/src/delegate.om 2 ++++ b/native/control/src/delegate.om 3 +@@ -65,3 +65 @@ 4 +-if not capeq p c 8 5 +-ret 70 6 +-end 7 ++note MUTANT accepts other resource native/control/evidence/659/qualified/delegate-scope.stderr.log new file mode 100644 native/control/evidence/659/qualified/delegate-scope.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=074 004 native/control/evidence/659/qualified/delegate.compile.log new file mode 100644 native/control/evidence/659/qualified/delegate.stderr.log new file mode 100644 native/control/evidence/659/qualified/delegate.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +delegate checks=074 000 native/control/evidence/659/qualified/receipt.json new file mode 100644 @@ -0,0 +1,395 @@ 1 +{ 2 + "schema": "omega.control.component-receipt.v1", 3 + "source_clean_at_start": true, 4 + "evidence_class": "EMULATED", 5 + "host": "x86_64 Linux", 6 + "compiler_source_commit": "`57f5f4258cebf3d5b2c22853cd062e351265c525`", 7 + "compiler_sha256": "`01b1545b23e8ff40cb5691e20b5df910ea4acaefde3495f0d62d270465b98cd6`", 8 + "emulator_sha256": "`e4f8d99e9ff69c3cefffab71cee358ce2af1ecba1282d04c3eeb44ef76f5a71e`", 9 + "emulator_version": "qemu-aarch64 version 8.2.2 (Debian 1:8.2.2+ds-0ubuntu1.18)", 10 + "positive_assertions": 367, 11 + "positive_suites": 3, 12 + "negative_stubs_detected": 3, 13 + "compiled_guard_mutants_detected": 10, 14 + "compile_refusals_checked": 3, 15 + "not_run": [ 16 + "independent final-source review", 17 + "authoritative durable store/dispatch integration", 18 + "real provider effects and crash/restart", 19 + "concurrent dispatch/revocation races", 20 + "native AArch64 and GB10 hardware", 21 + "legacy runtime regression suite" 22 + ], 23 + "claim": "Bounded contract component tests only. No production or hardware qualification.", 24 + "source_commit": "`baa1587fc1542177595b90dccf36f98b1e294b0a`", 25 + "source_tree": "`27c1d4e8af1ff81ea1aabc3fa08e7153e69a8277`", 26 + "source_closure_sha256": { 27 + "native/control/src/action.om": "`698aa7d6232837be9c4ba85ebb57d6c656aacb60ae9e703b0e4f11967562e5de`", 28 + "native/control/src/delegate.om": "`501c3c8a760724ae56d836dbbe650205b55a4b9371d18609caccdb0c312cc981`", 29 + "native/control/src/reuse.om": "`dd35c5d4216958bf2f7676067c4d6aeee349d01cdca5b619f56f9765df623a9a`", 30 + "native/control/tests/action.om": "`47c6c44e81af5521551927b7125bdca3b7b0b9cf6ca4549801f5067c200feea4`", 31 + "native/control/tests/delegate.om": "`af75da450c98fa7650398041979a4fc7ad4f7e9182928f90998a7c9c85fe1c7d`", 32 + "native/control/tests/negative/action-stub.om": "`2c9e4dd2f6ab2ebd589363f9a5d45416dda5b79c9629a0c6ffbfb1e51dd4bdbd`", 33 + "native/control/tests/negative/aliased-action.om": "`8b0de9f802fe3bd526af9e8807a4a6f0f0e99642295245cca9f37fbff223bef3`", 34 + "native/control/tests/negative/delegate-stub.om": "`13f8812ddefbbe0357c64cf7595bfd5cc0d2f9bb3463d49631c6537eea784164`", 35 + "native/control/tests/negative/reuse-stub.om": "`e367df060c80d3b46eac56158ddb49c90ded4491ecfc69a2fe2291b425d97583`", 36 + "native/control/tests/negative/wrong-action-size.om": "`0b352d83e9e422071a051e79ff18dfa10cf24235a232918b827f97311df390f8`", 37 + "native/control/tests/negative/wrong-payload-size.om": "`1599dab6dfbca6dcd2970a7999e28c64db7b9e52fb0afdcecd054f6e97a210f2`", 38 + "native/control/tests/reuse.om": "`28c5d17a301bea4d95bd7c5d3f2c9753df12d236d6246dbd9e914cece4788be9`" 39 + }, 40 + "cases": [ 41 + { 42 + "case": "action", 43 + "unit_sha256": "`3dda4fd54ac6c31b44ee73fe44761266734969abf77cbea3015d3b48686ce127`", 44 + "compile_argv": [ 45 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 46 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 47 + ], 48 + "compile_exit": 0, 49 + "expected_compile_exit": 0, 50 + "compile_diagnostic": "", 51 + "binary_sha256": "`f56e5696dfcfc8a16430147db176eb5b6568ec794fd3de9303f9dcd505f246aa`", 52 + "run_argv": [ 53 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 54 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/action.elf" 55 + ], 56 + "run_exit": 0, 57 + "expected_run_exit": 0, 58 + "stdout": "action checks=219 000\n", 59 + "stderr": "" 60 + }, 61 + { 62 + "case": "action-deny-none", 63 + "unit_sha256": "`2a09d4f9dd1dc8a6140c8dc71d71f2d1766ea3763d031f64dae01184e2585989`", 64 + "compile_argv": [ 65 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 66 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 67 + ], 68 + "compile_exit": 0, 69 + "expected_compile_exit": 0, 70 + "compile_diagnostic": "", 71 + "binary_sha256": "`58a096688e47124e82bb6fe059ff385e9935e4d7dadac690cc51436a6c192fe0`", 72 + "run_argv": [ 73 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 74 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-deny-none.elf" 75 + ], 76 + "run_exit": 1, 77 + "expected_run_exit": 1, 78 + "stdout": "action checks=219 124\n", 79 + "stderr": "" 80 + }, 81 + { 82 + "case": "delegate", 83 + "unit_sha256": "`03adbc46b47ae9be64385740c0d8c2d96dc8b6f05cd2d8cf40dd6632f09ca110`", 84 + "compile_argv": [ 85 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 86 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 87 + ], 88 + "compile_exit": 0, 89 + "expected_compile_exit": 0, 90 + "compile_diagnostic": "", 91 + "binary_sha256": "`2c00ea7f17b93a1f18b40c6b0215b487ac06dc83a8b79a3793072edb6d6bee50`", 92 + "run_argv": [ 93 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 94 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate.elf" 95 + ], 96 + "run_exit": 0, 97 + "expected_run_exit": 0, 98 + "stdout": "delegate checks=074 000\n", 99 + "stderr": "" 100 + }, 101 + { 102 + "case": "delegate-deny-none", 103 + "unit_sha256": "`e0c6ef386114f7cc923225b2c3e069b5892cf97daeb243d844b5e53271c8d066`", 104 + "compile_argv": [ 105 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 106 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 107 + ], 108 + "compile_exit": 0, 109 + "expected_compile_exit": 0, 110 + "compile_diagnostic": "", 111 + "binary_sha256": "`3ac2454aaad1518e00810bc999b8c3bae1f2bed6dad46d889dfbc3d5f2ced023`", 112 + "run_argv": [ 113 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 114 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-deny-none.elf" 115 + ], 116 + "run_exit": 1, 117 + "expected_run_exit": 1, 118 + "stdout": "delegate checks=074 060\n", 119 + "stderr": "" 120 + }, 121 + { 122 + "case": "reuse", 123 + "unit_sha256": "`04f948feb581707298c82f24d2a156be3b27685b137178ffae1649b8133f491e`", 124 + "compile_argv": [ 125 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 126 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 127 + ], 128 + "compile_exit": 0, 129 + "expected_compile_exit": 0, 130 + "compile_diagnostic": "", 131 + "binary_sha256": "`f4fb1d2c0d9a0c8fd2efa6d6239b968aa5ccc9edc9d8c3a662c4743e9b729105`", 132 + "run_argv": [ 133 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 134 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse.elf" 135 + ], 136 + "run_exit": 0, 137 + "expected_run_exit": 0, 138 + "stdout": "reuse checks=074 000\n", 139 + "stderr": "" 140 + }, 141 + { 142 + "case": "reuse-deny-none", 143 + "unit_sha256": "`e6029666bf437bc5424a75c016097b00483d8c16c6cac5606b12add9830409aa`", 144 + "compile_argv": [ 145 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 146 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 147 + ], 148 + "compile_exit": 0, 149 + "expected_compile_exit": 0, 150 + "compile_diagnostic": "", 151 + "binary_sha256": "`ffd65a2a4ffa30440feddbe93aaf6f9609eaaddd1a2d69418da9d50407977f8c`", 152 + "run_argv": [ 153 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 154 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-deny-none.elf" 155 + ], 156 + "run_exit": 1, 157 + "expected_run_exit": 1, 158 + "stdout": "reuse checks=074 072\n", 159 + "stderr": "" 160 + }, 161 + { 162 + "case": "action-unknown", 163 + "unit_sha256": "`0cddec9f9c7a7a1a53b465342a569656f23412e843fca94b4520e7a1654246ad`", 164 + "compile_argv": [ 165 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 166 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 167 + ], 168 + "compile_exit": 0, 169 + "expected_compile_exit": 0, 170 + "compile_diagnostic": "", 171 + "binary_sha256": "`66bbe32f75309cb482b61cdb773d45caa474b1da68cf666400258597716206ed`", 172 + "run_argv": [ 173 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 174 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-unknown.elf" 175 + ], 176 + "run_exit": 1, 177 + "expected_run_exit": 1, 178 + "stdout": "action checks=219 013\n", 179 + "stderr": "" 180 + }, 181 + { 182 + "case": "action-authority", 183 + "unit_sha256": "`402ece8d6c742052524a2accf87b831fce95409209bfd4094ad65d4f33992781`", 184 + "compile_argv": [ 185 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 186 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 187 + ], 188 + "compile_exit": 0, 189 + "expected_compile_exit": 0, 190 + "compile_diagnostic": "", 191 + "binary_sha256": "`f2d13529a1d1b0ec30a5ec6ac36575378c79ec1ba39c3707b5005ec6509423fd`", 192 + "run_argv": [ 193 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 194 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-authority.elf" 195 + ], 196 + "run_exit": 1, 197 + "expected_run_exit": 1, 198 + "stdout": "action checks=219 008\n", 199 + "stderr": "" 200 + }, 201 + { 202 + "case": "action-epoch", 203 + "unit_sha256": "`7231718a0bc0526fdd216b40f503100ee7561427fd956ca317979e72e6f694af`", 204 + "compile_argv": [ 205 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 206 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 207 + ], 208 + "compile_exit": 0, 209 + "expected_compile_exit": 0, 210 + "compile_diagnostic": "", 211 + "binary_sha256": "`635539342a41aadf08e9b351cdda9bf40da80448809eb0348582800a29e2126b`", 212 + "run_argv": [ 213 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 214 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-epoch.elf" 215 + ], 216 + "run_exit": 1, 217 + "expected_run_exit": 1, 218 + "stdout": "action checks=219 003\n", 219 + "stderr": "" 220 + }, 221 + { 222 + "case": "action-attempt", 223 + "unit_sha256": "`53ba5dde14ee43e55940d195807d3d482d9e33b89ddeebbc1a62456976d16936`", 224 + "compile_argv": [ 225 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 226 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 227 + ], 228 + "compile_exit": 0, 229 + "expected_compile_exit": 0, 230 + "compile_diagnostic": "", 231 + "binary_sha256": "`feac5a0fe6fa887c9281321baf9efd79f7de5a0e11f8875a638e752afa917cec`", 232 + "run_argv": [ 233 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 234 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-attempt.elf" 235 + ], 236 + "run_exit": 1, 237 + "expected_run_exit": 1, 238 + "stdout": "action checks=219 003\n", 239 + "stderr": "" 240 + }, 241 + { 242 + "case": "action-binding", 243 + "unit_sha256": "`1be550c4c0d7d3c7a333d5e7c1f569c065a450cebb68ac47b9d23cd12923844a`", 244 + "compile_argv": [ 245 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 246 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 247 + ], 248 + "compile_exit": 0, 249 + "expected_compile_exit": 0, 250 + "compile_diagnostic": "", 251 + "binary_sha256": "`e40aa0cd6fa2ab2368b1cd5875333f5207d4cc8fcd527b99f5374ec94a7e97ef`", 252 + "run_argv": [ 253 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 254 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/action-binding.elf" 255 + ], 256 + "run_exit": 1, 257 + "expected_run_exit": 1, 258 + "stdout": "action checks=219 072\n", 259 + "stderr": "" 260 + }, 261 + { 262 + "case": "delegate-rights", 263 + "unit_sha256": "`9c3bc76886e4d702e0a7a17df867af6b620a9c83ffb3d6194f74952a23e7b9b1`", 264 + "compile_argv": [ 265 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 266 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 267 + ], 268 + "compile_exit": 0, 269 + "expected_compile_exit": 0, 270 + "compile_diagnostic": "", 271 + "binary_sha256": "`325fbae2aeb0f6984acb16d186c03144dea7e61a5e6ace310c5661297881a1df`", 272 + "run_argv": [ 273 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 274 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-rights.elf" 275 + ], 276 + "run_exit": 1, 277 + "expected_run_exit": 1, 278 + "stdout": "delegate checks=074 028\n", 279 + "stderr": "" 280 + }, 281 + { 282 + "case": "delegate-depth", 283 + "unit_sha256": "`21b4c3d429441adb41ec951c319d53c46803c9edb8abb06f8a16c293989621b4`", 284 + "compile_argv": [ 285 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 286 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 287 + ], 288 + "compile_exit": 0, 289 + "expected_compile_exit": 0, 290 + "compile_diagnostic": "", 291 + "binary_sha256": "`a58604f014111866b957cf8394994b65f274c1afc7ceb726ab56b4687c132313`", 292 + "run_argv": [ 293 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 294 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-depth.elf" 295 + ], 296 + "run_exit": 1, 297 + "expected_run_exit": 1, 298 + "stdout": "delegate checks=074 001\n", 299 + "stderr": "" 300 + }, 301 + { 302 + "case": "delegate-scope", 303 + "unit_sha256": "`3bd5599277666e8d8c7bc75e1794168ad795d2ed38468e786d886e8ac8867776`", 304 + "compile_argv": [ 305 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 306 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 307 + ], 308 + "compile_exit": 0, 309 + "expected_compile_exit": 0, 310 + "compile_diagnostic": "", 311 + "binary_sha256": "`92dea90f16cb87e742c71d8bb03b048a68641400f4dfc620734b560bef64df6e`", 312 + "run_argv": [ 313 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 314 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/delegate-scope.elf" 315 + ], 316 + "run_exit": 1, 317 + "expected_run_exit": 1, 318 + "stdout": "delegate checks=074 004\n", 319 + "stderr": "" 320 + }, 321 + { 322 + "case": "reuse-identity", 323 + "unit_sha256": "`c55ade1d2e3784e44c09d61b169735c8b98a5d18865e936ab8ba05ef59a789c1`", 324 + "compile_argv": [ 325 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 326 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 327 + ], 328 + "compile_exit": 0, 329 + "expected_compile_exit": 0, 330 + "compile_diagnostic": "", 331 + "binary_sha256": "`741b064c2e48bdde735b5ecbeb91a6dc042d06dbaa675097c0cdcdb72a3da8b0`", 332 + "run_argv": [ 333 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 334 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-identity.elf" 335 + ], 336 + "run_exit": 1, 337 + "expected_run_exit": 1, 338 + "stdout": "reuse checks=074 031\n", 339 + "stderr": "" 340 + }, 341 + { 342 + "case": "reuse-payload", 343 + "unit_sha256": "`bee98fbf28432d7d0c20a7c890d538525403570f51809e4bbbcf6651fe803160`", 344 + "compile_argv": [ 345 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 346 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 347 + ], 348 + "compile_exit": 0, 349 + "expected_compile_exit": 0, 350 + "compile_diagnostic": "", 351 + "binary_sha256": "`19eff1c989e513a4016e969dd1be3a19629d95a073ad8b88481005de6eaf55fe`", 352 + "run_argv": [ 353 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 354 + "/workspace/scratch/`7aa7ae786696`/omega-published/build/control/reuse-payload.elf" 355 + ], 356 + "run_exit": 1, 357 + "expected_run_exit": 1, 358 + "stdout": "reuse checks=074 004\n", 359 + "stderr": "" 360 + }, 361 + { 362 + "case": "wrong-action-size", 363 + "unit_sha256": "`29fce568d19da0831218fbbb390aef2a7256716b7a16ab13083c022f77decdb8`", 364 + "compile_argv": [ 365 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 366 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 367 + ], 368 + "compile_exit": 7, 369 + "expected_compile_exit": 7, 370 + "compile_diagnostic": "omc: line 170: error 7\n" 371 + }, 372 + { 373 + "case": "aliased-action", 374 + "unit_sha256": "`9a5b8d69d13fb77aba0b1ca7910bf20b5df5b00bc7d600ccd6be4da494cb6d84`", 375 + "compile_argv": [ 376 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 377 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 378 + ], 379 + "compile_exit": 19, 380 + "expected_compile_exit": 19, 381 + "compile_diagnostic": "omc: line 169: error 19\n" 382 + }, 383 + { 384 + "case": "wrong-payload-size", 385 + "unit_sha256": "`7577c1aba9c3d3b73e3cfd95ca7ffe3d28780f398c01cd97871c936a61654ff9`", 386 + "compile_argv": [ 387 + "/workspace/scratch/`7aa7ae786696`/qemu-tool/usr/bin/qemu-aarch64-static", 388 + "/workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3" 389 + ], 390 + "compile_exit": 7, 391 + "expected_compile_exit": 7, 392 + "compile_diagnostic": "omc: line 88: error 7\n" 393 + } 394 + ] 395 +} native/control/evidence/659/qualified/reuse-deny-none.compile.log new file mode 100644 native/control/evidence/659/qualified/reuse-deny-none.stderr.log new file mode 100644 native/control/evidence/659/qualified/reuse-deny-none.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 072 native/control/evidence/659/qualified/reuse-identity.compile.log new file mode 100644 native/control/evidence/659/qualified/reuse-identity.diff new file mode 100644 @@ -0,0 +1,7 @@ 1 +--- a/native/control/src/reuse.om 2 ++++ b/native/control/src/reuse.om 3 +@@ -68,3 +68 @@ 4 +-if ne diff 0 5 +-ret add 120 g 6 +-end 7 ++note MUTANT accepts identity mismatch native/control/evidence/659/qualified/reuse-identity.stderr.log new file mode 100644 native/control/evidence/659/qualified/reuse-identity.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 031 native/control/evidence/659/qualified/reuse-payload.compile.log new file mode 100644 native/control/evidence/659/qualified/reuse-payload.diff new file mode 100644 @@ -0,0 +1,7 @@ 1 +--- a/native/control/src/reuse.om 2 ++++ b/native/control/src/reuse.om 3 +@@ -76,3 +76 @@ 4 +-if ne diff 0 5 +-ret 127 6 +-end 7 ++note MUTANT accepts corrupted payload native/control/evidence/659/qualified/reuse-payload.stderr.log new file mode 100644 native/control/evidence/659/qualified/reuse-payload.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 004 native/control/evidence/659/qualified/reuse.compile.log new file mode 100644 native/control/evidence/659/qualified/reuse.stderr.log new file mode 100644 native/control/evidence/659/qualified/reuse.stdout.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 000 native/control/evidence/659/qualified/wrong-action-size.compile.log new file mode 100644 @@ -0,0 +1 @@ 1 +omc: line 170: error 7 native/control/evidence/659/qualified/wrong-payload-size.compile.log new file mode 100644 @@ -0,0 +1 @@ 1 +omc: line 88: error 7 native/control/evidence/659/results.json new file mode 100644 @@ -0,0 +1,188 @@ 1 +{ 2 + "evidence_class": "EMULATED", 3 + "compiler_sha256": "`01b1545b23e8ff40cb5691e20b5df910ea4acaefde3495f0d62d270465b98cd6`", 4 + "emulator_sha256": "`e4f8d99e9ff69c3cefffab71cee358ce2af1ecba1282d04c3eeb44ef76f5a71e`", 5 + "cases": [ 6 + { 7 + "case": "action-final", 8 + "source_sha256": "`3dda4fd54ac6c31b44ee73fe44761266734969abf77cbea3015d3b48686ce127`", 9 + "compile_exit": 0, 10 + "expected_compile_exit": 0, 11 + "run_exit": 0, 12 + "expected_run_exit": 0, 13 + "binary_sha256": "`f56e5696dfcfc8a16430147db176eb5b6568ec794fd3de9303f9dcd505f246aa`", 14 + "output": "action checks=219 000\n" 15 + }, 16 + { 17 + "case": "action-deny-none", 18 + "source_sha256": "`2a09d4f9dd1dc8a6140c8dc71d71f2d1766ea3763d031f64dae01184e2585989`", 19 + "compile_exit": 0, 20 + "expected_compile_exit": 0, 21 + "run_exit": 1, 22 + "expected_run_exit": 1, 23 + "binary_sha256": "`58a096688e47124e82bb6fe059ff385e9935e4d7dadac690cc51436a6c192fe0`", 24 + "output": "action checks=219 124\n" 25 + }, 26 + { 27 + "case": "delegate-final", 28 + "source_sha256": "`0169a4c874c94e3ff50d7feba4d7e37c57a188594a78dc34b695e280a0069915`", 29 + "compile_exit": 0, 30 + "expected_compile_exit": 0, 31 + "run_exit": 0, 32 + "expected_run_exit": 0, 33 + "binary_sha256": "`c9b55c7309a1d71e61b4a2d9df61e32a925cbca60f7d65dc803775f92305431d`", 34 + "output": "delegate checks=072 000\n" 35 + }, 36 + { 37 + "case": "delegate-deny-none", 38 + "source_sha256": "`1e0b5ca1e5adf8c7676401f3d84f4eed949e4065eb246d54df30958bc2c0378e`", 39 + "compile_exit": 0, 40 + "expected_compile_exit": 0, 41 + "run_exit": 1, 42 + "expected_run_exit": 1, 43 + "binary_sha256": "`767c77c72f2c63094740824a6ef82b6da1dd0c6dd1dcff1b0080cabb7c389c99`", 44 + "output": "delegate checks=072 059\n" 45 + }, 46 + { 47 + "case": "reuse-final", 48 + "source_sha256": "`04f948feb581707298c82f24d2a156be3b27685b137178ffae1649b8133f491e`", 49 + "compile_exit": 0, 50 + "expected_compile_exit": 0, 51 + "run_exit": 0, 52 + "expected_run_exit": 0, 53 + "binary_sha256": "`f4fb1d2c0d9a0c8fd2efa6d6239b968aa5ccc9edc9d8c3a662c4743e9b729105`", 54 + "output": "reuse checks=074 000\n" 55 + }, 56 + { 57 + "case": "reuse-deny-none", 58 + "source_sha256": "`e6029666bf437bc5424a75c016097b00483d8c16c6cac5606b12add9830409aa`", 59 + "compile_exit": 0, 60 + "expected_compile_exit": 0, 61 + "run_exit": 1, 62 + "expected_run_exit": 1, 63 + "binary_sha256": "`ffd65a2a4ffa30440feddbe93aaf6f9609eaaddd1a2d69418da9d50407977f8c`", 64 + "output": "reuse checks=074 072\n" 65 + }, 66 + { 67 + "case": "action-unknown", 68 + "source_sha256": "`0cddec9f9c7a7a1a53b465342a569656f23412e843fca94b4520e7a1654246ad`", 69 + "compile_exit": 0, 70 + "expected_compile_exit": 0, 71 + "run_exit": 1, 72 + "expected_run_exit": 1, 73 + "binary_sha256": "`66bbe32f75309cb482b61cdb773d45caa474b1da68cf666400258597716206ed`", 74 + "output": "action checks=219 013\n" 75 + }, 76 + { 77 + "case": "action-authority", 78 + "source_sha256": "`402ece8d6c742052524a2accf87b831fce95409209bfd4094ad65d4f33992781`", 79 + "compile_exit": 0, 80 + "expected_compile_exit": 0, 81 + "run_exit": 1, 82 + "expected_run_exit": 1, 83 + "binary_sha256": "`f2d13529a1d1b0ec30a5ec6ac36575378c79ec1ba39c3707b5005ec6509423fd`", 84 + "output": "action checks=219 008\n" 85 + }, 86 + { 87 + "case": "action-epoch", 88 + "source_sha256": "`7231718a0bc0526fdd216b40f503100ee7561427fd956ca317979e72e6f694af`", 89 + "compile_exit": 0, 90 + "expected_compile_exit": 0, 91 + "run_exit": 1, 92 + "expected_run_exit": 1, 93 + "binary_sha256": "`635539342a41aadf08e9b351cdda9bf40da80448809eb0348582800a29e2126b`", 94 + "output": "action checks=219 003\n" 95 + }, 96 + { 97 + "case": "action-attempt", 98 + "source_sha256": "`53ba5dde14ee43e55940d195807d3d482d9e33b89ddeebbc1a62456976d16936`", 99 + "compile_exit": 0, 100 + "expected_compile_exit": 0, 101 + "run_exit": 1, 102 + "expected_run_exit": 1, 103 + "binary_sha256": "`feac5a0fe6fa887c9281321baf9efd79f7de5a0e11f8875a638e752afa917cec`", 104 + "output": "action checks=219 003\n" 105 + }, 106 + { 107 + "case": "action-binding", 108 + "source_sha256": "`1be550c4c0d7d3c7a333d5e7c1f569c065a450cebb68ac47b9d23cd12923844a`", 109 + "compile_exit": 0, 110 + "expected_compile_exit": 0, 111 + "run_exit": 1, 112 + "expected_run_exit": 1, 113 + "binary_sha256": "`e40aa0cd6fa2ab2368b1cd5875333f5207d4cc8fcd527b99f5374ec94a7e97ef`", 114 + "output": "action checks=219 072\n" 115 + }, 116 + { 117 + "case": "delegate-rights", 118 + "source_sha256": "`96e9291499e88045198c9397f6d86592b34519ce183bd1456a4826ce04d6840a`", 119 + "compile_exit": 0, 120 + "expected_compile_exit": 0, 121 + "run_exit": 1, 122 + "expected_run_exit": 1, 123 + "binary_sha256": "`eaa3461d47a8bc6629905bff3b63bdce36d303728883dc69c761dcdd172d0885`", 124 + "output": "delegate checks=072 026\n" 125 + }, 126 + { 127 + "case": "delegate-depth", 128 + "source_sha256": "`6cd1aa71e948376a9ed6ac4f2e0b498bd33849bdac87c7d868b045131399c244`", 129 + "compile_exit": 0, 130 + "expected_compile_exit": 0, 131 + "run_exit": 1, 132 + "expected_run_exit": 1, 133 + "binary_sha256": "`d05ad555f1cb2c0c076a47c4c94dcc97613e2841a79c85a913e08f9514b3e4fc`", 134 + "output": "delegate checks=072 001\n" 135 + }, 136 + { 137 + "case": "delegate-scope", 138 + "source_sha256": "`8e7f200b0086a86b70068255716b47ce025e1e87b7659089b7bf081903cd6d13`", 139 + "compile_exit": 0, 140 + "expected_compile_exit": 0, 141 + "run_exit": 1, 142 + "expected_run_exit": 1, 143 + "binary_sha256": "`0b57fb2fde61fa5e45eeed1bb9607f4ff541f2cca9ee95354eb299828cd86379`", 144 + "output": "delegate checks=072 004\n" 145 + }, 146 + { 147 + "case": "reuse-identity", 148 + "source_sha256": "`c55ade1d2e3784e44c09d61b169735c8b98a5d18865e936ab8ba05ef59a789c1`", 149 + "compile_exit": 0, 150 + "expected_compile_exit": 0, 151 + "run_exit": 1, 152 + "expected_run_exit": 1, 153 + "binary_sha256": "`741b064c2e48bdde735b5ecbeb91a6dc042d06dbaa675097c0cdcdb72a3da8b0`", 154 + "output": "reuse checks=074 031\n" 155 + }, 156 + { 157 + "case": "reuse-payload", 158 + "source_sha256": "`bee98fbf28432d7d0c20a7c890d538525403570f51809e4bbbcf6651fe803160`", 159 + "compile_exit": 0, 160 + "expected_compile_exit": 0, 161 + "run_exit": 1, 162 + "expected_run_exit": 1, 163 + "binary_sha256": "`19eff1c989e513a4016e969dd1be3a19629d95a073ad8b88481005de6eaf55fe`", 164 + "output": "reuse checks=074 004\n" 165 + }, 166 + { 167 + "case": "wrong-action-size", 168 + "source_sha256": "`29fce568d19da0831218fbbb390aef2a7256716b7a16ab13083c022f77decdb8`", 169 + "compile_exit": 7, 170 + "expected": "compile refusal", 171 + "diagnostic": "omc: line 170: error 7\n" 172 + }, 173 + { 174 + "case": "aliased-action", 175 + "source_sha256": "`9a5b8d69d13fb77aba0b1ca7910bf20b5df5b00bc7d600ccd6be4da494cb6d84`", 176 + "compile_exit": 19, 177 + "expected": "compile refusal", 178 + "diagnostic": "omc: line 169: error 19\n" 179 + }, 180 + { 181 + "case": "wrong-payload-size", 182 + "source_sha256": "`7577c1aba9c3d3b73e3cfd95ca7ffe3d28780f398c01cd97871c936a61654ff9`", 183 + "compile_exit": 7, 184 + "expected": "compile refusal", 185 + "diagnostic": "omc: line 88: error 7\n" 186 + } 187 + ] 188 +} native/control/evidence/659/reuse-compile.log new file mode 100644 native/control/evidence/659/reuse-deny-none-compile.log new file mode 100644 native/control/evidence/659/reuse-deny-none.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 072 native/control/evidence/659/reuse-final-compile.log new file mode 100644 native/control/evidence/659/reuse-final.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 000 native/control/evidence/659/reuse-identity-compile.log new file mode 100644 native/control/evidence/659/reuse-identity.diff new file mode 100644 @@ -0,0 +1,13 @@ 1 +--- a/native/control/src/reuse.om 2 ++++ b/native/control/src/reuse.om 3 +@@ -65,9 +65,7 @@ 4 + at = add 8 add mul g 4 j 5 + diff = or diff xor get s at get w at 6 + end 7 +-if ne diff 0 8 +-ret add 120 g 9 +-end 10 ++note MUTANT accepts identity mismatch 11 + end 12 + diff = ulong 0 13 + for i ulong 4 native/control/evidence/659/reuse-identity.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 031 native/control/evidence/659/reuse-payload-compile.log new file mode 100644 native/control/evidence/659/reuse-payload.diff new file mode 100644 @@ -0,0 +1,12 @@ 1 +--- a/native/control/src/reuse.om 2 ++++ b/native/control/src/reuse.om 3 +@@ -73,8 +73,6 @@ 4 + for i ulong 4 5 + diff = or diff xor get s add i 36 get h i 6 + end 7 +-if ne diff 0 8 +-ret 127 9 +-end 10 ++note MUTANT accepts corrupted payload 11 + ret 0 12 + end native/control/evidence/659/reuse-payload.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 004 native/control/evidence/659/reuse-red-compile.log new file mode 100644 native/control/evidence/659/reuse-red.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 072 native/control/evidence/659/reuse.log new file mode 100644 @@ -0,0 +1 @@ 1 +reuse checks=074 000 native/control/evidence/659/seed-rebuild.sha256 new file mode 100644 @@ -0,0 +1,7 @@ 1 +`aca00cf3677236809f0f223437398c6bb429e4c65f13d58762bcf96d13799474` /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/seed0 2 +`920e1756aec399c7c74f5cedd1676abb91b844ea75448e14aa50dcb0bbc7ba5d` /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/hex1 3 +`6988abe072fac3cdef2240d5ad13a3ecd8fb576fa09112d344b9e7c2315969c4` /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/asm2 4 +`d0da40e45f1fcc45d9a39c9c52c9d745b545e076970729e51c12d76ef519efab` /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/om4 5 +`01b1545b23e8ff40cb5691e20b5df910ea4acaefde3495f0d62d270465b98cd6` /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage1 6 +`01b1545b23e8ff40cb5691e20b5df910ea4acaefde3495f0d62d270465b98cd6` /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage2 7 +`01b1545b23e8ff40cb5691e20b5df910ea4acaefde3495f0d62d270465b98cd6` /workspace/scratch/`7aa7ae786696`/omega/build/control/seed/stage3 native/control/evidence/659/wrong-action-size-compile.log new file mode 100644 @@ -0,0 +1 @@ 1 +omc: line 170: error 7 native/control/evidence/659/wrong-payload-size-compile.log new file mode 100644 @@ -0,0 +1 @@ 1 +omc: line 88: error 7 native/control/evidence/replay-`20261116`/README.md new file mode 100644 @@ -0,0 +1,88 @@ 1 +# Replay onto omega-mv main, 2026-11-16 2 + 3 +Evidence class: **EXERCISED** on the Spark host CPU (aarch64 Linux, native, no 4 +QEMU). No GPU, timing, production dispatch or power-loss claim. 5 + 6 +- Base: omega-mv `main` at ``50feb135306176947a999362dd637d37c907f6fc``. 7 +- Source: the 2026-10-23 branch `feat/om-control-contracts` (`19e8168bb`, 8 + `6923da4c3`), cherry-picked onto that base, then the review fixes below. 9 +- Compiler: in-tree `seed/out/omc`, sha256 10 + ``34d611ca0415eab1728d3234911d90e74af17ba9ab0c581d559f48274d7ca6d3``. 11 +- Commands: those in [../659/README.md](../659/README.md) with `seed/out/omc` 12 + run directly and no QEMU wrapper. Live record: Linear DRA-312. 13 + 14 +## Review fixes in this revision 15 + 16 +Two fresh Claude Opus 5.5 reviews (medium effort) found, and this revision fixes: 17 + 18 +1. The new files were labelled AGPL-3.0-only; the tree is Apache-2.0 since 19 + `d863780eb`. All twelve `.om` files now carry Apache-2.0. 20 +2. Guards that survived mutation, now each covered by a test: 21 + zero generation and zero expiry in `actvalid`; the rights bit-subset check 22 + replaced by a numeric comparison (a smaller child with a bit the parent 23 + lacks); `actrecon` accepting a ready record (an unstarted or released attempt 24 + could be marked performed); reserved words 6 and 7 of the authority facts and 25 + word 7 of the receipt; a prefix that fills the whole context. The delegation 26 + test also covers a child whose expiry equals its parent's. 27 +3. The compiler pin, the 2026-10-23 expected counts and the workflow wording were 28 + stale; `../../README.md` and `../659/README.md` were updated. 29 + 30 +Kept as written: `kvmatch` runs `kvvalid` on the expected header as well as the 31 +saved one. Once the saved header is valid and words 1..6 must match, the scalar 32 +checks on the expected header can only change which refusal code is returned, 33 +never whether reuse is admitted. Both headers go through the same validator. 34 + 35 +## Results 36 + 37 +| Run | Compile exit | Run exit | Output | 38 +|---|---|---|---| 39 +| suite action | 0 | 0 | `action checks=241 000` | 40 +| suite delegate | 0 | 0 | `delegate checks=078 000` | 41 +| suite reuse | 0 | 0 | `reuse checks=075 000` | 42 +| stub action | 0 | 1 | `action checks=241 135` | 43 +| stub delegate | 0 | 1 | `delegate checks=078 063` | 44 +| stub reuse | 0 | 1 | `reuse checks=075 072` | 45 +| refusal wrong-action-size | 7 | not run | `omc: line 169: error 7` | 46 +| refusal aliased-action | 19 | not run | `omc: line 168: error 19` | 47 +| refusal wrong-payload-size | 7 | not run | `omc: line 87: error 7` | 48 +| mutant action-attempt | 0 | 1 | `action checks=241 003` | 49 +| mutant action-authority | 0 | 1 | `action checks=241 008` | 50 +| mutant action-binding | 0 | 1 | `action checks=241 072` | 51 +| mutant action-epoch | 0 | 1 | `action checks=241 003` | 52 +| mutant action-unknown | 0 | 1 | `action checks=241 013` | 53 +| mutant delegate-depth | 0 | 1 | `delegate checks=078 001` | 54 +| mutant delegate-rights | 0 | 1 | `delegate checks=078 031` | 55 +| mutant delegate-scope | 0 | 1 | `delegate checks=078 004` | 56 +| mutant reuse-identity | 0 | 1 | `reuse checks=075 031` | 57 +| mutant reuse-payload | 0 | 1 | `reuse checks=075 004` | 58 +| review mutant: drop generation-0 check (action.om) | 0 | 1 | `action checks=241 002` | 59 +| review mutant: drop expiry-0 check (action.om) | 0 | 1 | `action checks=241 002` | 60 +| review mutant: child expiry gt to ge (delegate.om) | 0 | 1 | `delegate checks=078 001` | 61 +| review mutant: rights subset to numeric gt (delegate.om) | 0 | 1 | `delegate checks=078 003` | 62 +| review mutant: actrecon state guard admits ready (action.om) | 0 | 1 | `action checks=241 009` | 63 +| review mutant: actauth drops reserved c6 and c7 (action.om) | 0 | 1 | `action checks=241 004` | 64 +| review mutant: actrecon drops reserved s7 (action.om) | 0 | 1 | `action checks=241 002` | 65 +| review mutant: kvvalid prefix gt to ge (reuse.om) | 0 | 1 | `reuse checks=075 001` | 66 + 67 +Review mutants were applied as exact one-line text substitutions on a scratch 68 +copy of the module: 69 + 70 +| Mutant | Original line | Replacement | 71 +|---|---|---| 72 +| drop generation-0 check | `if or eq get r 4 0 eq get r 5 0` | `if eq get r 5 0` | 73 +| drop expiry-0 check | `if or eq get r 6 0 ne get r 7 0` | `if ne get r 7 0` | 74 +| child expiry gt to ge | `if gt get c 4 get p 4` | `if ge get c 4 get p 4` | 75 +| rights subset to numeric gt | `if ne and get c 1 get p 1 get c 1` | `if gt get c 1 get p 1` | 76 +| actrecon state guard admits ready | `if not or eq get r 1 2 eq get r 1 3` | `if eq get r 1 4` | 77 +| actauth drops reserved c6 and c7 | `if or ne get c 3 0 or ne get c 6 0 ne get c 7 0` | `if ne get c 3 0` | 78 +| actrecon drops reserved s7 | `if or gt get s 1 2 or ne get s 6 0 ne get s 7 0` | `if or gt get s 1 2 ne get s 6 0` | 79 +| kvvalid prefix gt to ge | `if gt get p 2 get p 3` | `if ge get p 2 get p 3` | 80 + 81 +The landing receipt for the exact landed head (commands, exit codes, log 82 +sha256) is kept with the lane's records; this file is the human-readable copy. 83 + 84 +## Still open 85 + 86 +Trusted authority and receipt verification, durable store and dispatch 87 +integration, concurrency, crash and restart, and GPU or hardware profiles are 88 +NOT_RUN, as in [../659/README.md](../659/README.md). native/control/src/action.om new file mode 100644 @@ -0,0 +1,163 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note OM-CONTROL-659 action contract v1. See ../README.md for the trusted-caller boundary. 3 +note No I/O, authority minting or persistence. Caller serializes and durably commits transitions. 4 +note Record words 0..7: version,state,attempt,limit,generation,epoch,expiry,reserved. 5 +note Words 8..31: operation,request,scope,provider,policy,grant identities, four words each. 6 +note State 1 ready,2 in-flight,3 unknown,4 performed. No timeout implies not performed. 7 + 8 +fn actvalid r view ulong 32 to ulong 9 +if ne get r 0 1 10 +ret 11 11 +end 12 +if or lt get r 1 1 gt get r 1 4 13 +ret 12 14 +end 15 +if or eq get r 3 0 gt get r 3 1024 16 +ret 12 17 +end 18 +if gt get r 2 get r 3 19 +ret 12 20 +end 21 +if and ne get r 1 1 eq get r 2 0 22 +ret 12 23 +end 24 +if or eq get r 4 0 eq get r 5 0 25 +ret 12 26 +end 27 +if or eq get r 6 0 ne get r 7 0 28 +ret 12 29 +end 30 +for g ulong 6 31 +bits = ulong 0 32 +for j ulong 4 33 +bits = or bits get r add 8 add mul g 4 j 34 +end 35 +if eq bits 0 36 +ret 12 37 +end 38 +end 39 +ret 0 40 +end 41 + 42 +fn actbind r view ulong 32 c view ulong 32 to ulong 43 +for g ulong 6 44 +diff = ulong 0 45 +for j ulong 4 46 +at = add 8 add mul g 4 j 47 +diff = or diff xor get r at get c at 48 +end 49 +if ne diff 0 50 +ret add 40 g 51 +end 52 +end 53 +ret 0 54 +end 55 + 56 +fn actauth r view ulong 32 c view ulong 32 to ulong 57 +if ne get c 0 1 58 +ret 11 59 +end 60 +if or ne get c 3 0 or ne get c 6 0 ne get c 7 0 61 +ret 12 62 +end 63 +if ne get c 1 1 64 +ret 30 65 +end 66 +if ne get r 4 get c 4 67 +ret 31 68 +end 69 +if ne get r 5 get c 5 70 +ret 32 71 +end 72 +if ge get c 2 get r 6 73 +ret 33 74 +end 75 +ret actbind r c 76 +end 77 + 78 +fn actstart r edit ulong 32 c view ulong 32 to ulong 79 +err = actvalid r 80 +if ne err 0 81 +ret err 82 +end 83 +if eq get r 1 3 84 +ret 21 85 +end 86 +if eq get r 1 4 87 +ret 22 88 +end 89 +if ne get r 1 1 90 +ret 20 91 +end 92 +if ge get r 2 get r 3 93 +ret 23 94 +end 95 +err = actauth r c 96 +if ne err 0 97 +ret err 98 +end 99 +put r 2 add get r 2 1 100 +put r 1 2 101 +ret 0 102 +end 103 + 104 +fn actlost r edit ulong 32 to ulong 105 +err = actvalid r 106 +if ne err 0 107 +ret err 108 +end 109 +if eq get r 1 3 110 +ret 0 111 +end 112 +if ne get r 1 2 113 +ret 20 114 +end 115 +put r 1 3 116 +ret 0 117 +end 118 + 119 +note A trusted receipt maps outcome 0 unknown,1 definitely not performed,2 performed. 120 +note Not-found or timeout is outcome 0 unless the provider proves absence and quiescence. 121 +note Receipt words 2/3: exact attempt and verification=1. Words 6/7 must be zero. 122 +note Recording an observed outcome is permitted after expiry; another attempt is not. 123 +fn actrecon r edit ulong 32 s view ulong 32 to ulong 124 +err = actvalid r 125 +if ne err 0 126 +ret err 127 +end 128 +if not or eq get r 1 2 eq get r 1 3 129 +ret 20 130 +end 131 +if ne get s 0 1 132 +ret 11 133 +end 134 +if or gt get s 1 2 or ne get s 6 0 ne get s 7 0 135 +ret 12 136 +end 137 +if ne get s 3 1 138 +ret 36 139 +end 140 +if ne get s 2 get r 2 141 +ret 35 142 +end 143 +if ne get s 4 get r 4 144 +ret 31 145 +end 146 +if ne get s 5 get r 5 147 +ret 32 148 +end 149 +err = actbind r s 150 +if ne err 0 151 +ret err 152 +end 153 +if eq get s 1 0 154 +put r 1 3 155 +ret 21 156 +end 157 +if eq get s 1 1 158 +put r 1 1 159 +else 160 +put r 1 4 161 +end 162 +ret 0 163 +end native/control/src/delegate.om new file mode 100644 @@ -0,0 +1,84 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note Attenuation predicate only. A trusted authority must verify the parent and issue the child. 3 +note Words 0..7: version,rights,memory,fuel,expiry,remaining-depth,reserved,reserved. 4 +note Words 8..23: exact resource scope,authority root,subject,grant identities, four words each. 5 +note This profile supports the same resource only. No wildcard, path or network-subnet inference. 6 + 7 +fn capvalid p view ulong 24 to ulong 8 +if ne get p 0 1 9 +ret 61 10 +end 11 +if gt get p 5 64 12 +ret 62 13 +end 14 +if or eq get p 4 0 or ne get p 6 0 ne get p 7 0 15 +ret 62 16 +end 17 +for g ulong 4 18 +bits = ulong 0 19 +for j ulong 4 20 +bits = or bits get p add 8 add mul g 4 j 21 +end 22 +if eq bits 0 23 +ret 62 24 +end 25 +end 26 +ret 0 27 +end 28 + 29 +fn capeq p view ulong 24 c view ulong 24 off ulong to bool 30 +diff = ulong 0 31 +for j ulong 4 32 +at = add off j 33 +diff = or diff xor get p at get c at 34 +end 35 +ret eq diff 0 36 +end 37 + 38 +fn capchild p view ulong 24 c view ulong 24 now ulong to ulong 39 +err = capvalid p 40 +if ne err 0 41 +ret err 42 +end 43 +err = capvalid c 44 +if ne err 0 45 +ret err 46 +end 47 +if ge now get p 4 48 +ret 64 49 +end 50 +if ge now get c 4 51 +ret 65 52 +end 53 +if ne and get c 1 get p 1 get c 1 54 +ret 66 55 +end 56 +if gt get c 2 get p 2 57 +ret 67 58 +end 59 +if gt get c 3 get p 3 60 +ret 68 61 +end 62 +if gt get c 4 get p 4 63 +ret 69 64 +end 65 +if not capeq p c 8 66 +ret 70 67 +end 68 +if not capeq p c 12 69 +ret 71 70 +end 71 +if eq get p 5 0 72 +ret 72 73 +end 74 +if ge get c 5 get p 5 75 +ret 73 76 +end 77 +if capeq p c 16 78 +ret 74 79 +end 80 +if capeq p c 20 81 +ret 75 82 +end 83 +ret 0 84 +end native/control/src/reuse.om new file mode 100644 @@ -0,0 +1,80 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note KV reuse admission v1. This module hashes nothing and deserializes no payload. 3 +note The store must hash the exact payload with its existing SHA-256 owner before calling. 4 +note Header words 0..7: format,semantic-profile,prefix-tokens,context-size,layout,dtype,rope-profile,reserved. 5 +note Seven four-word identities: model,weights,engine,tokenizer,scope,prefix-tokens,numeric-target-config. 6 +note Saved words 36..39 are payload SHA-256. Expected words 36..39 must be zero. 7 + 8 +fn kvvalid p view ulong 40 to ulong 9 +if ne get p 0 1 10 +ret 100 11 +end 12 +if ne get p 7 0 13 +ret 102 14 +end 15 +for i ulong 6 16 +if eq get p add i 1 0 17 +ret 103 18 +end 19 +end 20 +if gt get p 2 get p 3 21 +ret 103 22 +end 23 +if gt get p 5 4 24 +ret 103 25 +end 26 +for g ulong 7 27 +bits = ulong 0 28 +for j ulong 4 29 +bits = or bits get p add 8 add mul g 4 j 30 +end 31 +if eq bits 0 32 +ret 104 33 +end 34 +end 35 +ret 0 36 +end 37 + 38 +fn kvmatch s view ulong 40 w view ulong 40 h view ulong 4 to ulong 39 +err = kvvalid s 40 +if ne err 0 41 +ret err 42 +end 43 +err = kvvalid w 44 +if ne err 0 45 +ret err 46 +end 47 +bits = ulong 0 48 +for i ulong 4 49 +if ne get w add i 36 0 50 +ret 128 51 +end 52 +bits = or bits get s add i 36 53 +end 54 +if eq bits 0 55 +ret 104 56 +end 57 +for i ulong 6 58 +if ne get s add i 1 get w add i 1 59 +ret add 111 i 60 +end 61 +end 62 +for g ulong 7 63 +diff = ulong 0 64 +for j ulong 4 65 +at = add 8 add mul g 4 j 66 +diff = or diff xor get s at get w at 67 +end 68 +if ne diff 0 69 +ret add 120 g 70 +end 71 +end 72 +diff = ulong 0 73 +for i ulong 4 74 +diff = or diff xor get s add i 36 get h i 75 +end 76 +if ne diff 0 77 +ret 127 78 +end 79 +ret 0 80 +end native/control/tests/action.om new file mode 100644 @@ -0,0 +1,290 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note Tests call the production transition functions. Provider/store I/O is not simulated as durable. 3 +global checks ulong 1 4 +global fails ulong 1 5 +global report uchar 64 6 +text title "action checks=" 7 + 8 +fn check got ulong want ulong to void 9 +put checks 0 add get checks 0 1 10 +if ne got want 11 +put fails 0 add get fails 0 1 12 +end 13 +end 14 + 15 +fn plan r edit ulong 32 to void 16 +for i ulong 32 17 +put r i 0 18 +end 19 +put r 0 1 20 +put r 1 1 21 +put r 3 3 22 +put r 4 7 23 +put r 5 9 24 +put r 6 100 25 +for i ulong 24 26 +put r add i 8 add i 100 27 +end 28 +end 29 + 30 +fn context c edit ulong 32 to void 31 +for i ulong 32 32 +put c i 0 33 +end 34 +put c 0 1 35 +put c 1 1 36 +put c 2 50 37 +put c 4 7 38 +put c 5 9 39 +for i ulong 24 40 +put c add i 8 add i 100 41 +end 42 +end 43 + 44 +fn receipt s edit ulong 32 n ulong outcome ulong to void 45 +context s 46 +put s 1 outcome 47 +put s 2 n 48 +put s 3 1 49 +end 50 + 51 +fn summary to int 52 +for i ulong len title 53 +put report i get title i 54 +end 55 +n = get checks 0 56 +at = len title 57 +put report at uchar add 48 div n 100 58 +put report add at 1 uchar add 48 rem div n 10 10 59 +put report add at 2 uchar add 48 rem n 10 60 +put report add at 3 32 61 +put report add at 4 uchar add 48 div get fails 0 100 62 +put report add at 5 uchar add 48 rem div get fails 0 10 10 63 +put report add at 6 uchar add 48 rem get fails 0 10 64 +put report add at 7 10 65 +w = write 1 report 0 add at 8 66 +if ne w long add at 8 67 +ret 2 68 +end 69 +if ne get fails 0 0 70 +ret 1 71 +end 72 +ret 0 73 +end 74 + 75 +fn main to int 76 +r = new ulong 32 0 77 +c = new ulong 32 0 78 +s = new ulong 32 0 79 +plan r 80 +context c 81 +check actstart r c 0 82 +check get r 1 2 83 +check get r 2 1 84 +check actstart r c 20 85 +check get r 2 1 86 +check actlost r 0 87 +check get r 1 3 88 +check actlost r 0 89 +check actstart r c 21 90 +receipt s 1 0 91 +check actrecon r s 21 92 +check get r 1 3 93 +check actstart r c 21 94 +receipt s 1 2 95 +check actrecon r s 0 96 +check get r 1 4 97 +check actstart r c 22 98 +check actrecon r s 20 99 + 100 +note An observed uncertain outcome also moves an in-flight record to unknown. 101 +plan r 102 +check actstart r c 0 103 +receipt s 1 0 104 +check actrecon r s 21 105 +check get r 1 3 106 +check actstart r c 21 107 + 108 +note Confirmed not performed enables a new attempt only after a fresh admission check. 109 +plan r 110 +check actstart r c 0 111 +check actlost r 0 112 +receipt s 1 1 113 +check actrecon r s 0 114 +check get r 1 1 115 +check get r 2 1 116 +put c 1 0 117 +check actstart r c 30 118 +check get r 2 1 119 +context c 120 +put c 4 8 121 +check actstart r c 31 122 +context c 123 +put c 5 10 124 +check actstart r c 32 125 +context c 126 +put c 2 100 127 +check actstart r c 33 128 +context c 129 +check actstart r c 0 130 +check get r 2 2 131 +receipt s 1 2 132 +check actrecon r s 35 133 +check get r 1 2 134 +receipt s 2 2 135 +check actrecon r s 0 136 +check actstart r c 22 137 + 138 +note Every word of every identity is checked before mutating the record. 139 +for i ulong 24 140 +plan r 141 +context c 142 +put c add i 8 add get c add i 8 1 143 +check actstart r c add 40 div i 4 144 +check get r 1 1 145 +check get r 2 0 146 +end 147 +note Receipt binding includes all identities and cannot resolve a different attempt. 148 +for i ulong 24 149 +plan r 150 +context c 151 +check actstart r c 0 152 +receipt s 1 1 153 +put s add i 8 add get s add i 8 1 154 +check actrecon r s add 40 div i 4 155 +check get r 1 2 156 +end 157 + 158 +plan r 159 +context c 160 +put r 2 3 161 +check actstart r c 23 162 +put r 2 `18446744073709551615` 163 +check actstart r c 12 164 +check get r 2 `18446744073709551615` 165 +plan r 166 +put r 3 0 167 +check actstart r c 12 168 +plan r 169 +put r 3 1025 170 +check actstart r c 12 171 +plan r 172 +put r 7 1 173 +check actstart r c 12 174 +plan r 175 +put r 0 2 176 +check actstart r c 11 177 +plan r 178 +put r 1 99 179 +check actstart r c 12 180 +plan r 181 +put r 1 2 182 +check actstart r c 12 183 +plan r 184 +context c 185 +put c 0 2 186 +check actstart r c 11 187 +context c 188 +put c 1 2 189 +check actstart r c 30 190 +context c 191 +put c 3 1 192 +check actstart r c 12 193 +context c 194 +for group ulong 6 195 +plan r 196 +for j ulong 4 197 +put r add 8 add mul group 4 j 0 198 +end 199 +check actstart r c 12 200 +end 201 + 202 +note A zero generation or epoch is the missing-value sentinel, even when the context matches it. 203 +plan r 204 +context c 205 +put r 4 0 206 +put c 4 0 207 +check actstart r c 12 208 +check get r 1 1 209 +plan r 210 +context c 211 +put r 5 0 212 +put c 5 0 213 +check actstart r c 12 214 +note Reconciliation refuses a record whose expiry is the zero sentinel, without mutating it. 215 +plan r 216 +context c 217 +check actstart r c 0 218 +put r 6 0 219 +receipt s 1 2 220 +check actrecon r s 12 221 +check get r 1 2 222 +put r 6 100 223 +note A ready record cannot be reconciled, so a receipt can never mark an unstarted or released attempt performed. 224 +plan r 225 +context c 226 +receipt s 0 2 227 +check actrecon r s 20 228 +check get r 1 1 229 +check get r 2 0 230 +check actstart r c 0 231 +check actlost r 0 232 +receipt s 1 1 233 +check actrecon r s 0 234 +check get r 1 1 235 +receipt s 1 2 236 +check actrecon r s 20 237 +check get r 1 1 238 +check get r 2 1 239 +note Reserved words of the authority facts and of the receipt must be zero. 240 +plan r 241 +context c 242 +put c 6 1 243 +check actstart r c 12 244 +context c 245 +put c 7 1 246 +check actstart r c 12 247 +check get r 1 1 248 +context c 249 +check actstart r c 0 250 +receipt s 1 1 251 +put s 7 1 252 +check actrecon r s 12 253 +check get r 1 2 254 + 255 +plan r 256 +check actstart r c 0 257 +receipt s 1 1 258 +put s 3 0 259 +check actrecon r s 36 260 +check get r 1 2 261 +receipt s 1 1 262 +put s 4 8 263 +check actrecon r s 31 264 +receipt s 1 1 265 +put s 5 10 266 +check actrecon r s 32 267 +receipt s 1 3 268 +check actrecon r s 12 269 +receipt s 1 1 270 +put s 6 1 271 +check actrecon r s 12 272 +check actlost r 0 273 +check actstart r c 21 274 +receipt s 1 1 275 +check actrecon r s 0 276 +check actlost r 20 277 +check get r 1 1 278 + 279 +note Limit is enforced across reconciliation cycles, without rotating operation identity. 280 +plan r 281 +for i ulong 3 282 +check actstart r c 0 283 +receipt s add i 1 1 284 +check actrecon r s 0 285 +end 286 +check actstart r c 23 287 +check get r 2 3 288 +check get r 8 100 289 +ret summary 290 +end native/control/tests/delegate.om new file mode 100644 @@ -0,0 +1,198 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +global checks ulong 1 3 +global fails ulong 1 4 +global report uchar 64 5 +text title "delegate checks=" 6 +fn check got ulong want ulong to void 7 +put checks 0 add get checks 0 1 8 +if ne got want 9 +put fails 0 add get fails 0 1 10 +end 11 +end 12 +fn parent p edit ulong 24 to void 13 +for i ulong 24 14 +put p i 0 15 +end 16 +put p 0 1 17 +put p 1 7 18 +put p 2 1024 19 +put p 3 200 20 +put p 4 100 21 +put p 5 4 22 +for i ulong 16 23 +put p add i 8 add i 100 24 +end 25 +end 26 +fn child c edit ulong 24 to void 27 +parent c 28 +put c 1 3 29 +put c 2 512 30 +put c 3 100 31 +put c 4 90 32 +put c 5 3 33 +put c 16 200 34 +put c 20 300 35 +end 36 +fn summary to int 37 +for i ulong len title 38 +put report i get title i 39 +end 40 +n = get checks 0 41 +at = len title 42 +put report at uchar add 48 div n 100 43 +put report add at 1 uchar add 48 rem div n 10 10 44 +put report add at 2 uchar add 48 rem n 10 45 +put report add at 3 32 46 +put report add at 4 uchar add 48 div get fails 0 100 47 +put report add at 5 uchar add 48 rem div get fails 0 10 10 48 +put report add at 6 uchar add 48 rem get fails 0 10 49 +put report add at 7 10 50 +w = write 1 report 0 add at 8 51 +if ne w long add at 8 52 +ret 2 53 +end 54 +if ne get fails 0 0 55 +ret 1 56 +end 57 +ret 0 58 +end 59 +fn main to int 60 +p = new ulong 24 0 61 +c = new ulong 24 0 62 +parent p 63 +child c 64 +check capchild p c 50 0 65 +put c 1 8 66 +check capchild p c 50 66 67 +child c 68 +put c 2 1025 69 +check capchild p c 50 67 70 +child c 71 +put c 3 201 72 +check capchild p c 50 68 73 +child c 74 +put c 4 101 75 +check capchild p c 50 69 76 +child c 77 +put c 5 4 78 +check capchild p c 50 73 79 +child c 80 +put p 5 0 81 +check capchild p c 50 72 82 +parent p 83 +child c 84 +put c 4 50 85 +check capchild p c 50 65 86 +child c 87 +put c 4 100 88 +check capchild p c 50 0 89 +note Rights are a bit subset: a numerically smaller child is still refused if it has a bit the parent lacks. 90 +child c 91 +put p 1 5 92 +put c 1 2 93 +check capchild p c 50 66 94 +put p 1 6 95 +put c 1 1 96 +check capchild p c 50 66 97 +put p 1 `9223372036854775808` 98 +check capchild p c 50 66 99 +parent p 100 +child c 101 +check capchild p c 100 64 102 +child c 103 +put c 1 0 104 +put c 2 0 105 +put c 3 0 106 +put c 5 0 107 +check capchild p c 50 0 108 +put p 1 0 109 +put p 2 0 110 +put p 3 0 111 +check capchild p c 50 0 112 +put c 1 1 113 +check capchild p c 50 66 114 + 115 +for i ulong 8 116 +parent p 117 +child c 118 +put c add i 8 add get c add i 8 1 119 +check capchild p c 50 add 70 div i 4 120 +end 121 +parent p 122 +child c 123 +for i ulong 4 124 +put c add i 16 get p add i 16 125 +end 126 +check capchild p c 50 74 127 +child c 128 +for i ulong 4 129 +put c add i 20 get p add i 20 130 +end 131 +check capchild p c 50 75 132 +for group ulong 4 133 +parent p 134 +child c 135 +for j ulong 4 136 +put p add 8 add mul group 4 j 0 137 +end 138 +check capchild p c 50 62 139 +parent p 140 +for j ulong 4 141 +put c add 8 add mul group 4 j 0 142 +end 143 +check capchild p c 50 62 144 +end 145 + 146 +parent p 147 +child c 148 +put p 0 2 149 +check capchild p c 50 61 150 +parent p 151 +put c 0 2 152 +check capchild p c 50 61 153 +child c 154 +put c 1 512 155 +check capchild p c 50 66 156 +child c 157 +put c 6 1 158 +check capchild p c 50 62 159 +child c 160 +put c 7 1 161 +check capchild p c 50 62 162 +child c 163 +put c 5 `18446744073709551615` 164 +check capchild p c 50 62 165 +child c 166 +put p 5 65 167 +check capchild p c 50 62 168 +parent p 169 +child c 170 +put p 5 1 171 +put c 5 0 172 +check capchild p c 50 0 173 +put p 2 `18446744073709551615` 174 +put c 2 `18446744073709551615` 175 +check capchild p c 50 0 176 +put p 2 `18446744073709551614` 177 +check capchild p c 50 67 178 +parent p 179 +child c 180 +put p 1 `9223372036854775808` 181 +put c 1 `9223372036854775808` 182 +check capchild p c 50 0 183 +put c 1 `9223372036854775809` 184 +check capchild p c 50 66 185 + 186 +note Exhaust all subsets of the small rights profile, not only one happy case. 187 +for rights ulong 32 188 +parent p 189 +child c 190 +put c 1 rights 191 +want = ulong 66 192 +if lt rights 8 193 +want = 0 194 +end 195 +check capchild p c 50 want 196 +end 197 +ret summary 198 +end native/control/tests/negative/action-stub.om new file mode 100644 @@ -0,0 +1,11 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note Negative control only: admits everything and performs no transitions. 3 +fn actstart r edit ulong 32 c view ulong 32 to ulong 4 +ret 0 5 +end 6 +fn actlost r edit ulong 32 to ulong 7 +ret 0 8 +end 9 +fn actrecon r edit ulong 32 s view ulong 32 to ulong 10 +ret 0 11 +end native/control/tests/negative/aliased-action.om new file mode 100644 @@ -0,0 +1,6 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note Must be refused: mutable record aliases the purported current authority facts. 3 +fn main to int 4 +r = new ulong 32 0 5 +ret int actstart r r 6 +end native/control/tests/negative/delegate-stub.om new file mode 100644 @@ -0,0 +1,5 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note Negative control only: accepts escalated child authority. 3 +fn capchild p view ulong 24 c view ulong 24 now ulong to ulong 4 +ret 0 5 +end native/control/tests/negative/reuse-stub.om new file mode 100644 @@ -0,0 +1,5 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note Negative control only: accepts stale and corrupted cache bindings. 3 +fn kvmatch s view ulong 40 w view ulong 40 h view ulong 4 to ulong 4 +ret 0 5 +end native/control/tests/negative/wrong-action-size.om new file mode 100644 @@ -0,0 +1,7 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note Must be refused when concatenated with src/action.om. 3 +fn main to int 4 +r = new ulong 31 0 5 +c = new ulong 32 0 6 +ret int actstart r c 7 +end native/control/tests/negative/wrong-payload-size.om new file mode 100644 @@ -0,0 +1,8 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +note Must be refused when concatenated with src/reuse.om. 3 +fn main to int 4 +s = new ulong 40 0 5 +w = new ulong 40 0 6 +h = new ulong 3 0 7 +ret int kvmatch s w h 8 +end native/control/tests/reuse.om new file mode 100644 @@ -0,0 +1,154 @@ 1 +note SPDX-License-Identifier: Apache-2.0 2 +global checks ulong 1 3 +global fails ulong 1 4 +global report uchar 64 5 +text title "reuse checks=" 6 +fn check got ulong want ulong to void 7 +put checks 0 add get checks 0 1 8 +if ne got want 9 +put fails 0 add get fails 0 1 10 +end 11 +end 12 +fn profile p edit ulong 40 to void 13 +for i ulong 40 14 +put p i 0 15 +end 16 +put p 0 1 17 +put p 1 1 18 +put p 2 32 19 +put p 3 4096 20 +put p 4 1 21 +put p 5 2 22 +put p 6 1 23 +for i ulong 28 24 +put p add i 8 add i 100 25 +end 26 +end 27 +fn saved s edit ulong 40 to void 28 +profile s 29 +for i ulong 4 30 +put s add i 36 add i 200 31 +end 32 +end 33 +fn payload h edit ulong 4 to void 34 +for i ulong 4 35 +put h i add i 200 36 +end 37 +end 38 +fn summary to int 39 +for i ulong len title 40 +put report i get title i 41 +end 42 +n = get checks 0 43 +at = len title 44 +put report at uchar add 48 div n 100 45 +put report add at 1 uchar add 48 rem div n 10 10 46 +put report add at 2 uchar add 48 rem n 10 47 +put report add at 3 32 48 +put report add at 4 uchar add 48 div get fails 0 100 49 +put report add at 5 uchar add 48 rem div get fails 0 10 10 50 +put report add at 6 uchar add 48 rem get fails 0 10 51 +put report add at 7 10 52 +w = write 1 report 0 add at 8 53 +if ne w long add at 8 54 +ret 2 55 +end 56 +if ne get fails 0 0 57 +ret 1 58 +end 59 +ret 0 60 +end 61 +fn main to int 62 +s = new ulong 40 0 63 +w = new ulong 40 0 64 +h = new ulong 4 0 65 +saved s 66 +profile w 67 +payload h 68 +check kvmatch s w h 0 69 +for i ulong 6 70 +saved s 71 +put s add i 1 add get s add i 1 1 72 +check kvmatch s w h add 111 i 73 +end 74 +for i ulong 28 75 +saved s 76 +put s add i 8 add get s add i 8 1 77 +check kvmatch s w h add 120 div i 4 78 +end 79 +for i ulong 4 80 +saved s 81 +payload h 82 +put h i add get h i 1 83 +check kvmatch s w h 127 84 +end 85 +payload h 86 +for g ulong 7 87 +saved s 88 +profile w 89 +for j ulong 4 90 +put s add 8 add mul g 4 j 0 91 +end 92 +check kvmatch s w h 104 93 +saved s 94 +for j ulong 4 95 +put w add 8 add mul g 4 j 0 96 +end 97 +check kvmatch s w h 104 98 +end 99 +profile w 100 +saved s 101 +put s 0 2 102 +check kvmatch s w h 100 103 +saved s 104 +put w 0 2 105 +check kvmatch s w h 100 106 +profile w 107 +put s 7 1 108 +check kvmatch s w h 102 109 +saved s 110 +put w 7 1 111 +check kvmatch s w h 102 112 +profile w 113 +for i ulong 6 114 +saved s 115 +put s add i 1 0 116 +check kvmatch s w h 103 117 +end 118 +saved s 119 +put s 2 4097 120 +check kvmatch s w h 103 121 +saved s 122 +put s 5 5 123 +check kvmatch s w h 103 124 +saved s 125 +for i ulong 4 126 +put s add i 36 0 127 +end 128 +check kvmatch s w h 104 129 +saved s 130 +for i ulong 4 131 +profile w 132 +put w add i 36 1 133 +check kvmatch s w h 128 134 +end 135 +profile w 136 +saved s 137 +check kvmatch s w h 0 138 +note Whole-token prefix identity is required even if lengths match. 139 +put w 28 999 140 +check kvmatch s w h 125 141 +profile w 142 +put w 24 999 143 +check kvmatch s w h 124 144 +profile w 145 +put w 16 999 146 +check kvmatch s w h 122 147 +note A prefix that fills the whole context is admitted. 148 +profile w 149 +saved s 150 +put s 2 4096 151 +put w 2 4096 152 +check kvmatch s w h 0 153 +ret summary 154 +end seed/host/MAPPING.md @@ -392,8 +392,8 @@ exit status and diagnostics; the other 8 are the x86 compiles of the ill-typed 392 392 `seed/omc/tests/float/neg_fma_*` refusals, error 9 before and now the AArch64 393 393 error 7 or 11. Gate: `seed/omc/gate8.sh` (`refuse_x86`). 394 394 395 -The prlimit 235 host word (branch `seed/prlimit-host-word`, PROPOSED pending 396 -review; first born as ``3c2817a5`` on rad main ``da8b7e66``, then merged with rad 395 +The prlimit 235 host word (branch `seed/prlimit-host-word`, now on main as 396 +keyword 235 of `seed/omc/omc.om`; first born as ``3c2817a5`` on rad main ``da8b7e66``, then merged with rad 397 397 main ``408c76b7``) births compiler 398 398 ``6d1b1cf5a44803389a831b67f750ea4cd1c9f53edfde9d6d9241d7352887f1f8`` 399 399 from source seed/node/README.md @@ -27,6 +27,8 @@ view and Spark qualification remain implementation work (DRA-291, DRA-292). The 27 27 [Linear project](https://linear.app/drake-stapleton/project/omega-node-shared-memory-hive-runtime-`37058a1eac4b`) 28 28 tracks that integration. This is a component contract, not a whole-system master plan. 29 29 30 +For the disposable Unix socket control probe and its native stalled-client latency check, see [probe/README.md](probe/README.md). 31 + 30 32 ## Build and check 31 33 32 34 Use a Linux AArch64 host and the existing approved seeded compiler. Record its @@ -1374,7 +1376,7 @@ L="seed/node/transport.om seed/node/pool.om seed/node/super.om seed/node/sched.o 1374 1376 { printf 'om2\n'; cat seed/json/json.om seed/node/tests/drv.om seed/node/tests/tool-replay.om; } | seed/out/omc > build/node/tool-replay 1375 1377 { printf 'om2\n'; cat seed/json/json.om seed/node/tests/drv.om seed/node/tests/drv-test.om; } | seed/out/omc > build/node/drv-test 1376 1378 chmod +x build/node/infer build/node/tool build/node/code-main build/node/code-test build/node/tool-replay build/node/drv-test 1377 -build/node/code-test unit build/node/cu # "code checks=59 fail=0", exit 0 1379 +build/node/code-test unit build/node/cu # "code checks=60 fail=0", exit 0 1378 1380 build/node/drv-test /tmp/dvt # "DRV-TEST pass=40 fail=0 not_run=0", exit 0 1379 1381 build/node/tool-replay build/node/tool OMC40 ROUND40 build/node/replay # "TOOL-REPLAY runs=108 pass=108 fail=0 actions=417", exit 0 1380 1382 ``` @@ -1457,7 +1459,7 @@ env -u OMC ~/work/omega-node-run.sh build/node/qual /tmp/node-qualification 1457 1459 1458 1460 Do not execute a compiler's output when that compilation failed. `HOME` locates 1459 1461 `work/omega-node-e5b3/seed/out/omc`, `handoffs/tool-omega-`20261104`/round40`, and 1460 -`.elan/toolchains/leanprover--lean4---v4.35.0/bin/lean`. The round40 compiler is 1462 +`.elan/toolchains/leanprover--lean4---v4.35.0/bin/lean`. The 108-run tool replay requires the original Round40 selection. The view and release scenarios use the four recorded control cases from this checkout. The round40 compiler is 1461 1463 an input to tool-adapter checks, never the compiler of the qualification driver 1462 1464 or the Node programs. `build/node/release` and `build/node/tool-replay` must 1463 1465 already exist. Optional seeded `build/node/view-accept` and @@ -1648,7 +1650,7 @@ only, so a `\r` makes a line fall outside the grammar where Python's 1648 1650 1649 1651 ### Acceptance and controls 1650 1652 1651 -`code-test unit` (59 checks, no child process) feeds crafted model and tool 1653 +`code-test unit` (60 checks, no child process) feeds crafted model and tool 1652 1654 records to the creator: the round40 prompts byte for byte; every action in 1653 1655 every state; wrong path; old text absent, twice, many times; an edit outside 1654 1656 the grammar; `Tests passed.` unverified or after an edit; `File not found.` @@ -1678,7 +1680,7 @@ cancelled through `auth_cancel` after MS milliseconds. 1678 1680 | cancelled read as UNKNOWN | 197 | 1679 1681 | missing file read as read | 178 | 1680 1682 | prompt limit raised to 4000 | 203 | 1681 -| refused tool job left waiting (DRA-291) | 206 | 1683 +| refused tool job left waiting (DRA-291) | 208 (check 58) | 1682 1684 1683 1685 ### Live coding workflow under the durable scheduler (DRA-399) 1684 1686 @@ -2023,8 +2025,7 @@ restart an objective with a RESULT is reported again (`CWO` with the same 2023 2025 result and turns) and never resumed: a failure is final, as in DRA-290, 2024 2026 and an objective that ended UNKNOWN (21) cannot issue its effect again. The 2025 2027 journal refuses a second RESULT for an objective, result 0 and an index 2026 -past 63 (25) before writing. A result the journal refused is still printed; 2027 -that objective resumes after a restart. 2028 +past 63 (25) before writing. If the journal refuses the result, the creator emits no completion for that objective, stops admission and exits 58 after cleanup. Recovery uses the committed journal. 2028 2029 2029 2030 An inference worker that dies while it holds a job: inference is class 2 2030 2031 (no external effect), so `au_lost` records it not performed (DONE how 6), @@ -2050,18 +2051,63 @@ second authority, journal compatibility in both directions, and address-space 2050 2051 caps. Each prints MEASURED latency and seconds; the memory scenario prints 2051 2052 MEASURED `memory-peak-kB` (VmHWM and VmPeak of `code-main`, `infer` and 2052 2053 `tool`, sampled from `/proc` every 5 ms) and fails `memory-peak-measured` 2053 -when no `code-main` sample was read. `memory-caps-fail-closed-then-pass` is 2054 -NOT_RUN until a reviewed `prlimit` host word exists (omega-mv 2055 -`seed/prlimit-host-word`); no host tool stands in for it. The driver prints 2054 +when no `code-main` sample was read. `memory-caps-fail-closed-then-pass` 2055 +runs that same one-objective job again under the `prlimit` host word 2056 +(keyword 235, RLIMIT_AS): half the measured `code-main` VmPeak, then that 2057 +peak, then double, up to 32 times the peak. A smaller cap fails closed only 2058 +with an explicit result: one `CWO 0 FAIL` line matching the journaled RESULT and exit 1, or a `code-main` 2059 +refusal exit 50 to 57 with its cause line for that exit on stderr 2060 +(`code-main: WHAT, exit R` with R equal to the exit). A pass is 2061 +one `CWO 0 PASS` line, exit 0 and a consistent journal. The result code and turn count on either line must exactly match the sole RESULT for objective zero. A missing RESULT, a conflicting exit or trailing output on the result line fails the trial. A signal 2062 +death that leaves no journal and nothing on stderr is treated as the kernel 2063 +refusing the exec under the cap (it cannot be told apart from a death after 2064 +the exec but before the node wrote anything) and is reported (`c=2`) and not counted 2065 +either way. A signal death after the node started (a journal or stderr 2066 +exists) is a crash and fails the check. A harness 2067 +failure (exit 97, 126 or 127, an output that cannot be read, a wait error), a 2068 +journal that is torn, unreadable or has more than one start, or any other 2069 +end fails the check. The check passes when one cap passes after at least one 2070 +explicit smaller-cap failure, and only after the uncapped run passed; each 2071 +trial shows the cap, rc, CWO lines (`n`), class (`c`: 0 explicit fail, 1 2072 +pass, 2 refused at exec, 3 bad), journal state (`j`: 0 none, 1 consistent, 2 2073 +other) and starts (`s`). Each trial waits at most three times the uncapped 2074 +run, measured from before the node starts; a trial past that deadline 2075 +(`rc=-110`) fails the check. On this host the cap that first passes is not 2076 +the node's own memory need: `tool` runs each test program through 2077 +`execpure` (`seed/omc/omc.om`), which sets RLIMIT_AS to its own fixed 2078 +ceiling. Under an inherited cap below that ceiling the raise is refused. At 2079 +the lowest caps the compile step itself cannot run, and `code-main` ends 2080 +`CWO 0 FAIL 17` (tool failed). At the caps above those the test program's 2081 +exec fails (exit 121), the tool reports that exit as the program's result, 2082 +the next prompt differs from the recorded one, and in fake mode the 2083 +recording has no answer for it, so `code-main` ends `CWO 0 FAIL 16` 2084 +(inference failed): a recording miss, not the node noticing a memory 2085 +problem. So the explicit fails come from caps below execpure's ceiling, the 2086 +passing cap is the first step at or above it, and when 32 times the 2087 +`code-main` peak stays below it the check fails whatever the node does. The 2088 +check shows that under a cap at which its tools cannot run the run ends in an 2089 +explicit FAIL, and that the node completes under a cap that leaves its tools 2090 +their ceiling. It does not read the job file, so it does not show that a 2091 +failing run leaves that file unchanged, and it does not measure how much 2092 +memory the node needs. 2093 +The one-job stand-in does not exercise the more-than-one-start guard or a 2094 +trial that ends with an exit other than 1 after its single `CWO` line: those 2095 +are guards in the check, not cases observed on this host. 2096 +The host run uses a one-job stand-in for the round40 recording, which is not 2097 +at the path qual reads: 2098 +`seed/node/tests/ra40/final-selected.json`, a small 2099 +loop repair (id 76666) whose answers were constructed from the node's own 2100 +prompts on this build. It serves only the memory scenario; with it as 2101 +ROUND40 every other scenario fails fixture preparation. The driver prints 2056 2102 `PASS|FAIL|NOT_RUN NAME DETAIL` per check and `RELSUM pass=P fail=F 2057 2103 not_run=N mode=MODE`; a node output it needs that is missing, unreadable or 2058 2104 over capacity fails the next check, naming it. 2059 2105 2060 -A resumed objective reads the file it edited before the restart, a prompt no 2061 -recording holds: in fake mode the three checks that need it 2062 -(`restart-resumed-completes`, `journal-forward-completes`, 2063 -`journal-rollback-completes`) are NOT_RUN, naming the prompt; any other end 2064 -fails them. Live mode answers it and requires PASS. The driver exits 0 only 2106 +A resumed objective reads the file it edited before the restart. The four-case 2107 +fixture includes two recorded Spark model turns for that continuation in 2108 +`restart.map`. The restart, journal-forward and journal-rollback completion 2109 +checks exercise them. With a fixture lacking those turns, an unrecorded prompt 2110 +is reported as NOT_RUN. Live mode requires the model to complete the task. The driver exits 0 only 2065 2111 when every check passed, 3 when none failed but some were NOT_RUN, 1 when 2066 2112 one failed. 2067 2113 @@ -2084,6 +2130,8 @@ objective is refused, every later replay keeps it so the objective is never 2084 2130 resumed, and only a class-2 lost action is recorded not performed. The proof 2085 2131 covers the model; its correspondence to the `.om` code is by reading. 2086 2132 2133 +The [four recorded operator-control cases](tests/recorded-control/README.md) reproduce the original prepared objectives, expected turns and fake-server map for host checks. 2134 + 2087 2135 ### Release gate 2088 2136 2089 2137 `tests/release-gate.om` checks in Omega that `release stop` makes a durable seed/node/code-test.om @@ -38,6 +38,7 @@ text ctsum "code checks=" 38 38 text ctsum2 " fail=" 39 39 text ctomni "OMNI1 " 40 40 text ctomnt "OMNT1 " 41 +global ctcases ulong 1 41 42 global ctn ulong 3 42 43 global ctc ulong 1 43 44 @@ -64,7 +65,32 @@ end 64 65 65 66 note Objective 0 in state st (verified vf), its source sel (0 none, 1 the 66 67 note broken source, 2 the fixed one), no job, running. 68 +note Independent scenarios each need a fresh durable objective after the previous one ended. 69 +fn ct_newjournal to void 70 +b = new uchar 4096 0 71 +tag = get ctcases 0 72 +put ctcases 0 add tag 1 73 +n = cw_dec b 0 ulong getpid 74 +put b n 45 75 +n = cw_dec b add n 1 tag 76 +r = makedir b 0 n 448 77 +if ne r 0 78 +exit 59 79 +end 80 +for i ulong n bound 100 81 +put cwcf add 5120 i get b i 82 +end 83 +put cwcl 5 n 84 +if ne cw_jopen 1 1 0 85 +exit 59 86 +end 87 +end 88 + 67 89 fn ct_set st ulong vf ulong sel ulong to void 90 +if ne jn_res 0 0 91 +jn_close 92 +ct_newjournal 93 +end 68 94 cw_s 0 6 st 69 95 cw_s 0 8 vf 70 96 cw_s 0 9 0 @@ -453,10 +479,13 @@ for k ulong 7 453 479 put cwcl k 1 454 480 put cwcf mul k 1024 47 455 481 end 456 -for j ulong ulong n 457 -put cwcf add 5120 j get d j 482 +r = makedir d 0 ulong n 448 483 +if and lt r 0 ne r neg long 17 484 +ret 59 485 +end 486 +if ne chdir d 0 ulong n 0 487 +ret 59 458 488 end 459 -put cwcl 5 ulong n 460 489 put cwno 0 1 461 490 if not cw_parse 0 ctobj 462 491 ret 3 @@ -475,10 +504,7 @@ end 475 504 if ne auth_new c 0 476 505 ret 53 477 506 end 478 -e = cw_jopen 1 1 479 -if ne e 0 480 -ret int add 30 e 481 -end 507 +ct_newjournal 482 508 ct_prompt 483 509 ct_model 484 510 ct_bad @@ -487,6 +513,11 @@ ct_fates 487 513 ct_limits c 488 514 ct_hook c 489 515 ct_full c 516 +ct_set 0 0 0 517 +put jbad 0 1 518 +cw_end 0 1 519 +ct_ok and ne get cwresultbad 0 0 and eq cw_g 0 12 0 eq jn_res 0 0 520 +put jbad 0 0 490 521 jn_close 491 522 ret ct_end 492 523 end seed/node/code.om @@ -108,6 +108,8 @@ text cwpass "PASS" 108 108 text cwfail "FAIL" 109 109 text cwsum "CWSUM pass=" 110 110 text cwsumf " fail=" 111 +text cwfresult "objective RESULT could not be committed" 112 +global cwresultbad ulong 1 111 113 global cwcf uchar 8192 112 114 global cwcl ulong 8 113 115 global cwno ulong 1 @@ -415,10 +417,16 @@ cw_out cwnl 1 415 417 end 416 418 417 419 note Objective i finished with result r (1 PASS, else the failure): RESULT 418 -note is made durable first (a result the journal refuses is still reported 419 -note for this run; a restart then resumes that objective), then published. 420 +note is made durable first. A refusal latches a creator failure and emits no result. 420 421 fn cw_end i ulong r ulong to void 422 +if ne get cwresultbad 0 0 423 +ret 424 +end 421 425 x = jn_result i r cw_g i 7 426 +if ne x 0 427 +put cwresultbad 0 x 428 +ret 429 +end 422 430 cw_pub i r 423 431 end 424 432 @@ -455,6 +463,9 @@ note ends the objective with 23: it cannot be a full queue (a tool job is 455 463 note issued only after its objective's previous job left the queue, so it 456 464 note takes that job's place), and nothing is left waiting unseen. 457 465 fn cw_issue c long i ulong kind ulong pk view uchar 4096 pn ulong to ulong 466 +if ne get cwresultbad 0 0 467 +ret 0 468 +end 458 469 s = cw_g i 11 459 470 if ge s 99 460 471 cw_end i 20 @@ -1063,9 +1074,18 @@ fn cw_drive c long dl ulong to int 1063 1074 for t ulong `1000000000` 1064 1075 r = sched_step c `5000000` 1065 1076 cw_coll c 1077 +if ne get cwresultbad 0 0 1078 +ret 58 1079 +end 1066 1080 k = auth_step c 1067 1081 cw_cmd c 1082 +if ne get cwresultbad 0 0 1083 +ret 58 1084 +end 1068 1085 cw_plan c 1086 +if ne get cwresultbad 0 0 1087 +ret 58 1088 +end 1069 1089 cw_vsnap c 1070 1090 if eq cw_left 0 1071 1091 ret 0 @@ -1620,6 +1640,11 @@ cw_pub i jn_res i 1620 1640 end 1621 1641 end 1622 1642 cw_replay c 1643 +if ne get cwresultbad 0 0 1644 +sup_closeall 1645 +jn_close 1646 +ret cw_fail 58 cwfresult 1647 +end 1623 1648 cw_dirs 1624 1649 for w ulong 2 1625 1650 p = auth_spawn c w @@ -1638,6 +1663,9 @@ vw_stop 1638 1663 x = sched_stop c `2000000000` 1639 1664 sup_closeall 1640 1665 jn_close 1666 +if eq r 58 1667 +ret cw_fail 58 cwfresult 1668 +end 1641 1669 ret cw_sum r 1642 1670 end 1643 1671 seed/node/probe/README.md new file mode 100644 @@ -0,0 +1,21 @@ 1 +# Disposable local control probe 2 + 3 +Run from an AArch64 Linux checkout. The probe forks exactly two synthetic Omega workers. It has no journal, provider credentials, network listener or connection to the running hive. 4 + 5 +```sh 6 +mkdir -p build/node 7 +cat seed/node/transport.om seed/node/pool.om seed/node/super.om seed/node/probe/control.om | 8 + seed/out/omc > build/node/n0 && chmod +x build/node/n0 9 +seed/out/omc < seed/node/probe/check.om > build/node/n0-check && chmod +x build/node/n0-check 10 +build/node/n0 & 11 +server=$! 12 +build/node/n0-check "$server" && wait "$server" 13 +``` 14 + 15 +The server listens for 60 seconds on a Linux abstract Unix stream socket. Its address is a zero byte, ASCII `omega-node-n0.`, then the server PID as four little-endian bytes. Clients must have the server's UID. Authenticate the server with SO_PEERCRED before sending commands. 16 + 17 +Use one connection per command. Write three bytes (length 2, version 1, operation), then half-close the write side. Operations 1 through 6 are IDENTITY, SNAPSHOT, PAUSE, RESUME, SHUTDOWN and STOP_SLOW. A fourth byte invalidates the frame. An incomplete request expires after one second. The event loop admits one client per pass, holds eight connections at most and buffers four request bytes and twelve reply bytes per slot. 18 + 19 +The twelve reply bytes are length 11, version 1, echoed operation, result (0 applied, 1 refused), paused, responsive-worker state, slow-worker state, whether a work acknowledgement has been observed, then the server PID in little-endian order. Worker states are 0 running, 1 stop requested, 2 reaped after an acknowledged stop request with clean exit, and 3 unknown or unexpectedly lost. PAUSE stops new work hints. A hint already in flight can still complete. STOP_SLOW requests termination of the blocked worker. SNAPSHOT reports a confirmed stop only after the kernel returns the owned child's wait status. On SHUTDOWN the reply acknowledges the request. Server exit zero confirms both children were reaped. Abrupt server death wakes workers through the supervisor's creator-life pipe. 20 + 21 +The latency acceptance threshold is 200 ms for each of 32 sequential SNAPSHOT commands while six other clients hold partial frames and the slow worker waits. Record maximum latency, load, machine, binary digest and all responses in the test receipt. This is a local liveness threshold, independent of model throughput. seed/node/probe/check.om new file mode 100644 @@ -0,0 +1,174 @@ 1 +note Native independent wire client. Argument is the disposable server PID. 2 +text label "omega-node-n0." 3 +text ok "PASS N0 control; maximum snapshot latency in nanoseconds follows\n" 4 +text nl "\n" 5 +global serverid ulong 1 6 +global addr uchar 110 7 +global wire uchar 4 8 +global reply uchar 12 9 +global peer uchar 12 10 +global held int 6 11 + 12 +fn write_number v ulong to void 13 +d = new uchar 20 0 14 +x = v 15 +k = ulong 20 16 +for i ulong 20 17 +k = sub k 1 18 +put d k uchar add rem x 10 48 19 +x = div x 10 20 +if eq x 0 21 +break 22 +end 23 +end 24 +r = write 1 d k sub 20 k 25 +end 26 + 27 +note Write "/proc//stat" into p; returns its length. 28 +fn ck test bool code int to void 29 +if not test 30 +exit code 31 +end 32 +end 33 + 34 +fn init_addr to void 35 +a = new uchar 12 0 36 +n = argread 1 a 0 len a 37 +ck and gt n 0 le n 8 2 38 +v = ulong 0 39 +for i ulong ulong n bound 8 40 +b = get a i 41 +ck and ge b 48 le b 57 2 42 +v = add mul v 10 ulong sub b 48 43 +end 44 +ck gt v 0 2 45 +put serverid 0 v 46 +put addr 0 1 47 +for i ulong len label 48 +put addr add i 3 get label i 49 +end 50 +for i ulong 4 51 +b = uchar and shr v mul i 8 255 52 +put addr add add len label 3 i b 53 +end 54 +end 55 + 56 +fn dial to int 57 +for i ulong 40 58 +s = socknew 1 524289 0 59 +ck ge s 0 3 60 +r = connect int s addr 0 add len label 7 61 +if eq r 0 62 +ck eq peercred int s peer 0 12 0 4 63 +id = ulong 0 64 +for j ulong 4 65 +id = or id shl ulong get peer j mul j 8 66 +end 67 +ck eq id get serverid 0 4 68 +ret int s 69 +end 70 +r = fclose int s 71 +r = sleepns `5000000` 72 +end 73 +exit 5 74 +end 75 + 76 +fn exchange op uchar ver uchar count ulong size uchar to void 77 +s = dial 78 +put wire 0 size 79 +put wire 1 ver 80 +put wire 2 op 81 +put wire 3 123 82 +for i ulong count bound 4 83 +ck eq sendmsg s wire i 1 16384 1 6 84 +end 85 +ck eq shutdown s 1 0 6 86 +off = ulong 0 87 +for k ulong 12 88 +ck gt waitio s 1 `1000000000` 0 7 89 +r = recv s reply off sub 12 off 0 90 +ck gt r 0 7 91 +off = add off ulong r 92 +if eq off 12 93 +break 94 +end 95 +end 96 +ck eq off 12 7 97 +ck eq get reply 0 11 8 98 +ck eq get reply 1 1 8 99 +if ge count 3 100 +ck eq get reply 2 op 8 101 +end 102 +id = ulong 0 103 +for j ulong 4 104 +id = or id shl ulong get reply add j 8 mul j 8 105 +end 106 +ck eq id get serverid 0 8 107 +r = fclose s 108 +end 109 + 110 +fn cmd op uchar to void 111 +exchange op 1 3 2 112 +ck eq get reply 3 0 9 113 +end 114 + 115 +fn bad op uchar ver uchar count ulong size uchar to void 116 +exchange op ver count size 117 +ck eq get reply 3 1 10 118 +end 119 + 120 +fn latency to long 121 +for k ulong 6 122 +s = dial 123 +put held k s 124 +ck eq sendmsg s wire 0 1 16384 1 11 125 +end 126 +mx = long 0 127 +for j ulong 32 128 +t = monons 129 +cmd 2 130 +dt = sub monons t 131 +ck lt dt `200000000` 12 132 +if gt dt mx 133 +mx = dt 134 +end 135 +ck eq get reply 6 0 12 136 +end 137 +for k ulong 6 138 +r = fclose get held k 139 +end 140 +ret mx 141 +end 142 + 143 +fn main to int 144 +init_addr 145 +cmd 1 146 +bad 5 2 3 2 147 +bad 3 1 2 2 148 +bad 3 1 4 2 149 +bad 3 1 3 255 150 +bad 77 1 3 2 151 +cmd 2 152 +ck eq get reply 4 0 13 153 +mx = latency 154 +ck eq get reply 7 1 14 155 +cmd 3 156 +ck eq get reply 4 1 15 157 +cmd 4 158 +ck eq get reply 4 0 16 159 +cmd 6 160 +ck eq get reply 6 1 17 161 +for i ulong 100 162 +cmd 2 163 +if eq get reply 6 2 164 +break 165 +end 166 +r = sleepns `2000000` 167 +end 168 +ck eq get reply 6 2 18 169 +cmd 5 170 +r = write 1 ok 0 len ok 171 +write_number ulong mx 172 +r = write 1 nl 0 len nl 173 +ret 0 174 +end seed/node/probe/control.om new file mode 100644 @@ -0,0 +1,292 @@ 1 +note Disposable local control probe. Compose after transport, pool and super. 2 +note Eight clients, four input bytes (one overflow sentinel), twelve reply bytes. 3 +text prefixname "omega-node-n0." 4 +global sa uchar 110 5 +global creds uchar 12 6 +global clients int 8 7 +global opened long 8 8 +global have ulong 8 9 +global writing uchar 8 10 +global sent ulong 8 11 +global inbox uchar 32 12 +global replies uchar 96 13 +global paused uchar 1 14 +global drain uchar 1 15 +global statew uchar 2 16 +global heartbeat uchar 1 17 +global inflight uchar 1 18 + 19 +fn close_slot k ulong to void 20 +r = fclose get clients k 21 +put clients k neg int 1 22 +end 23 + 24 +fn peer_ok fd int to bool 25 +if ne peercred fd creds 0 12 0 26 +ret false 27 +end 28 +uid = ulong 0 29 +for i ulong 4 30 +uid = or uid shl ulong get creds add i 4 mul i 8 31 +end 32 +ret eq uid ulong getuid 33 +end 34 + 35 +fn take_client listener int to void 36 +for k ulong 8 37 +if lt get clients k 0 38 +fd = accept listener 526336 39 +if ge fd 0 40 +if peer_ok int fd 41 +put clients k int fd 42 +put opened k monons 43 +put have k 0 44 +for j ulong 4 45 +put inbox add mul k 4 j 0 46 +end 47 +put sent k 0 48 +put writing k 0 49 +else 50 +r = fclose int fd 51 +end 52 +end 53 +ret 54 +end 55 +end 56 +end 57 + 58 +fn start_worker c long w ulong to long 59 +pid = sup_spawn c w 60 +if ne pid 0 61 +ret pid 62 +end 63 +note Worker 1 receives no work hint and remains blocked in the kernel. 64 +while true bound `9223372036854775807` 65 +why = sup_wwait c w neg long 1 66 +if or eq why 2 eq why 3 67 +exit 0 68 +end 69 +if eq why 1 70 +if lt sup_ack w 0 71 +exit 2 72 +end 73 +else 74 +if ne why neg long 4 75 +exit 3 76 +end 77 +end 78 +end 79 +exit 4 80 +end 81 + 82 +fn update_workers c long to void 83 +r = sup_pollx c 0 false 84 +for w ulong 2 85 +if eq get swpid w 0 86 +if and eq get statew w 1 eq get swst w 0 87 +put statew w 2 88 +else 89 +if ne get statew w 2 90 +put statew w 3 91 +end 92 +end 93 +end 94 +end 95 +if lt r 0 96 +if ne r neg long 4 97 +for w ulong 2 98 +if gt get swpid w 0 99 +put statew w 3 100 +end 101 +end 102 +end 103 +end 104 +a = sup_take get swack 0 105 +if gt a 0 106 +put heartbeat 0 1 107 +put inflight 0 0 108 +end 109 +if and eq get paused 0 0 eq get inflight 0 0 110 +if eq sup_wake 0 0 111 +put inflight 0 1 112 +end 113 +end 114 +end 115 + 116 +fn valid_frame k ulong to bool 117 +i = mul k 4 118 +if ne get have k 3 119 +ret false 120 +end 121 +if ne get inbox i 2 122 +ret false 123 +end 124 +ret eq get inbox add i 1 1 125 +end 126 + 127 +fn reply_frame o ulong op uchar status uchar to void 128 +put replies o 11 129 +put replies add o 1 1 130 +put replies add o 2 op 131 +put replies add o 3 status 132 +put replies add o 4 uchar get paused 0 133 +put replies add o 5 get statew 0 134 +put replies add o 6 get statew 1 135 +put replies add o 7 uchar get heartbeat 0 136 +for j ulong 4 137 +b = uchar and shr ulong getpid mul j 8 255 138 +put replies add add o 8 j b 139 +end 140 +end 141 + 142 +fn apply_frame k ulong to void 143 +i = mul k 4 144 +o = mul k 12 145 +op = get inbox add i 2 146 +status = uchar 0 147 +if not valid_frame k 148 +status = uchar 1 149 +else 150 +if or lt op 1 gt op 6 151 +status = uchar 1 152 +else 153 +if eq op 3 154 +put paused 0 1 155 +end 156 +if eq op 4 157 +put paused 0 0 158 +end 159 +if eq op 5 160 +put drain 0 1 161 +end 162 +if eq op 6 163 +if eq get statew 1 0 164 +if eq node_notify get swstop 1 0 165 +put statew 1 1 166 +else 167 +put statew 1 3 168 +end 169 +end 170 +end 171 +end 172 +end 173 +reply_frame o op status 174 +put writing k 1 175 +end 176 + 177 +fn service_slot k ulong to void 178 +fd = get clients k 179 +if lt fd 0 180 +ret 181 +end 182 +if ge sub monons get opened k `1000000000` 183 +close_slot k 184 +ret 185 +end 186 +if eq get writing k 0 187 +n = get have k 188 +r = recv fd inbox add mul k 4 n sub 4 n 0 189 +if gt r 0 190 +n = add n ulong r 191 +put have k n 192 +if lt n 4 193 +ret 194 +end 195 +else 196 +if lt r 0 197 +if and ne r neg long 11 ne r neg long 4 198 +close_slot k 199 +end 200 +ret 201 +end 202 +end 203 +apply_frame k 204 +end 205 +n = get sent k 206 +r = sendmsg fd replies add mul k 12 n sub 12 n 16384 207 +if gt r 0 208 +n = add n ulong r 209 +put sent k n 210 +if eq n 12 211 +close_slot k 212 +end 213 +else 214 +if and ne r neg long 4 ne r neg long 11 215 +close_slot k 216 +end 217 +end 218 +end 219 + 220 +fn serve_probe c long to int 221 +put sa 0 1 222 +for i ulong len prefixname 223 +put sa add i 3 get prefixname i 224 +end 225 +n = add len prefixname 3 226 +for i ulong 4 227 +put sa add n i uchar and shr ulong getpid mul i 8 255 228 +end 229 +fd = socknew 1 526337 0 230 +if lt fd 0 231 +ret 10 232 +end 233 +if or ne bind int fd sa 0 add n 4 0 ne listen int fd 8 0 234 +r = fclose int fd 235 +ret 11 236 +end 237 +for k ulong 8 238 +put clients k neg int 1 239 +end 240 +deadline = add monons `60000000000` 241 +while lt monons deadline bound `1000000` 242 +update_workers c 243 +take_client int fd 244 +for k ulong 8 245 +service_slot k 246 +if ne get drain 0 0 247 +note Finish only the shutdown reply before teardown, within the original slot deadline. 248 +while ge get clients k 0 bound 2000 249 +service_slot k 250 +if ge get clients k 0 251 +r = sleepns `1000000` 252 +end 253 +end 254 +break 255 +end 256 +end 257 +if ne get drain 0 0 258 +break 259 +end 260 +r = sleepns `1000000` 261 +end 262 +for k ulong 8 263 +if ge get clients k 0 264 +close_slot k 265 +end 266 +end 267 +r = fclose int fd 268 +ret 0 269 +end 270 + 271 +fn main to int 272 +c = pool_new 1 2 273 +if lt c 0 274 +ret 20 275 +end 276 +if ne sup_init c 0 277 +ret 21 278 +end 279 +rc = int 22 280 +if gt start_worker c 0 0 281 +if gt start_worker c 1 0 282 +rc = serve_probe c 283 +end 284 +end 285 +r = sup_stop c `1000000000` 286 +if or lt r 0 ne sup_live c 0 287 +rc = int 23 288 +end 289 +sup_closeall 290 +r = pool_free c 291 +ret rc 292 +end seed/node/tests/qual.om @@ -621,7 +621,7 @@ text qgit "/usr/bin/git" 621 621 text qstatus "/usr/bin/git\tstatus\t--porcelain" 622 622 text qhead "/usr/bin/git\trev-parse\tHEAD" 623 623 text qtree "/usr/bin/git\trev-parse\tHEAD^{tree}" 624 -text qlist "/usr/bin/git\tls-files\t--cached\t--others\t--exclude-standard\t--\tseed/out/omc\tseed/node/*.om\tseed/node/proofs/Result.lean\tseed/agent/*.om\tseed/authority/action.om\tseed/authority/action-gate.om\tseed/node/tests/*.py\tseed/node/tests/*.om\tseed/net/http.om\tseed/net/notls.om" 624 +text qlist "/usr/bin/git\tls-files\t--cached\t--others\t--exclude-standard\t--\tseed/out/omc\tseed/node/*.om\tseed/node/proofs/Result.lean\tseed/agent/*.om\tseed/authority/action.om\tseed/authority/action-gate.om\tseed/node/tests/*.py\tseed/node/tests/*.om\tseed/node/tests/recorded-control/final-selected.json\tseed/net/http.om\tseed/net/notls.om" 625 625 text qgitout "git.out" 626 626 text qlsout "sources.txt" 627 627 text qhashes "hashes.txt" @@ -1123,7 +1123,7 @@ text qcm12 "cm12_record_length|if or eq d 0 gt add add add add d get h 4 get h 5 1123 1123 text qcm13 "cm13_cancel_unknown|if or eq lo 1 eq lo 22|if eq lo 22||197" 1124 1124 text qcm14 "cm14_missing_as_read|cw_s i 6 5|cw_s i 6 1|fn cw_read |178" 1125 1125 text qcm15 "cm15_prompt_too_long|if gt n 3800|if gt n 4000||203" 1126 -text qcm16 "cm16_tool_refusal_strands|cw_end i 23|x = ulong 0|fn cw_issue |206" 1126 +text qcm16 "cm16_tool_refusal_strands|cw_end i 23|x = ulong 0|fn cw_issue |208" 1127 1127 1128 1128 fn q_cmutants to void 1129 1129 q_cmrun qcm1 @@ -1615,7 +1615,7 @@ text qrmut "rmutant" 1615 1615 text qvdir "vmut-" 1616 1616 text qrdir "rmut-" 1617 1617 text qfake "\tfake" 1618 -text qdargs "\t%O\t%R\t" 1618 +text qdargs "\t%O\t%B/seed/node/tests/recorded-control\t" 1619 1619 text qscen " scenario=" 1620 1620 text qkillby " killed-by=" 1621 1621 text qfailng " failing: " seed/node/tests/ra40/final-selected.json new file mode 100644 @@ -0,0 +1 @@ 1 +[{"job": {"path": "jobs/item76666.om", "fault": "logic", "broken": "fn calc x int to int\ns = x\nfor i ulong 3\ns = add s int 1\nend\nret s\nend\nfn main to int\nret calc int 70\nend\n", "kind": "loop", "k": 4, "n": 3, "a": 70, "style": 0}, "turns": [{"state": "unread", "prompt": "Task: Repair this Omega file and verify it.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: unread\nAnswer:\n", "raw": "{\"tool\":\"read_file\",\"path\":\"jobs/item76666.om\"}\nDone.\n"}, {"state": "read", "prompt": "Task: Repair this Omega file and verify it.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: read\nSource:\nfn calc x int to int\ns = x\nfor i ulong 3\ns = add s int 1\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Read succeeded.\nAnswer:\n", "raw": "{\"tool\":\"omega_check\",\"path\":\"jobs/item76666.om\"}\nDone.\n"}, {"state": "failed", "prompt": "Task: Repair this Omega file and verify it.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: failed\nSource:\nfn calc x int to int\ns = x\nfor i ulong 3\ns = add s int 1\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Test failed: calc(70) expected 82, got 73.\nAnswer:\n", "raw": "{\"tool\":\"replace_text\",\"path\":\"jobs/item76666.om\",\"old\":\"s = add s int 1\",\"new\":\"s = add s int 4\"}\nDone.\n"}, {"state": "edited", "prompt": "Task: Repair this Omega file and verify it.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: edited\nSource:\nfn calc x int to int\ns = x\nfor i ulong 3\ns = add s int 4\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Edit saved.\nAnswer:\n", "raw": "{\"tool\":\"omega_check\",\"path\":\"jobs/item76666.om\"}\nDone.\n"}, {"state": "checked", "prompt": "Task: Repair this Omega file and verify it.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: checked\nSource:\nfn calc x int to int\ns = x\nfor i ulong 3\ns = add s int 4\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Tests passed.\nAnswer:\n", "raw": "Tests passed.\nDone.\n"}], "pass": true, "state": "checked"}] \ No newline at end of file seed/node/tests/recorded-control/README.md new file mode 100644 @@ -0,0 +1,23 @@ 1 +# Four recorded operator-control cases 2 + 3 +This fixture reproduces the four synthetic Omega repair objectives used by the native operator-view and release scenarios. The records cover a wrong loop count, a missing file, a wrong calculation and a passing program. 4 + 5 +The records were reconstructed from the retained native qualification run at omega-mv revision ``2ee9da3574747b8f3dbbca2f5910def0a24d6aa2``, using its prepared `rel/full/expect.json` and `objs.txt`. The first read response provides each initial source file. The missing-file objective has no initial file. A present file uses the label `present` because the preparation code distinguishes only missing and present files. The reconstructed file is a four-case projection. The full 108-run replay and the digest-pinned live-test still require the original selection. 6 + 7 +From the repository root, build the seeded drivers as described in [the node guide](../../README.md). With a fresh output directory, reproduce the projection and check its three products against the historical run: 8 + 9 +```sh 10 +cases="$PWD/seed/node/tests/recorded-control" 11 +out=$(mktemp -d) 12 +build/node/view-prep "$cases" "$out/prepared" 76666,83423,82342,85188 && 13 +(cd "$out/prepared" && sha256sum -c - <<'HASHES' 14 +`2c97e2a9e54651138f0df9196459e946d5ea05ed0bd9bc246960b3f0ca4f5f0d` expect.json 15 +`4f62b13ea6dcc92bd7c135747bbc34d9b6ad4f11e1cb58f6ac8930ee3e9c13b3` objs.txt 16 +`05386b30c5d1a027fa8f943233368ba62c690cd5877ae9bf82369c7b404a01b0` map 17 +HASHES 18 +) 19 +``` 20 + 21 +Pass `"$cases"` as the ROUND40 argument of `view-accept` or `release-accept fake`. A fake server answers only the recorded prompts. 22 + 23 +The separate `restart.map` supplies the two additional turns after a restart. The prompt and reply bytes were identical in the archived live Spark crash runs `20261107T085509Z/r/run/crash/run2.out` and `r2/run/crash/run2.out`. The first transcript SHA-256 is ``3e4f347e8b06388499784420cf9f5364c4bbc35cb5c1756d916dfbfa2ec0996e``. The release driver uses these turns only for recorded restart and journal compatibility tests. seed/node/tests/recorded-control/final-selected.json new file mode 100644 @@ -0,0 +1,141 @@ 1 +[ 2 + { 3 + "job": { 4 + "kind": "loop", 5 + "k": 4, 6 + "n": 3, 7 + "a": 70, 8 + "path": "jobs/item76666.om", 9 + "style": 49, 10 + "fault": "present", 11 + "broken": "fn calc x int to int\ns = x\nfor i ulong 2\ns = add s int 4\nend\nret s\nend\nfn main to int\nret calc int 70\nend\n" 12 + }, 13 + "turns": [ 14 + { 15 + "state": "unread", 16 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: unread\nAnswer:\n", 17 + "raw": "{\"tool\":\"read_file\",\"path\":\"jobs/item76666.om\"}" 18 + }, 19 + { 20 + "state": "read", 21 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: read\nSource:\nfn calc x int to int\ns = x\nfor i ulong 2\ns = add s int 4\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Read succeeded.\nAnswer:\n", 22 + "raw": "{\"tool\":\"omega_check\",\"path\":\"jobs/item76666.om\"}" 23 + }, 24 + { 25 + "state": "failed", 26 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: failed\nSource:\nfn calc x int to int\ns = x\nfor i ulong 2\ns = add s int 4\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Test failed: calc(70) expected 82, got 78.\nAnswer:\n", 27 + "raw": "{\"tool\":\"replace_text\",\"path\":\"jobs/item76666.om\",\"old\":\"ulong 2\",\"new\":\"ulong 3\"}" 28 + }, 29 + { 30 + "state": "edited", 31 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: edited\nSource:\nfn calc x int to int\ns = x\nfor i ulong 3\ns = add s int 4\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Edit saved.\nAnswer:\n", 32 + "raw": "{\"tool\":\"omega_check\",\"path\":\"jobs/item76666.om\"}" 33 + }, 34 + { 35 + "state": "checked", 36 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: checked\nSource:\nfn calc x int to int\ns = x\nfor i ulong 3\ns = add s int 4\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Tests passed.\nAnswer:\n", 37 + "raw": "Tests passed." 38 + } 39 + ], 40 + "state": "checked", 41 + "pass": true 42 + }, 43 + { 44 + "job": { 45 + "kind": "loop", 46 + "k": 5, 47 + "n": 3, 48 + "a": 71, 49 + "path": "jobs/item83423.om", 50 + "style": 50, 51 + "fault": "missing", 52 + "broken": "" 53 + }, 54 + "turns": [ 55 + { 56 + "state": "unread", 57 + "prompt": "Task: Inspect the code and repair it to satisfy the goal.\nFile: jobs/item83423.om\nGoal: calc starts with x and adds 5 exactly 3 times in a for loop. main calls calc with 71.\nState: unread\nAnswer:\n", 58 + "raw": "{\"tool\":\"read_file\",\"path\":\"jobs/item83423.om\"}" 59 + }, 60 + { 61 + "state": "missing", 62 + "prompt": "Task: Inspect the code and repair it to satisfy the goal.\nFile: jobs/item83423.om\nGoal: calc starts with x and adds 5 exactly 3 times in a for loop. main calls calc with 71.\nState: missing\nTool result: File not found.\nAnswer:\n", 63 + "raw": "File not found." 64 + } 65 + ], 66 + "state": "missing", 67 + "pass": true 68 + }, 69 + { 70 + "job": { 71 + "kind": "loop", 72 + "k": 1, 73 + "n": 6, 74 + "a": 72, 75 + "path": "jobs/item82342.om", 76 + "style": 49, 77 + "fault": "present", 78 + "broken": "fn calc x int to int\ns = x\nfor i ulong 6\ns = plus s int 1\nend\nret s\nend\nfn main to int\nret calc int 72\nend\n" 79 + }, 80 + "turns": [ 81 + { 82 + "state": "unread", 83 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item82342.om\nGoal: calc starts with x and adds 1 exactly 6 times in a for loop. main calls calc with 72.\nState: unread\nAnswer:\n", 84 + "raw": "{\"tool\":\"read_file\",\"path\":\"jobs/item82342.om\"}" 85 + }, 86 + { 87 + "state": "read", 88 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item82342.om\nGoal: calc starts with x and adds 1 exactly 6 times in a for loop. main calls calc with 72.\nState: read\nSource:\nfn calc x int to int\ns = x\nfor i ulong 6\ns = plus s int 1\nend\nret s\nend\nfn main to int\nret calc int 72\nend\nTool result: Read succeeded.\nAnswer:\n", 89 + "raw": "{\"tool\":\"omega_check\",\"path\":\"jobs/item82342.om\"}" 90 + }, 91 + { 92 + "state": "failed", 93 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item82342.om\nGoal: calc starts with x and adds 1 exactly 6 times in a for loop. main calls calc with 72.\nState: failed\nSource:\nfn calc x int to int\ns = x\nfor i ulong 6\ns = plus s int 1\nend\nret s\nend\nfn main to int\nret calc int 72\nend\nTool result: omc: line 4: error 3\nAnswer:\n", 94 + "raw": "{\"tool\":\"replace_text\",\"path\":\"jobs/item82342.om\",\"old\":\"plus\",\"new\":\"add\"}" 95 + }, 96 + { 97 + "state": "edited", 98 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item82342.om\nGoal: calc starts with x and adds 1 exactly 6 times in a for loop. main calls calc with 72.\nState: edited\nSource:\nfn calc x int to int\ns = x\nfor i ulong 6\ns = add s int 1\nend\nret s\nend\nfn main to int\nret calc int 72\nend\nTool result: Edit saved.\nAnswer:\n", 99 + "raw": "{\"tool\":\"omega_check\",\"path\":\"jobs/item82342.om\"}" 100 + }, 101 + { 102 + "state": "checked", 103 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item82342.om\nGoal: calc starts with x and adds 1 exactly 6 times in a for loop. main calls calc with 72.\nState: checked\nSource:\nfn calc x int to int\ns = x\nfor i ulong 6\ns = add s int 1\nend\nret s\nend\nfn main to int\nret calc int 72\nend\nTool result: Tests passed.\nAnswer:\n", 104 + "raw": "Tests passed." 105 + } 106 + ], 107 + "state": "checked", 108 + "pass": true 109 + }, 110 + { 111 + "job": { 112 + "kind": "loop", 113 + "k": 2, 114 + "n": 4, 115 + "a": 70, 116 + "path": "jobs/item85188.om", 117 + "style": 49, 118 + "fault": "present", 119 + "broken": "fn calc x int to int\ns = x\nfor i ulong 4\ns = add s int 2\nend\nret s\nend\nfn main to int\nret calc int 70\nend\n" 120 + }, 121 + "turns": [ 122 + { 123 + "state": "unread", 124 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item85188.om\nGoal: calc starts with x and adds 2 exactly 4 times in a for loop. main calls calc with 70.\nState: unread\nAnswer:\n", 125 + "raw": "{\"tool\":\"read_file\",\"path\":\"jobs/item85188.om\"}" 126 + }, 127 + { 128 + "state": "read", 129 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item85188.om\nGoal: calc starts with x and adds 2 exactly 4 times in a for loop. main calls calc with 70.\nState: read\nSource:\nfn calc x int to int\ns = x\nfor i ulong 4\ns = add s int 2\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Read succeeded.\nAnswer:\n", 130 + "raw": "{\"tool\":\"omega_check\",\"path\":\"jobs/item85188.om\"}" 131 + }, 132 + { 133 + "state": "checked", 134 + "prompt": "Task: Fix the error in this file and confirm its goal.\nFile: jobs/item85188.om\nGoal: calc starts with x and adds 2 exactly 4 times in a for loop. main calls calc with 70.\nState: checked\nSource:\nfn calc x int to int\ns = x\nfor i ulong 4\ns = add s int 2\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Tests passed.\nAnswer:\n", 135 + "raw": "Tests passed." 136 + } 137 + ], 138 + "state": "checked", 139 + "pass": true 140 + } 141 +] seed/node/tests/recorded-control/restart.map new file mode 100644 @@ -0,0 +1,3 @@ 1 +353 205 2 +"Task: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: read\nSource:\nfn calc x int to int\ns = x\nfor i ulong 3\ns = add s int 4\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Read succeeded.\nAnswer:\n"{"object": "text_completion", "choices": [{"index": 0, "text": "{\"tool\":\"omega_check\",\"path\":\"jobs/item76666.om\"}", "finish_reason": "stop"}], "usage": {"prompt_tokens": 1, "completion_tokens": 1}}354 161 3 +"Task: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: checked\nSource:\nfn calc x int to int\ns = x\nfor i ulong 3\ns = add s int 4\nend\nret s\nend\nfn main to int\nret calc int 70\nend\nTool result: Tests passed.\nAnswer:\n"{"object": "text_completion", "choices": [{"index": 0, "text": "Tests passed.", "finish_reason": "stop"}], "usage": {"prompt_tokens": 1, "completion_tokens": 1}} \ No newline at end of file seed/node/tests/release-accept.om @@ -102,9 +102,9 @@ text raT8 "fake-serve holds no recorded answer for [" 102 102 text raT9 "]; live mode answers it. " 103 103 note DRA-292 release acceptance. Compose sha2.om json.om drv.om nodedrv.om then this unit. 104 104 note MODE BUILD OLD OMC40 ROUND40 OUTDIR [SCENARIO...]. Fake is host regression, not qualification. 105 -note Memory caps await the reviewed prlimit host word; no host-language or external-tool substitute. 106 -note A capped run deadline will be derived from a measured uncapped baseline (for example 3x) 107 -note once the memory-cap scenario becomes runnable. Never classify an arbitrary timeout as a cap result. 105 +note Memory caps set RLIMIT_AS with prlimit (keyword 235) on the node before exec. 106 +note Each capped run waits at most 3x the measured uncapped wall; a run past that fails the check. 107 +note The host run's one job is a constructed stand-in: seed/node/tests/ra40/final-selected.json. 108 108 text rausage "usage: release-accept MODE BUILD OLD OMC40 ROUND40 OUTDIR [SCENARIO...]\n" 109 109 text rafake "fake" 110 110 text ralive "live" @@ -171,7 +171,22 @@ text raids3 "76666,82342,85188" 171 171 text raids4 "76666,83423,82342,85188" 172 172 text racompat "compat" 173 173 text racoper "compat-oper" 174 -text racap "prlimit host word pending review (omega-mv seed/prlimit-host-word)" 174 +text racfx "code-main: " 175 +text racex ", exit " 176 +text rca6 " c=" 177 +text rca7 " j=" 178 +text rca8 " s=" 179 +text rcap4 "uncapped run did not pass rc=" 180 +text ractag "cap" 181 +text racpfx "memory-cap" 182 +text rca1 "tries=" 183 +text rca2 " pass_kB=" 184 +text rca3 " bad=" 185 +text rca4 " |" 186 +text rca5 " n=" 187 +text rcap1 "no code-main VmPeak" 188 +text rcap2 "measured wall was 0" 189 +text rcap3 "code-main VmPeak kB above `1000000000`" 175 190 text rammiss "no code-main VmHWM/VmPeak read from /proc during the measured run; " 176 191 text rasamp " samples=" 177 192 text raprep "fixture preparation failed" @@ -207,6 +222,22 @@ global raeln ulong 4 207 222 note raerr[0]: 1 once a node output this check reads was missing, unreadable or over capacity 208 223 note (ra_lines, ra_events, ra_mlines): the next check is then a FAIL naming that, and the flag clears. 209 224 global raerr ulong 1 225 +global raas uchar 32 226 +global raunit ulong 1 227 +note racef[0]: trials below the passing cap that failed explicitly (classes in ra_capcls). 228 +global racef ulong 1 229 +global radl ulong 1 230 +global racnt ulong 1 231 +global rapas ulong 1 232 +global racbad ulong 1 233 +global racel ulong 1 234 +global racak ulong 8 235 +global racr long 8 236 +global racnl ulong 8 237 +global racst ulong 8 238 +global racmx ulong 8 239 +global raccl ulong 8 240 +global racbb ulong 1 210 241 text ralost "node output lost (missing, unreadable or over the driver's capacity); " 211 242 212 243 fn ra_name o edit uchar * sc ulong to ulong @@ -661,6 +692,29 @@ x = nd_set cx 6 racode 661 692 ret nd_node cx tg fp 662 693 end 663 694 695 +text rarestartmap "restart.map" 696 + 697 +note Optional recorded continuation for the restart and compatibility scenarios. 698 +fn ra_resume_map cx edit uchar 65536 to bool 699 +b = new uchar 4096 0 700 +n = nd_sub cx 2 5 rarestartmap 701 +if eq n dvnone 702 +ret false 703 +end 704 +r = dv_slurp view part cx 20480 n b 705 +if eq r neg long 2 706 +ret true 707 +end 708 +if le r 0 709 +ret false 710 +end 711 +n = nd_sub cx 4 5 ndmap 712 +if eq n dvnone 713 +ret false 714 +end 715 +ret eq dv_apnd view part cx 20480 n view part b 0 ulong r 0 716 +end 717 + 664 718 fn ra_prep cx edit uchar 65536 js edit uchar ndjsz tp edit uint dvtcap sc ulong to bool 665 719 nm = new uchar 128 0 666 720 ids = new uchar 128 0 @@ -2223,13 +2277,443 @@ end 2223 2277 ret dv_byte o q 39 2224 2278 end 2225 2279 2226 -fn ra_mem cx edit uchar 65536 to void 2280 +fn ra_peak to long 2281 +nm = new uchar 32 0 2282 +for k ulong get rank 0 2283 +n = get rann k 2284 +for z ulong n 2285 +put nm z get ranm add mul k 32 z 2286 +end 2287 +if dv_eq view part nm 0 n racode 2288 +ret get ranv add k 16 2289 +end 2290 +end 2291 +ret -1 2292 +end 2293 + 2294 +fn ra_wr64 off ulong v ulong to void 2295 +for i ulong 8 2296 +put raas add off i uchar and shr v mul i 8 255 2297 +end 2298 +end 2299 + 2300 +note Child only: RLIMIT_AS soft and hard become capb bytes. Exit 97 when prlimit refuses. 2301 +fn ra_asc capb ulong to void 2302 +ra_wr64 0 capb 2303 +ra_wr64 8 capb 2304 +r = prlimit 0 9 raas 0 32 2305 +if ne r 0 2306 +exit 97 2307 +end 2308 +end 2309 + 2310 +note dv_spawn, then the child sets RLIMIT_AS (racbb bytes) before exec. The pid, or the fork error. 2311 +fn ra_spcap pk view uchar * fo view uchar * fe view uchar * to long 2312 +pid = fork 2313 +if eq pid 0 2314 +ra_asc get racbb 0 2315 +f1 = fopen fo 0 len fo 557633 420 2316 +f2 = fopen fe 0 len fe 557633 420 2317 +dv_exec pk f1 f2 2318 +exit 127 2319 +end 2320 +if lt pid 0 2321 +ret pid 2322 +end 2323 +x = setpgid int pid int pid 2324 +ret pid 2325 +end 2326 + 2327 +fn ra_capname o edit uchar * k ulong to ulong 2328 +q = dv_cat o 0 racpfx 2329 +if ge k 10 2330 +ret dvnone 2331 +end 2332 +ret dv_byte o q uchar add ulong 48 k 2333 +end 2334 + 2335 +fn ra_caprep cx edit uchar 65536 js edit uchar ndjsz tp edit uint dvtcap k ulong to bool 2336 +nm = new uchar 32 0 2337 +n = ra_capname nm k 2338 +if eq n dvnone 2339 +ret false 2340 +end 2341 +if not nd_base cx view part nm 0 n 2342 +ret false 2343 +end 2344 +c = nd_prep cx js tp raids1 false 2345 +ret ge c 0 2346 +end 2347 + 2348 +fn ra_capkb k ulong to ulong 2349 +u = get raunit 0 2350 +if eq k 0 2351 +ret shr u 1 2352 +end 2353 +ret shl u sub k 1 2354 +end 2355 + 2356 +fn ra_cap3 pk edit uchar 4096 p ulong fo edit uchar 4096 fe edit uchar 4096 n ulong to long 2357 +ret ra_spcap view part pk 0 p view part fo 0 n view part fe 0 n 2358 +end 2359 + 2360 +note Start the node with view port 0 under capb bytes. Its slot, or dvnone. 2361 +fn ra_capgo cx edit uchar 65536 tg view uchar * fp long capb ulong to ulong 2362 +pk = new uchar 4096 0 2363 +fo = new uchar 4096 0 2364 +fe = new uchar 4096 0 2365 +p = nd_pknode cx pk fp 0 2366 +if eq p dvnone 2367 +ret dvnone 2368 +end 2369 +n = nd_tagp cx fo tg ndout 2370 +x = nd_tagp cx fe tg nderr 2371 +if or eq n dvnone ne x n 2372 +ret dvnone 2373 +end 2374 +put racbb 0 capb 2375 +pid = ra_cap3 pk p fo fe n 2376 +if lt pid 0 2377 +ret dvnone 2378 +end 2379 +ret nd_track pid 2380 +end 2381 + 2382 +fn ra_pyrc st long to long 2383 +if lt st 0 2384 +ret st 2385 +end 2386 +if ge st 256 2387 +ret neg sub st 256 2388 +end 2389 +ret st 2390 +end 2391 + 2392 +note 0 no journal (absent or empty), 1 a consistent journal, 2 any other journal state 2393 +note (unreadable, torn, over the 64-byte probe or more than one start). 2394 +fn ra_capjs cx edit uchar 65536 to ulong 2395 +b = new uchar 64 0 2396 +if ra_jload cx 2397 +ra_jstats 2398 +if gt get raj 3 1 2399 +ret 2 2400 +end 2401 +ret 1 2402 +end 2403 +n = nd_sub cx 4 5 ndjfile 2404 +r = dv_slurp view part cx 20480 n b 2405 +if or eq r neg long 2 eq r 0 2406 +ret 0 2407 +end 2408 +ret 2 2409 +end 2410 + 2411 +note dvnone when cap.out could not be loaded; the caller treats that as a harness failure. 2412 +fn ra_caplin cx edit uchar 65536 o edit uchar 65536 to ulong 2413 +ok = ra_load cx ractag 2414 +if not ok 2415 +put racel 0 0 2416 +ret dvnone 2417 +end 2418 +n = ra_events o racwo 2419 +put racel 0 n 2420 +ret ra_nlines view part o 0 n 2421 +end 2422 + 2423 +note ra_hasc b t: true when some line of b starts with "code-main: " and ends with t, with room 2424 +note for both (cw_fail's cause line for one exit). 2425 +fn ra_hasc b view uchar * t view uchar * to bool 2426 +s = ulong 0 2427 +while lt s len b bound 65537 2428 +e = nd_lend b s 2429 +if nd_pfx b s e racfx 2430 +if ge sub e s add len racfx len t 2431 +if dv_eq view part b sub e len t len t t 2432 +ret true 2433 +end 2434 +end 2435 +end 2436 +s = add e 1 2437 +end 2438 +ret false 2439 +end 2440 + 2441 +note ra_err cx rc: what cap.err holds. 0 it is empty, 1 some line is cw_fail's cause line for 2442 +note this exit ("code-main: WHAT, exit RC" with RC equal to rc), 2 anything else (absent, 2443 +note unreadable, or other text). 2444 +fn ra_err cx edit uchar 65536 rc long to ulong 2445 +fe = new uchar 4096 0 2446 +n = nd_tagp cx fe ractag nderr 2447 +if eq n dvnone 2448 +ret 2 2449 +end 2450 +b = new uchar 65536 0 2451 +r = dv_slurp view part fe 0 n b 2452 +if lt r 0 2453 +ret 2 2454 +end 2455 +if eq r 0 2456 +ret 0 2457 +end 2458 +t = new uchar 32 0 2459 +q = dv_cat t 0 racex 2460 +q = dv_fmtl t q rc 2461 +if ra_hasc view part b 0 ulong r view part t 0 q 2462 +ret 1 2463 +end 2464 +ret 2 2465 +end 2466 + 2467 +text cap_pass "CWO 0 PASS " 2468 +text cap_fail "CWO 0 FAIL " 2469 + 2470 +note Match all bytes against the one objective's durable RESULT and process exit. 2471 +fn ra_caprecord o view uchar * rc long result ulong turns ulong to ulong 2472 +b = new uchar 128 0 2473 +kind = ulong 0 2474 +n = ulong 0 2475 +if eq result 1 2476 +if ne rc 0 2477 +ret 3 2478 +end 2479 +kind = 1 2480 +n = dv_cat b 0 cap_pass 2481 +else 2482 +if or ne rc 1 or lt result 10 gt result 23 2483 +ret 3 2484 +end 2485 +n = dv_cat b 0 cap_fail 2486 +end 2487 +n = dv_fmtu b n result 2488 +n = dv_byte b n 32 2489 +n = dv_fmtu b n turns 2490 +n = dv_byte b n 10 2491 +if not dv_eq o view part b 0 n 2492 +ret 3 2493 +end 2494 +ret kind 2495 +end 2496 + 2497 +text cap_sample_ok "CWO 0 PASS 1 5\n" 2498 +text cap_sample_fail "CWO 0 FAIL 17 2\n" 2499 +text cap_sample_corrupt "CWO 0 BROKEN 17 2\n" 2500 + 2501 +fn ra_cap_controls to bool 2502 +if ne ra_caprecord cap_sample_ok 0 1 5 1 2503 +ret false 2504 +end 2505 +if ne ra_caprecord cap_sample_fail 1 17 2 0 2506 +ret false 2507 +end 2508 +if ne ra_caprecord cap_sample_ok 1 1 5 3 2509 +ret false 2510 +end 2511 +if ne ra_caprecord cap_sample_corrupt 1 17 2 3 2512 +ret false 2513 +end 2514 +if ne ra_caprecord cap_sample_fail 1 17 3 3 2515 +ret false 2516 +end 2517 +ret eq ra_caprecord cap_sample_ok 0 17 5 3 2518 +end 2519 + 2520 +fn ra_capcommitted o view uchar * rc long st ulong to ulong 2521 +if or ne st 1 ne get raj 5 1 2522 +ret 3 2523 +end 2524 +for i ulong get raj 0 2525 +if eq ra_rw i 0 10 2526 +if ne ra_rw i 3 0 2527 +ret 3 2528 +end 2529 +r = ra_rw i 4 2530 +t = ra_rw i 5 2531 +ret ra_caprecord o rc r t 2532 +end 2533 +end 2534 +ret 3 2535 +end 2536 + 2537 +note Trial class: 0 explicit fail (counts toward fail-closed), 1 pass, 2 signal death before the 2538 +note node did anything (no journal, empty stderr: the kernel refused the exec; reported, not 2539 +note counted), 3 bad (harness exit 97/126/127, an inconsistent journal, a signal death after 2540 +note the node started, or any other end). Explicit fail: one CWO line that is a FAIL with rc 1, 2541 +note or no CWO line with a code-main refusal exit 50..57 and its cause line for that exit on 2542 +note stderr. Pass: one CWO PASS line, rc 0 and a consistent journal. rc < 0 is a signal here: 2543 +note ra_captry turns a wait error or timeout into class 3 before this is called. 2544 +fn ra_capcls cx edit uchar 65536 o view uchar * rc long nl ulong st ulong to ulong 2545 +if eq st 2 2546 +ret 3 2547 +end 2548 +if or eq rc 97 or eq rc 126 eq rc 127 2549 +ret 3 2550 +end 2551 +if eq nl 1 2552 +ret ra_capcommitted o rc st 2553 +end 2554 +if ne nl 0 2555 +ret 3 2556 +end 2557 +if and ge rc 50 le rc 57 2558 +if eq ra_err cx rc 1 2559 +ret 0 2560 +end 2561 +ret 3 2562 +end 2563 +if and lt rc 0 eq st 0 2564 +if eq ra_err cx rc 0 2565 +ret 2 2566 +end 2567 +end 2568 +ret 3 2569 +end 2570 + 2571 +fn ra_store cap ulong rc long nl ulong st ulong mx ulong cl ulong to void 2572 +i = get racnt 0 2573 +if ge i 8 2574 +ret 2575 +end 2576 +put racak i cap 2577 +put racr i rc 2578 +put racnl i nl 2579 +put racst i st 2580 +put racmx i mx 2581 +put raccl i cl 2582 +put racnt 0 add i 1 2583 +end 2584 + 2585 +note Judge one finished trial. 1 stops the ladder. 2586 +fn ra_capfin cx edit uchar 65536 cap ulong rc long to ulong 2587 +lines = new uchar 65536 0 2588 +nl = ra_caplin cx lines 2589 +jsv = ra_capjs cx 2590 +mx = ulong 0 2591 +if eq jsv 1 2592 +mx = get raj 3 2593 +end 2594 +if eq nl dvnone 2595 +put racbad 0 1 2596 +ra_store cap rc 0 jsv mx 3 2597 +ret 1 2598 +end 2599 +cl = ra_capcls cx view part lines 0 get racel 0 rc nl jsv 2600 +ra_store cap rc nl jsv mx cl 2601 +if eq cl 3 2602 +put racbad 0 1 2603 +ret 1 2604 +end 2605 +if eq cl 1 2606 +put rapas 0 add cap 1 2607 +ret 1 2608 +end 2609 +if eq cl 0 2610 +put racef 0 add get racef 0 1 2611 +end 2612 +ret 0 2613 +end 2614 + 2615 +note 1 stops the ladder. 0 tries the next larger cap. 2616 +fn ra_captry cx edit uchar 65536 js edit uchar ndjsz tp edit uint dvtcap k ulong fp long to ulong 2617 +cap = ra_capkb k 2618 +if not ra_caprep cx js tp k 2619 +put racbad 0 1 2620 +ra_store cap neg long 1 0 2 0 3 2621 +ret 1 2622 +end 2623 +i = ra_capgo cx ractag fp mul cap 1024 2624 +if eq i dvnone 2625 +put racbad 0 1 2626 +ra_store cap neg long 1 0 2 0 3 2627 +ret 1 2628 +end 2629 +st = dv_wait get ndpid i get radl 0 2630 +put ndpst i st 2631 +if lt st 0 2632 +put racbad 0 1 2633 +ra_store cap st 0 0 0 3 2634 +ret 1 2635 +end 2636 +ret ra_capfin cx cap ra_pyrc st 2637 +end 2638 + 2639 +fn ra_capdet o edit uchar 1024 to ulong 2640 +p = dv_cat o 0 rca1 2641 +p = dv_fmtu o p get racnt 0 2642 +p = dv_cat o p rca2 2643 +if eq get rapas 0 0 2644 +p = dv_cat o p raq 2645 +else 2646 +p = dv_fmtu o p sub get rapas 0 1 2647 +end 2648 +p = dv_cat o p rca3 2649 +p = dv_fmtu o p get racbad 0 2650 +for k ulong get racnt 0 2651 +p = dv_cat o p rca4 2652 +p = dv_fmtu o p get racak k 2653 +p = dv_cat o p raT43 2654 +p = dv_fmtl o p get racr k 2655 +p = dv_cat o p rca5 2656 +p = dv_fmtu o p get racnl k 2657 +p = dv_cat o p rca6 2658 +p = dv_fmtu o p get raccl k 2659 +p = dv_cat o p rca7 2660 +p = dv_fmtu o p get racst k 2661 +p = dv_cat o p rca8 2662 +p = dv_fmtu o p get racmx k 2663 +end 2664 +if eq p dvnone 2665 +ret 0 2666 +end 2667 +ret p 2668 +end 2669 + 2670 +text cap_control_bad "memory cap result classifier failed its fixed controls" 2671 +fn ra_caps cx edit uchar 65536 js edit uchar ndjsz tp edit uint dvtcap fp long wall ulong to void 2672 +if not ra_cap_controls 2673 +ra_check 36 false cap_control_bad 2674 +ret 2675 +end 2676 +d = new uchar 1024 0 2677 +u = ra_peak 2678 +if lt u 0 2679 +ra_check 36 false rcap1 2680 +ret 2681 +end 2682 +if eq wall 0 2683 +ra_check 36 false rcap2 2684 +ret 2685 +end 2686 +if gt ulong u `1000000000` 2687 +ra_check 36 false rcap3 2688 +ret 2689 +end 2690 +put raunit 0 ulong u 2691 +put radl 0 mul wall 3 2692 +put racnt 0 0 2693 +put rapas 0 0 2694 +put racbad 0 0 2695 +put racef 0 0 2696 +for k ulong 7 2697 +s = ra_captry cx js tp k fp 2698 +if eq s 1 2699 +break 2700 +end 2701 +end 2702 +p = ra_capdet d 2703 +ok = and gt get racef 0 0 eq get racbad 0 0 2704 +if eq get rapas 0 0 2705 +ok = false 2706 +end 2707 +ra_result 36 ok d p 2708 +end 2709 + 2710 +fn ra_mem cx edit uchar 65536 js edit uchar ndjsz tp edit uint dvtcap to void 2227 2711 o = new uchar 1024 0 2228 2712 fp = ra_model cx 150 2713 +t = ulong monons 2229 2714 i = ra_node cx raT76 fp 2230 2715 ra_hwrst 2231 2716 n = ulong 0 2232 -t = ulong monons 2233 2717 while eq nd_poll i -1 bound `9223372036854775807` 2234 2718 ra_sample get ndpid i 2235 2719 n = add n 1 @@ -2239,7 +2723,7 @@ end 2239 2723 x = sleepns `5000000` 2240 2724 end 2241 2725 rc = nd_fin i 1 2242 -ra_close 2726 +w = sub ulong monons t 2243 2727 p = dv_cat o 0 raT77 2244 2728 p = ra_hwjson o p 0 2245 2729 p = dv_cat o p raT78 @@ -2256,7 +2740,14 @@ p = dv_cat o p rasamp 2256 2740 p = dv_fmtu o p n 2257 2741 ra_result 37 false o p 2258 2742 end 2259 -ra_nr 36 racap 2743 +if ne rc 0 2744 +p = dv_cat o 0 rcap4 2745 +p = dv_fmtl o p rc 2746 +ra_result 36 false o p 2747 +else 2748 +ra_caps cx js tp fp w 2749 +end 2750 +ra_close 2260 2751 end 2261 2752 2262 2753 note ra_hwcode: true when /proc gave a code-main VmHWM and VmPeak during the measured run. @@ -2865,6 +3356,12 @@ if not ra_prep cx js tp sc 2865 3356 ra_prepfail sc 2866 3357 ret 2867 3358 end 3359 +if and eq get ras 1 0 or eq sc 2 eq sc 10 3360 +if not ra_resume_map cx 3361 +ra_prepfail sc 3362 +ret 3363 +end 3364 +end 2868 3365 if eq sc 0 2869 3366 ra_full cx js tp 2870 3367 end @@ -2899,7 +3396,7 @@ if eq sc 10 2899 3396 ra_journal cx js tp 2900 3397 end 2901 3398 if eq sc 11 2902 -ra_mem cx 3399 +ra_mem cx js tp 2903 3400 end 2904 3401 end 2905 3402 seed/omc/tests/pools/enlarge-users.txt @@ -44,3 +44,31 @@ seed/ng/tests/ir/x-pool.om 44 44 seed/ng/tests/ir/x-pool-widths.om 45 45 seed/ng/tests/ir/x-pool-bound.om 46 46 seed/ng/front/cases/pool-fd-policy.om 47 +# Run-time pool units outside seed/: each declares `global NAME T *` and grows it with enlarge (checked unit by 48 +# unit at omega-mv `50feb135`, 2026-11-16). The control has no pools. Fed alone, six of them (bridge/shlib/shlib.om, 49 +# gpu/nvidia/checks/{api_ew,inventory,lib}.om, gpu/runtime/scanref.om, gpu/runtime/check/scanref-check.om) stop 50 +# under the control with error 16 at a pool declaration; the other fourteen stop with error 16 at the same line 51 +# under both compilers, so byte identity compared only that one error line for them. 52 +# GPU bridge (NVML, shared-library loader): 53 +bridge/nvml/gate.om 54 +bridge/shlib/gate.om 55 +bridge/shlib/shlib.om 56 +# GPU driver checks and the GPU runtime: 57 +gpu/nvidia/checks/api_ew.om 58 +gpu/nvidia/checks/apish-lib.om 59 +gpu/nvidia/checks/gate.om 60 +gpu/nvidia/checks/inventory.om 61 +gpu/nvidia/checks/lib.om 62 +gpu/runtime/cfacts.om 63 +gpu/runtime/check/apiplan-check.om 64 +gpu/runtime/check/hostrest-check.om 65 +gpu/runtime/check/platrest-check.om 66 +gpu/runtime/check/scanref-check.om 67 +gpu/runtime/classes.om 68 +gpu/runtime/gate.om 69 +gpu/runtime/inventory.om 70 +gpu/runtime/nativeh.om 71 +gpu/runtime/scanref.om 72 +# Trinary daily interface and its codebook: 73 +tools/codebook/codebook.om 74 +tools/trit/trit.om seed/sm121/sm121list.c @@ -357,7 +357,7 @@ static void kernels(void) { 357 357 * program and the kernel bytes the API itself made (the oracle here is the API's own code buffer) */ 358 358 #include "../../src/omega_gpu_elementwise_api.h" 359 359 static void ew_kernels(void) { 360 - for (int op = OMEGA_GPU_EW_EX2; op <= OMEGA_GPU_EW_RC_REFUSE_JOIN_ONLY; op++) 360 + for (int op = OMEGA_GPU_EW_EX2; op < OMEGA_GPU_EW_OP_END; op++) 361 361 for (int mu = 0; mu <= 3; mu++) { 362 362 OmegaBlackwellKernel kern; memset(&kern, 0, sizeof kern); 363 363 omega_bw_ir_init(&g_p); spec/action-graph-ir.md @@ -24,7 +24,7 @@ node into one of those. The graph stays typed Omega state. 24 24 | AIEN | states the goal (goal kind + World objects). Not changed by this work. | 25 25 | Omega | compiles, validates, optimizes, lowers. Has no admin handle. | 26 26 | AEGIS | decides policy when authority is missing (R8 slow path). | 27 -| AIENOS | the only minter (native C capability authority). | 27 +| Aienux | the only minter (native C capability authority). | 28 28 | World | cells, run token, effect objects; readiness drives execution. | 29 29 30 30 Omega gains no authority. `rx_graph.o` is linked alone first and the build @@ -196,4 +196,4 @@ lowering with the slot reused). 196 196 - The reference ignores resource budgets; resource scenarios compare after 197 197 admission. 198 198 - Host processor only. The authority is the native C library, not the 199 - AIENOS kernel. 199 + Aienux kernel. spec/allen.md @@ -16,7 +16,7 @@ migration is claimed. 16 16 AIEN is the organism (the resident World, its faculties, its Cortex) and the 17 17 cognitive faculty inside it (`src/runtime/rx_aien.*`, "AIEN PROPOSES"). ALLEN 18 18 is the durable subject the organism sustains: the same agent identity, the 19 -same standing intents and the same memory lineage, resolved from the AIENOS 19 +same standing intents and the same memory lineage, resolved from the Aienux 20 20 Store after any restart. ALLEN is state. It has no cognition, no authority and 21 21 no loop. 22 22 @@ -48,7 +48,7 @@ timer, no `max_turns`. Gate G5 checks the symbol tables of `allen_bind.o` and 48 48 49 49 Inspection and qualification only: not a chat, not an agent runtime, not a 50 50 planner, not a daemon, not a Visor, not an operator shell. Verbs: `make` 51 -(test fixture writer; in production the object is committed by the AIENOS 51 +(test fixture writer; in production the object is committed by the Aienux 52 52 kernel), `inspect`, `digest`, `lineage`, `seed-journal`, `publish` (the 53 53 R11 part-A rig: capability root, World, resident AIEN faculty; checks the 54 54 memory binding, publishes every ACTIVE intent, waits for quiescence, prints spec/capability-query-ir.md @@ -89,7 +89,7 @@ built once over the catalog. An entry is feasible when all of these hold: 89 89 `held` is decided for each feasible candidate by validating the principal's 90 90 capabilities through the world's authority view (`rx_world_validate_cap`). 91 91 The query mints nothing. `rx_capq.o` is linked alone first and the build fails 92 -if it references any AIENOS admin operation. 92 +if it references any Aienux admin operation. 93 93 94 94 ## Ranking 95 95 @@ -144,7 +144,7 @@ x10 while the full scan grows more than x100. 144 144 Scenarios: alias and specialization, each hard constraint, Fabric leases and 145 145 locality, MCP sessions and applicability, tolerance bands, two orders -> two 146 146 winners, determinism over repeated queries and registration orders, held / 147 -not held / forged / revoked authority through the native AIENOS authority, 147 +not held / forged / revoked authority through the native Aienux authority, 148 148 and a chosen candidate driving an action graph (runs when held; reported 149 149 missing when not). 150 150 spec/cognitive-routing.md @@ -96,7 +96,7 @@ failures, confidence bins, per-call time for p99) and batch costs (processor 96 96 time per call from a batch, metered energy per call). `rx_route_propose` 97 97 serializes the ledger into a generation's `model` blob and proposes it. The 98 98 routing does not change until that candidate is promoted by a principal 99 -holding `RX_GEN_RIGHT_PROMOTE` on `RX_GEN_RES_PROMOTION` on the native AIENOS 99 +holding `RX_GEN_RIGHT_PROMOTE` on `RX_GEN_RES_PROMOTION` on the native Aienux 100 100 authority, and the proposer may not promote its own candidate 101 101 (`rx_generation`). 102 102 spec/effect-cap64-migration.md @@ -11,7 +11,7 @@ Authority: AIENOS `4c213863c840f77264e6851f5f6f393e80cfdb95` (aienos.lock; aien 11 11 12 12 ## 1. Problem 13 13 14 -AIENOS capability references are `(uint32 cap_id, uint64 generation)`. Since 14 +Aienux capability references are `(uint32 cap_id, uint64 generation)`. Since 15 15 aienos#158 a restarted table starts above every generation the old table used, 16 16 and every table seeds its generations from `CLOCK_BOOTTIME` ns << 8, so live 17 17 generations are normally above 2^32. Omega's runtime view (`aienos_cap.h`, @@ -93,7 +93,7 @@ decoded with their old meaning and not accepted for inspection. 93 93 Why refuse rather than "decode with the original meaning and refuse for 94 94 authority use": 95 95 96 -1. The only thing the old format could say about a live AIENOS reference was 96 +1. The only thing the old format could say about a live Aienux reference was 97 97 a truncated generation. There is no correct authority representation to 98 98 preserve, and the brief forbids keeping a wrong one alive. 99 99 2. Old bytes were a host-struct image (host byte order, padding). Their @@ -166,12 +166,12 @@ so the refusal tests refuse the real old format. 166 166 167 167 ## 4. Tests (`make test-effect-cap64`) 168 168 169 -`tests/effect/test_effect_cap64.c`, linked with the pinned AIENOS 169 +`tests/effect/test_effect_cap64.c`, linked with the pinned Aienux 170 170 `libaienos_capability.a` (`4c21386`; `EFFECT_CAP64_CAP_LIB`, default 171 171 `$(AIENOS_CAP_LIB)`). Physics-free. Prints one line per gate: 172 172 173 173 - **ROUNDTRIP**: generations 0, 1, UINT32_MAX, UINT32_MAX+1, 1<<63, 174 - 0xFFFFFFFFFFFFFFFE, UINT64_MAX, and live AIENOS generations, survive 174 + 0xFFFFFFFFFFFFFFFE, UINT64_MAX, and live Aienux generations, survive 175 175 build -> canonical encode -> OMGG serialize -> decode -> validate -> Visor 176 176 request (text and JSON print the exact decimal) with every field equal. 177 177 - **IDENTITY**: ids differ for generations that differ only in the high word @@ -182,7 +182,7 @@ so the refusal tests refuse the real old format. 182 182 cut, non-zero padding, resource 0, param_len > 128, wrong length. All 183 183 refused with the specific code; a v1 non-effect object in the same stream 184 184 still decodes (control). 185 -- **AUTHORITY** (real AIENOS `4c21386`): live references forced to 185 +- **AUTHORITY** (real Aienux `4c21386`): live references forced to 186 186 UINT32_MAX, UINT32_MAX+1 and 1<<63 validate after the round trip; the 187 187 same reference with the high 32 bits cut is `STALE_GEN`; revoke -> 188 188 `REVOKED`; reclaim -> `STALE_GEN`; wrong slot -> refused; wrong right -> @@ -198,8 +198,8 @@ so the refusal tests refuse the real old format. 198 198 - The accelerator `OmegaEffectIntent` / `OmegaEffectReceipt` 199 199 (`src/omega_accelerator.h`) still carry a 32-bit `capability_generation`. 200 200 They belong to the physics accelerator port model (its own capability 201 - table), not to AIENOS, and are not changed here. 201 + table), not to Aienux, and are not changed here. 202 202 - The Visor JSON prints the generation as an exact decimal integer. JSON 203 203 consumers that parse numbers as IEEE doubles lose precision above 2^53. 204 204 - No effect is executed; the mapping from `operation_code` / `resource_class` 205 - to AIENOS rights / resources is still a test convention. 205 + to Aienux rights / resources is still a test convention. spec/empirical-optimizer.md @@ -164,7 +164,7 @@ EI = E[max(0, log2 cost(chosen) − log2 cost(competitor))] 164 164 165 165 Beating the fixed rule alone is not enough. On the first Spark run, a model 166 166 with its quad4 and scalar knowledge swapped still beat the fixed rule by 5%. 167 -3. Only a subject holding `RX_GEN_RIGHT_PROMOTE` on the native AIENOS 167 +3. Only a subject holding `RX_GEN_RIGHT_PROMOTE` on the native Aienux 168 168 authority can promote. 169 169 4. After promotion the store is closed and recovered, then reopened. The model 170 170 is read back from the active generation and compared by digest. @@ -297,4 +297,4 @@ were the online learner's cost and the replay. 297 297 - Thermal or cognitive features varied in a controlled way. 298 298 - Energy per call. Energy is measured per arm window and per replay block. 299 299 - Transfer cost. 300 -- The AIENOS kernel. The authority runs as a host library, as in R7–R14. 300 +- The Aienux kernel. The authority runs as a host library, as in R7–R14. spec/machine.md @@ -31,7 +31,7 @@ In sovereign architecture: 31 31 3. **Execution Pipeline Modeling**: Explicit representation of issue width, dispatch ports, execution latency, and throughput per unit type. 32 32 4. **Memory Hierarchy Modeling**: Multi-level cache topologies (L1I, L1D, L2, L3) with capacity, line size, associativity, and cycle latency. 33 33 5. **Topology Disambiguation**: Heterogeneous microarchitectures (e.g., NVIDIA DGX Spark Neoverse V2 vs QEMU Cortex-A57) yield distinct `MACHINE_ID`s. 34 - `MACHINE_ID` here names a hardware *profile*, not a machine: two boxes of the same model share it. The identity of one physical machine is the canonical `AienMachineId` (`src/runtime/aien_machine_id.h`, M20), which FORGE `machine_identity`, the AIENOS receipt `machine_id_digest` and ARGUS `machine_id` all carry. 34 + `MACHINE_ID` here names a hardware *profile*, not a machine: two boxes of the same model share it. The identity of one physical machine is the canonical `AienMachineId` (`src/runtime/aien_machine_id.h`, M20), which FORGE `machine_identity`, the Aienux receipt `machine_id_digest` and ARGUS `machine_id` all carry. 35 35 6. **Realization Cost Grounding**: $G_M$ provides empirical cost functions (cycle latency, register pressure limits) to guide optimal realization synthesis. 36 36 37 37 --- spec/path-semantic-object.md @@ -355,7 +355,7 @@ Under no circumstances does PATH work weaken, bypass, or postpone R16 authority 355 355 356 356 1. **Zero Authority Granting**: A path that documents the sequence `ACTOR -> CAPABILITY -> OPERATION` grants zero rights. The recording of a capability reference in a path step is descriptive evidence that an access was modeled or previously observed; it provides no authority to execute. 357 357 2. **Candidates Authorize Nothing**: A path step sequence `CANDIDATE -> PROMOTION` authorizes no generation promotion or state modification. 358 -3. **Fail-Closed Gate**: Any proposal derived from path analysis submitted to the production reaction runtime (`rx_world.h`) must pass through the native AIENOS capability verification root (`aienos_cap_validate`). If valid credentials are not presented, the request fails closed immediately with error code `RX_ERR_CAP_DENIED`. 358 +3. **Fail-Closed Gate**: Any proposal derived from path analysis submitted to the production reaction runtime (`rx_world.h`) must pass through the native Aienux capability verification root (`aienos_cap_validate`). If valid credentials are not presented, the request fails closed immediately with error code `RX_ERR_CAP_DENIED`. 359 359 4. **Sequencing Guard**: No path components are linked into the production authoritative reaction loop until R16 qualification (`R16_ORCHESTRATOR_RETIRED = PASS`) is merged. 360 360 361 361 --- @@ -394,7 +394,7 @@ Protected Cortex memory classes (`CX_PROT_AUTHORITY`, `CX_PROT_COMMIT_RECEIPT`, 394 394 395 395 Every implementation of the Path Semantic Object must maintain eight fundamental architectural invariants: 396 396 397 -- **I1: PATH != AUTHORITY**: Recording a path grants no authority. Authority stems exclusively from the AIENOS capability root. 397 +- **I1: PATH != AUTHORITY**: Recording a path grants no authority. Authority stems exclusively from the Aienux capability root. 398 398 - **I2: PATH != FACT**: A path recording a sequence of claims or hypotheses represents evidence of reasoning, not established fact. Inferred relationships remain candidates until promoted. 399 399 - **I3: PATH != HIDDEN CHAIN OF THOUGHT**: Paths record externally verifiable, typed operations, observations, decisions, and evidence references. Unrecorded scratchpad deliberations or invisible internal states are prohibited. 400 400 - **I4: SEMANTIC PATH != PATH REALIZATION**: Logical sequence identity is completely decoupled from execution medium, placement, scheduling, or runtime duration. @@ -590,7 +590,7 @@ Path capability bring-up follows seven rigorous, pre-registered milestone gates: 590 590 - **Objective**: Implement pre-flight trajectory capability validation. 591 591 - **Pass Criteria**: 592 592 - Invalid paths (requesting missing capabilities or unavailable hardware) are rejected before execution. 593 - - Hostile test: Injected path claiming fabricated authority fails closed at the AIENOS boundary. 593 + - Hostile test: Injected path claiming fabricated authority fails closed at the Aienux boundary. 594 594 595 595 ### PATH-6: TURING Epistemic Integration 596 596 - **Objective**: Integrate Minimum Description Length scoring for path abstractions. @@ -617,7 +617,7 @@ Before production integration, the following formal ADRs must be drafted and sub 617 617 - Standardizes the Merkle DAG prefix-sharing specification across memory arenas. 618 618 - Establishes immutable parent freezing rules for divergent cognitive trajectories. 619 619 3. **ADR-0023: Fail-Closed Authority Boundary for Relational Path Proposals** 620 - - Mandates that all path-derived execution plans pass through the native AIENOS capability verification root. 620 + - Mandates that all path-derived execution plans pass through the native Aienux capability verification root. 621 621 - Enforces the absolute invariant: Path is evidence, never authority. 622 622 4. **ADR-0024: Pareto Multi-Vector Path Scoring and TURING Integration** 623 623 - Replaces scalar optimization with explicit 13-dimensional score vectors. spec/r10-omega-faculty.md @@ -64,7 +64,7 @@ that regime exists. 64 64 reference by 5% or more. If none does, the reference is kept and that is 65 65 recorded too. 66 66 - **Authority:** production and Omega are separate subjects under the native 67 - AIENOS authority. Omega can read `demand` but cannot write any production 67 + Aienux authority. Omega can read `demand` but cannot write any production 68 68 object. A revoked Omega capability blocks that reaction, and production 69 69 carries on. 70 70 @@ -112,7 +112,7 @@ that regime exists. 112 112 record. Choosing a realization per core class is not implemented. 113 113 - The realization store is process memory. It does not survive a restart and 114 114 does not go through the R9 generation barrier. 115 -- The sandbox is a forked Linux process, not an AIENOS-enforced sandbox. 115 +- The sandbox is a forked Linux process, not an Aienux-enforced sandbox. 116 116 - The production reaction is labelled `RX_FACULTY_EXTERNAL`. It is not AIEN 117 117 (R11). 118 118 - The M12 emitters return without writing `y` when N = 0. The reference spec/r11-aien-faculty.md @@ -21,7 +21,7 @@ Omega / authority / effects react to it, or do not 21 21 22 22 `rx_aien.o` is compiled on its own and the build fails if it has any 23 23 undefined `omega` symbol. AIEN reaches Omega only through objects, under 24 -capabilities the native AIENOS authority checks. 24 +capabilities the native Aienux authority checks. 25 25 26 26 ## What runs 27 27 spec/r13-living-system.md @@ -67,13 +67,13 @@ cost and is not the promoted realization. The receipt says so. 67 67 68 68 - The experiment grant is acquired once, before the goal, through the real R8 69 69 path: a client reaction publishes a request, `aegis.decide` applies policy, 70 - `root.install` mints through the AIENOS admin and fills slot 0. 70 + `root.install` mints through the Aienux admin and fills slot 0. 71 71 - During the episode the seat runs 16 claims on that slot: 72 72 `aegis.decide` and `root.install` activations during the episode are 0. 73 73 - The authority table is swept at the end of every mode. Only subject 64 holds 74 74 `RX_GEN_RIGHT_PROMOTE` (on `RX_GEN_RES_PROMOTION`, nothing else); AIEN, 75 75 Omega, serve, the experiment subjects, AEGIS and the outside hold no mint, 76 - revoke, reclaim, epoch, clock or promote right. Entry 0 is the AIENOS office 76 + revoke, reclaim, epoch, clock or promote right. Entry 0 is the Aienux office 77 77 itself. 78 78 - R9 refuses a promoter that is the proposer, and validates the promotion 79 79 right against the native authority. @@ -159,4 +159,4 @@ one core class and no GB10. 159 159 160 160 R14, R15, R16; cognition beyond R11's statistical model; realization invention 161 161 beyond R10's emitters; kernel isolation of the authority (it is the host-library 162 -C port of AIENOS); that the GPU add measures matvec cost. 162 +C port of Aienux); that the GPU add measures matvec cost. spec/r14-living-recovery.md @@ -63,7 +63,7 @@ scenarios (`build/rx_r14_recovery_silicon DE`). 63 63 ## Not claimed 64 64 65 65 R15, R16; neural or general cognition beyond R11; open-ended invention beyond 66 -R10; AIENOS kernel isolation (the authority is the host-library C port, its 66 +R10; Aienux kernel isolation (the authority is the host-library C port, its 67 67 table does not survive a process restart); immunity to every hardware fault, 68 68 Byzantine hardware or a compromised kernel; a chip-raised fault (the seat is 69 69 killed by destroying its channel); performance. spec/r16-operator-emergency-stop.md @@ -40,7 +40,7 @@ lock in this order: 40 40 authority policy; the same applies to pausing or un-pausing. 41 41 3. **Capability.** `cap` is a live capability for `subject` on 42 42 `RX_WORLD_RES_CONTROL` (0x906) with right `RX_WORLD_RIGHT_HALT`, validated by 43 - the world's authority (rx_caproot or the native AIENOS authority). The right 43 + the world's authority (rx_caproot or the native Aienux authority). The right 44 44 is `RX_RIGHT_EPOCH`: privileged, never delegable. The right that may void every 45 45 capability may also pause the world. Wrong right, wrong resource, another 46 46 subject's capability or a revoked capability: `RX_ERR_AUTHORITY`. @@ -152,7 +152,7 @@ generation store; built with the normal flags; E1 to E6 in the file header): 152 152 unmutated copy. A mutant whose pattern does not match exactly once fails the 153 153 script. 154 154 155 -`make test-r12` `t_emergency_stop` (native AIENOS authority, resident seat 155 +`make test-r12` `t_emergency_stop` (native Aienux authority, resident seat 156 156 stand-in): a seat result that lands after the stop is refused, canonical B and 157 157 B's window keep the world's value, the dependent does not run, no claim is posted 158 158 under the stop; after resume the seat runs again and B = X + Y, C = X + Y + 1. spec/r16-orchestrator-retirement-map.md @@ -664,7 +664,7 @@ exists in the file (symbol not verified) and applies the same class rules. 664 664 | §4 term | finding | authoritative side | class / status | 665 665 |---|---|---|---| 666 666 | synchronous AIEN → Omega calls | omega's AIEN faculty (`src/runtime/rx_aien.c`) reaches Omega only through world publications; R11 spec: `rx_aien.o` must not have an undefined omega symbol. sovereign-core links no omega symbol; its only omega contact is the `crumbs` curriculum gates (`crates/crumbs/src/gates.rs`, `protocol.rs`), which start omega's `crumbline-learner` as a child process and talk to it over a framed stdin/stdout protocol (F rows SC `protocol.rs:311` and OM `crumbline_learner.c:188`); that is a curriculum/test harness, not the living-system path (word search `omega` over sovereign-core `*.rs`/`*.toml`: 4 hits, all in `crates/crumbs`). | omega reaction world | no central call on the production path; G3 re-checks from the link map | 667 -| synchronous Omega → AEGIS calls | omega calls the native AIENOS capability library (`AIENOS_CAP_LIB`, `native/capability/libaienos_capability.a`) for authority; it never execs or links aegis-runtime or `spark-aegis` (grep of omega `src/`, `tools/`, Makefile: zero hits). | native AIENOS capability authority | aegis-runtime path: class A by non-use (AR rows) | 667 +| synchronous Omega → AEGIS calls | omega calls the native Aienux capability library (`AIENOS_CAP_LIB`, `native/capability/libaienos_capability.a`) for authority; it never execs or links aegis-runtime or `spark-aegis` (grep of omega `src/`, `tools/`, Makefile: zero hits). | native Aienux capability authority | aegis-runtime path: class A by non-use (AR rows) | 668 668 | duplicate schedulers | (1) omega `rx_world.c` reaction scheduler (E, authoritative); (2) sovereign-core `aien-scheduler` token batching for LLM serving (E, spec §3.1, not on the reaction path); (3) aienos kernel CPU scheduler `scheduler.rs` / `thread.rs` (E, physical); (4) aegis-runtime heartbeat task polling (A, retired by non-use). Only (1) orders faculty work. | omega `rx_world.c` | no duplicate semantic scheduler after R16 within scope | 669 669 | duplicate world ownership | omega has the reaction world (`rx_world.c`, authoritative) and the M19 accelerator world (`omega_accelerator_world.c`), which the spec keeps as the known-good fallback (C). | reaction world; M19 world = fallback | C row OM for `omega_world_drain`; fallback status proved in G6 | 670 670 | duplicate authority ownership | (1) aienos `native/capability/aienos_capability.c` (C, "native AIENOS capability authority"); (2) aienos `crates/aienos-capability` (Rust twin of the same design); (3) omega `rx_caproot.c`, self-described "host reference capability root … R7 is not claimed"; (4) physics `m3/capability.s` historical assembly oracle. | (1) | C3: native C library is authoritative; Rust crate is legacy; omega rx_caproot.c is a host reference root | spec/r16-orchestrator-retirement.md @@ -316,7 +316,7 @@ the new G3 to G5 tests on the R16 branch). No gate is loosened. 316 316 - (6) "advance the world generation" means the records above plus the R9 317 317 active generation and lineage, in memory and recovered from disk, 318 318 which the test compares after every act. 319 - After every act the watched objects, the R9 generation and the AIENOS 319 + After every act the watched objects, the R9 generation and the Aienux 320 320 table (observer) must be unchanged, except for the office's own planned 321 321 revocations, which the test counts separately. 322 322 4. "Removing any one guard turns the test red" is `make spec/r7-aienos-authority-mapping.md @@ -1,6 +1,6 @@ 1 -# R7 design: host authority onto the AIENOS capability table 1 +# R7 design: host authority onto the Aienux capability table 2 2 3 -Status: host parity is proven. The native authority lives in AIENOS 3 +Status: host parity is proven. The native authority lives in Aienux 4 4 (`aienos-capability`). The same attack list was run against that authority 5 5 and the Linux mint, and the outcomes matched. The reaction world can check 6 6 references through the native view. The Linux mint is still built and is @@ -27,7 +27,7 @@ And in the host reaction world: 27 27 28 28 ## Mapping 29 29 30 -| Host today | AIENOS table today | What has to be true before R7 | 30 +| Host today | Aienux table today | What has to be true before R7 | 31 31 | --- | --- | --- | 32 32 | `RxCapRef` is `{cap_id, generation}` | `Handle` is `{index, generation}`. Generation 0 is never issued. | Same pair. A copied pair is still not permission. | 33 33 | Subject on the capability, checked at validation | No subject. A slot has a resource id and rights. | Add a principal, or an equivalent the host check already depends on. | spec/r8-aegis-resident.md @@ -7,10 +7,10 @@ ADR 0016 §41 and its 2026-09-28 scope note. Gate `R8_CONSTITUTIONAL_AEGIS_PASS` 7 7 Authority relationships live in the world. A reaction that already holds a 8 8 valid capability runs with no policy round trip. A reaction that needs new 9 9 authority is not ready. Its principal publishes a request, AEGIS decides, and 10 -only the AIENOS root mints. Nothing is called and nothing waits. 10 +only the Aienux root mints. Nothing is called and nothing waits. 11 11 12 12 "AEGIS" here is the verifier/policy faculty (ARCHITECTURE §2.5), not the 13 -`aegis-runtime` program. The root is the native AIENOS capability authority 13 +`aegis-runtime` program. The root is the native Aienux capability authority 14 14 (aienos `native/capability/`, C). 15 15 16 16 ## What runs @@ -29,13 +29,13 @@ Test: `tests/runtime/rx_r8_aegis.c`, `make test-r8` (any host). 29 29 - **Capability slots.** A reaction can declare that capability need *i* reads 30 30 its reference from a slot object (fields 0–1) at every check, instead of a 31 31 fixed reference. The slot is also a trigger, so filling it wakes the 32 - reaction. A slot is not permission: the AIENOS view still validates 32 + reaction. A slot is not permission: the Aienux view still validates 33 33 whatever reference it holds. 34 34 - **`aegis.decide`** applies the policy table. It denies privileged rights, 35 35 resources no rule covers, and rights beyond the rule. It caps the lease at 36 36 the rule's maximum. It escalates when the rule requires a human, and then 37 37 grants or denies on the human's `approval`. A release becomes `REVOKE`. 38 -- **`root.install`** is the only holder of the AIENOS admin. It mints, or 38 +- **`root.install`** is the only holder of the Aienux admin. It mints, or 39 39 revokes, only when all of these hold: 40 40 1. every decision field was last written by that client's `aegis.decide`. 41 41 `stamp_proposed` makes each AEGIS commit the author of every field it @@ -59,7 +59,7 @@ request, and the policy decision by who wrote the decision. 59 59 | | | 60 60 |---|---| 61 61 | Fast path: 2000 actions under a live grant | 0 AEGIS activations, 0 root activations | 62 -| One fast-path authority check | ~26 ns (AIENOS validate) | 62 +| One fast-path authority check | ~26 ns (Aienux validate) | 63 63 | One in-process policy evaluation | ~3 ns (rule table) | 64 64 | One process spawn + reap (`/bin/true`), the floor of any shell-out policy call like `spark-aegis` | ~260–310 µs | 65 65 | Slow path, outside intent → work committed | ~44–130 µs | @@ -87,7 +87,7 @@ dependency, not the arithmetic. 87 87 next grant does not revoke the stuffed reference. 88 88 - Privileged rights, unruled resources, rights beyond the rule, a slot out 89 89 of range, and a human rejection are all denied. 90 -- A lease expires on the AIENOS clock and the reader stops. A renewal 90 +- A lease expires on the Aienux clock and the reader stops. A renewal 91 91 replaces the grant: the old one is revoked, the new one is minted. 92 92 - A release revokes through the root. The client stops; the world goes on. 93 93 @@ -96,8 +96,8 @@ verifies. 96 96 97 97 ## Not claimed / limits 98 98 99 -- The AIENOS authority runs as a host library inside this process, not as 100 - the AIENOS kernel. Keeping the admin handle away from other code is a 99 +- The Aienux authority runs as a host library inside this process, not as 100 + the Aienux kernel. Keeping the admin handle away from other code is a 101 101 property of how this program is built, not of an address-space boundary. 102 102 - The policy is a fixed rule table given at start. Changing policy at run 103 103 time, and revoking grants because the policy changed, is not implemented. spec/semantic-communication.md @@ -18,7 +18,7 @@ first delivery only what changed travels. 18 18 | Receiver (branch, worker) | declares an `InformationNeed`; holds its own capabilities | 19 19 | Omega | computes the `SemanticProjection`, its encoding and deltas. No admin handle. Reads the World only. | 20 20 | World (J-space) | objects, fields, per-field versions, writer crumbs (rx_world) | 21 -| AIENOS | the only minter (native C capability authority) | 21 +| Aienux | the only minter (native C capability authority) | 22 22 23 23 `rx_semcomm.o` is linked alone first. The build fails if it references any 24 24 `aienos_cap_*` admin operation, `rx_caproot_mint`/`revoke`, or a World write @@ -182,7 +182,7 @@ reported, not gated. 182 182 - Transport over a network or between processes: delivery is in-process 183 183 decode of the real encoded bytes. 184 184 - Graphics-processor senders or receivers. 185 -- The AIENOS kernel: the authority runs as a host library. 185 +- The Aienux kernel: the authority runs as a host library. 186 186 - Learned or inferred needs: needs are declared. 187 187 - Uncertainty estimation: Omega carries the producer's declared value. 188 188 - Worlds above 256 objects (`RX_MAX_OBJECTS`). spec/state-projection.md @@ -161,7 +161,7 @@ includes building the whole-store view. The gate also requires the projection 161 161 end-to-end to beat the whole-store *reasoning alone*, so the result does not 162 162 rest on the cost of handing the store over. 163 163 164 -**Part B** uses the real R11 faculty (`rx_aien.o`, native AIENOS authority). 164 +**Part B** uses the real R11 faculty (`rx_aien.o`, native Aienux authority). 165 165 Each of 8 histories covers one regime's lifetime (24 records under changing 166 166 placements), interleaved with three other regimes. It ends in a failed 167 167 prediction whose planted cause is a core-class change or drift. The history is spec/visor-authority.md @@ -13,11 +13,11 @@ authority code paths outside the Visor, listed below. 13 13 |---|---|---|---| 14 14 | Capability root | `src/runtime/rx_caproot.h/.c` | `rx_caproot_validate`, `rx_caproot_inspect` | Is `(cap_id, generation)` live, current epoch, unexpired, chain intact, for this subject, resource and rights? (`RX_CAP_ERR_BOUNDS/STALE_GEN/REVOKED/EPOCH/SUBJECT/RESOURCE/RIGHTS/...`) | 15 15 | Root administration | same | `rx_capadmin_mint/revoke/reclaim/advance_clock/bump_epoch` | Only the admin channel holder with the right token and an office authority may change the table (`RX_CAP_ERR_UNAUTHORIZED` otherwise). Reclaim advances the slot generation. | 16 -| World check | `src/runtime/rx_world.h`, `rx_world.c` | `rx_world_validate_cap`, `rx_world_inspect_cap` | Same question, routed to the Linux oracle or the native AIENOS view (`rx_world_init_with_auth`). | 16 +| World check | `src/runtime/rx_world.h`, `rx_world.c` | `rx_world_validate_cap`, `rx_world_inspect_cap` | Same question, routed to the Linux oracle or the native Aienux view (`rx_world_init_with_auth`). | 17 17 | World publish | same | `rx_world_publish_external` | An outside stimulus needs a cap for `(external_subject, object resource, WRITE)` and a live object ref (`RX_ERR_AUTHORITY`, `RX_ERR_STALE_GEN`). | 18 -| AEGIS policy | `src/runtime/rx_aegis.h/.c` | `rx_aegis_evaluate` (pure), `aegis.decide.k` / `root.install.k` reactions | GRANT / DENY (`WHY_NO_RULE`, `WHY_PRIVILEGED`, `WHY_BAD_REQUEST`) / ESCALATE. Only `root.install` mints (through the native AIENOS admin). Nothing calls AEGIS; a reaction is simply not ready until its slot holds authority. | 18 +| AEGIS policy | `src/runtime/rx_aegis.h/.c` | `rx_aegis_evaluate` (pure), `aegis.decide.k` / `root.install.k` reactions | GRANT / DENY (`WHY_NO_RULE`, `WHY_PRIVILEGED`, `WHY_BAD_REQUEST`) / ESCALATE. Only `root.install` mints (through the native Aienux admin). Nothing calls AEGIS; a reaction is simply not ready until its slot holds authority. | 19 19 | Generation barrier | `src/runtime/rx_generation.h/.c` | `rx_gen_propose`, `rx_gen_add_work`, `rx_gen_promote`, `rx_gen_reject_replay` | Promotion needs `RX_RIGHT_PROMOTE` on `RX_GEN_RES_PROMOTION`; the promoted root records committed external effect ids, and `rx_gen_reject_replay` refuses a recorded id (`RX_GEN_ERR_REPLAY`). | 20 -| Design references | `spec/r7-aienos-authority-mapping.md`, `spec/r8-aegis-resident.md` | | Host authority onto the AIENOS table; AEGIS resident authority and its attack list. | 20 +| Design references | `spec/r7-aienos-authority-mapping.md`, `spec/r8-aegis-resident.md` | | Host authority onto the Aienux table; AEGIS resident authority and its attack list. | 21 21 22 22 Route of a legitimate effect: 23 23 `Visor -> EffectIntent -> AEGIS/PHYSICS authority -> bounded execution -> receipt`. @@ -128,7 +128,7 @@ design point is that nothing trusts it. 128 128 not driven; only the World's external publish check is. 129 129 4. AEGIS is not on a call path. The resident `aegis.decide` / `root.install` 130 130 reactions are not run; `rx_aegis_evaluate` is exercised as the pure policy 131 - function. The native AIENOS authority is linked (for `rx_aegis.c`) but 131 + function. The native Aienux authority is linked (for `rx_aegis.c`) but 132 132 validation in this test uses the Linux oracle (`rx_caproot_validate`). 133 133 5. The operation-code-to-rights and resource-class-to-resource mappings are 134 134 test conventions. Omega's `EffectPayload` has no canonical mapping to spec/visor.md @@ -154,7 +154,7 @@ Evidence scope is reported exactly as the receipt states it (`host`, `qemu`, 154 154 `tests/visor/qualification/` + `tools/qualify_visor.sh` (shell glue only; every 155 155 assertion lives in C tests and `.omega-session` scripts). Run it on a committed 156 156 tree: `tools/qualify_visor.sh [--skip-regression] [--no-asan] [out-dir]`. It 157 -rebuilds the AIENOS capability library from the commit in `aienos.lock` (as CI 157 +rebuilds the Aienux capability library from the commit in `aienos.lock` (as CI 158 158 and `tools/effect_cap64_receipt.sh` do) and records its identity (commit, source 159 159 tree, lib sha256) in the receipt. Receipts live in `evidence/VISOR/` as 160 160 content-addressed JSON, never overwritten; the tool writes only a new receipt and spec/workflow-fusion.md @@ -191,7 +191,7 @@ refuses a proposer promoting its own candidate. `rx_fusion_publish` then 191 191 requires the generation to be active and re-reads the bytes: a MetaSkill 192 192 changed after promotion is not published. 193 193 194 -`rx_fusion.o` references no AIENOS admin operation (checked by the build). 194 +`rx_fusion.o` references no Aienux admin operation (checked by the build). 195 195 196 196 ## Gate evidence (what the test proves) 197 197 @@ -221,5 +221,5 @@ changed after promotion is not published. 221 221 hardware realization is built. 222 222 - Energy saved per run is only claimed where it exceeds the meter's 223 223 round-to-round spread. 224 -- Host processor only. The authority is the native C library, not the AIENOS 224 +- Host processor only. The authority is the native C library, not the Aienux 225 225 kernel. src/omega_gpu_elementwise_api.c @@ -232,6 +232,24 @@ static void gen_ex2(Em *e, int mutant) { 232 232 tail(e); 233 233 } 234 234 235 +/* out[i] = MUFU.RSQ(a[i]) for i < n (n = P0), the bare unit with no Newton step, so its flush rule shows 236 + * (omega #462). Threads 128, grid ceil(n/128). Mutant: rsq(4a), half the result. */ 237 +static void gen_rsq(Em *e, int mutant) { 238 + Pro p = prologue(e); 239 + int n = V(e), i = V(e), off = V64(e), x = V(e), y = V(e); 240 + ldc32(e, n, ARG_P0); 241 + imadi(e, i, p.cta, OMEGA_GPU_EW_THREADS, p.tid); 242 + isetp_ge_u32(e, i, n); 243 + exit_if_p0(e); 244 + addr4(e, off, i, p.pa); 245 + ldg(e, x, off, p.udesc); 246 + if (mutant) { int four = V(e); movf(e, four, 4.0f); fmul(e, x, x, four); } 247 + mufu(e, BW_IR_MUFU_RSQ, y, x); 248 + addr4(e, off, i, p.pc); 249 + stg(e, off, y, p.udesc); 250 + tail(e); 251 +} 252 + 235 253 /* out[i] = a[i ^ 127] within each CTA of 128 (n % 128 == 0). STS own word, BAR.SYNC, 236 254 * LDS the partner word. Mutant: LDS own word (no exchange). */ 237 255 static void gen_xchg(Em *e, int mutant) { @@ -825,6 +843,7 @@ static int build_kernel(OmegaGpuEwOp op, int mutant, OmegaBlackwellKernel *kerne 825 843 int math = mutant == 1; 826 844 switch (op) { 827 845 case OMEGA_GPU_EW_EX2: gen_ex2(&e, math); break; 846 + case OMEGA_GPU_EW_RSQ: gen_rsq(&e, math); break; 828 847 case OMEGA_GPU_EW_XCHG: gen_xchg(&e, math); break; 829 848 case OMEGA_GPU_EW_RMSNORM: gen_rmsnorm(&e, math); break; 830 849 case OMEGA_GPU_EW_ROPE: gen_rope(&e, math); break; @@ -1128,6 +1147,10 @@ int omega_gpu_ex2_f32(uint32_t n, const float *x, float *out, OmegaGpuEwInfo *in 1128 1147 if (!x || !out || n == 0) return OMEGA_GPU_EW_BAD_ARGS; 1129 1148 return run_1d(OMEGA_GPU_EW_EX2, n, x, NULL, out, info); 1130 1149 } 1150 +int omega_gpu_rsq_f32(uint32_t n, const float *x, float *out, OmegaGpuEwInfo *info) { 1151 + if (!x || !out || n == 0) return OMEGA_GPU_EW_BAD_ARGS; 1152 + return run_1d(OMEGA_GPU_EW_RSQ, n, x, NULL, out, info); 1153 +} 1131 1154 int omega_gpu_shared_xchg_u32(uint32_t n, const uint32_t *x, uint32_t *out, OmegaGpuEwInfo *info) { 1132 1155 if (!x || !out || n == 0 || n % OMEGA_GPU_EW_THREADS != 0) return OMEGA_GPU_EW_BAD_ARGS; 1133 1156 return run_1d(OMEGA_GPU_EW_XCHG, n, x, NULL, out, info); src/omega_gpu_elementwise_api.h @@ -90,14 +90,17 @@ typedef enum { 90 90 OMEGA_GPU_EW_RC_REFUSE_BAR_IN_REGION, /* BAR.SYNC inside an open region */ 91 91 OMEGA_GPU_EW_RC_REFUSE_SHFL_IN_REGION, /* SHFL inside an open region */ 92 92 OMEGA_GPU_EW_RC_REFUSE_UNCLOSED, /* region begun, never joined */ 93 - OMEGA_GPU_EW_RC_REFUSE_JOIN_ONLY /* BSYNC with no BSSY */ 93 + OMEGA_GPU_EW_RC_REFUSE_JOIN_ONLY, /* BSYNC with no BSSY */ 94 + /* MUFU probes (appended after the refusals so earlier values stay put) */ 95 + OMEGA_GPU_EW_RSQ, /* out[i] = 1/sqrt(a[i]) (probe for bare MUFU.RSQ, omega #462) */ 96 + OMEGA_GPU_EW_OP_END /* one past the last op: loops over every op stop here; not an op */ 94 97 } OmegaGpuEwOp; 95 98 96 99 /* Shape rules (checked, refused with BAD_ARGS / TOO_LARGE): 97 100 * rmsnorm: dim % OMEGA_GPU_EW_THREADS == 0, dim <= OMEGA_GPU_EW_MAX_DIM, rows >= 1 98 101 * rope: head_dim even, 2 <= head_dim <= 2048 (head_dim/2 threads per CTA), heads >= 1 99 102 * swiglu: n >= 1 (the kernel guards the tail with a predicated EXIT) 100 - * ex2: n >= 1; xchg: n % OMEGA_GPU_EW_THREADS == 0 */ 103 + * ex2, rsq: n >= 1; xchg: n % OMEGA_GPU_EW_THREADS == 0 */ 101 104 #define OMEGA_GPU_EW_THREADS 128u 102 105 #define OMEGA_GPU_EW_MAX_DIM 16384u 103 106 #define OMEGA_GPU_EW_MAX_CTAS 1024u @@ -132,8 +135,10 @@ int omega_gpu_rope_f32(uint32_t heads, uint32_t head_dim, const float *v, 132 135 int omega_gpu_swiglu_f32(uint32_t n, const float *gate, const float *up, float *out, 133 136 OmegaGpuEwInfo *info); 134 137 135 -/* Probes. ex2: out[i] = 2^x[i]. xchg: out[i] = x[i ^ (OMEGA_GPU_EW_THREADS-1)] within each CTA. */ 138 +/* Probes. ex2: out[i] = 2^x[i]. rsq: out[i] = MUFU.RSQ(x[i]), no Newton step (the raw unit, for its flush rule). 139 + * xchg: out[i] = x[i ^ (OMEGA_GPU_EW_THREADS-1)] within each CTA. */ 136 140 int omega_gpu_ex2_f32(uint32_t n, const float *x, float *out, OmegaGpuEwInfo *info); 141 +int omega_gpu_rsq_f32(uint32_t n, const float *x, float *out, OmegaGpuEwInfo *info); 137 142 int omega_gpu_shared_xchg_u32(uint32_t n, const uint32_t *x, uint32_t *out, OmegaGpuEwInfo *info); 138 143 /* Reconvergence probes (op = one of OMEGA_GPU_EW_RC_DIAMOND .. OMEGA_GPU_EW_RC_DEPTH16, else 139 144 * BAD_ARGS). n >= 1, any n: lanes past the end take part in the warp step and exit before @@ -161,7 +166,7 @@ int omega_gpu_elementwise_codegen_ir(OmegaGpuEwOp op, int mutant, void *prog, 161 166 /* TEST ONLY. Selects a deliberately wrong kernel for one op (0 clears). Each 162 167 * mutant changes the math by far more than the op's tolerance, so a parity 163 168 * check that still passes against it proves nothing. Clears the kernel cache. 164 - * EX2: computes 2^(x+1). XCHG: reads its own shared word (no exchange). 169 + * EX2: computes 2^(x+1). RSQ: computes rsq(4x) (half the result). XCHG: reads its own shared word (no exchange). 165 170 * RMSNORM: the warp tree drops its last SHFL step (half the lanes go missing). 166 171 * ROPE: out0 = q0*cos + q1*sin. SWIGLU: exp(+g) instead of exp(-g). */ 167 172 void omega_gpu_elementwise_test_set_mutant(int op); src/runtime/rx_resident_gpu.c @@ -75,7 +75,7 @@ struct RxGpuSeat { 75 75 volatile int sem_ok; 76 76 volatile uint32_t marker_value; /* words the host read when the wait ended (diagnostic) */ 77 77 volatile uint32_t sem_value; 78 - char err[160]; 78 + char err[sizeof(((Nvrm *)0)->err) + 128]; /* our label plus nvrm's whole reason */ 79 79 LaunchJob *job; 80 80 volatile uint32_t *hb_watch; 81 81 RxWorld *world; @@ -701,16 +701,14 @@ static void seat_scoreboard(uint8_t *code, size_t bytes) { 701 701 } 702 702 } 703 703 704 -/* The seat must open with the lane check: only thread 0 continues. */ 704 +/* The seat must open with the lane check: only thread 0 continues. The caller prints the refusal. */ 705 705 static int first_is_lane_check(const uint8_t *code, size_t n) { 706 706 if (n < 48) return 0; 707 707 uint32_t w0[3]; 708 708 for (int i = 0; i < 3; i++) memcpy(&w0[i], code + 16 * i, 4); 709 - int ok = OPC(w0[0]) == OPC_S2R && 710 - (OPC(w0[1]) == OPC_ISETP_I || OPC(w0[1]) == OPC_ISETP_R) && 711 - OPC(w0[2]) == OPC_BRA; 712 - if (!ok) fprintf(stderr, "seat: the program does not open with the lane check\n"); 713 - return ok; 709 + return OPC(w0[0]) == OPC_S2R && 710 + (OPC(w0[1]) == OPC_ISETP_I || OPC(w0[1]) == OPC_ISETP_R) && 711 + OPC(w0[2]) == OPC_BRA; 714 712 } 715 713 716 714 struct LaunchJob { @@ -725,6 +723,11 @@ struct LaunchJob { 725 723 NvrmMem code_mem, cbank_mem, qmd_mem, marker_mem, large_pb; 726 724 }; 727 725 726 +/* The launch thread writes s->err first and publishes submit_rc after it (release). wait_heartbeat reads s->err only 727 + * after an acquire load of a nonzero submit_rc, and never writes it: while submit_rc is 0 the launch thread may still 728 + * be writing s->err, so a heartbeat timeout prints its own text. */ 729 +static void job_failed(LaunchJob *job, int rc) { __atomic_store_n(&job->submit_rc, rc, __ATOMIC_RELEASE); } 730 + 728 731 /* The launch marker lands only when the seat leaves. A kill stops the wait. */ 729 732 static int wait_marker_or_abort(RxGpuSeat *s, volatile uint32_t *marker, uint32_t want, 730 733 int timeout_ms) { @@ -747,8 +750,9 @@ static void *launch_main(void *arg) { 747 750 nvrm_alloc(&ctx->rm, 0x10000, &job->qmd_mem) != 0 || 748 751 nvrm_alloc_gpu_uncached(&ctx->rm, 0x1000, &job->marker_mem) != 0 || 749 752 nvrm_alloc(&ctx->rm, 0x10000, &job->large_pb) != 0) { 750 - snprintf(s->err, sizeof s->err, "graphics memory was not allocated"); 751 - job->submit_rc = -1; 753 + snprintf(s->err, sizeof s->err, "graphics memory was not allocated (last RM_ALLOC status 0x%x; nvrm: %s)", 754 + ctx->rm.last_rm_status, ctx->rm.err); 755 + job_failed(job, -1); 752 756 return NULL; 753 757 } 754 758 job->have_mem = 1; @@ -793,7 +797,7 @@ static void *launch_main(void *arg) { 793 797 omega_blackwell_build_qmd1(qmd1, &cfg); 794 798 if (omega_blackwell_verify_qmd_invariants(qmd1) != 0) { 795 799 snprintf(s->err, sizeof s->err, "launch record was rejected"); 796 - job->submit_rc = -1; 800 + job_failed(job, -1); 797 801 return NULL; 798 802 } 799 803 memcpy(qmd_mem.cpu, qmd0, sizeof(qmd0)); @@ -864,12 +868,14 @@ static void *launch_main(void *arg) { 864 868 pb[n++] = 0x1u | (1u << 20); 865 869 if (n > 1024) { 866 870 snprintf(s->err, sizeof s->err, "launch stream does not fit"); 867 - job->submit_rc = -1; 871 + job_failed(job, -1); 868 872 return NULL; 869 873 } 870 - job->submit_rc = m16_native_submit_methods(ctx, pb, n); 871 - if (job->submit_rc != 0) { 872 - snprintf(s->err, sizeof s->err, "the graphics seat was not submitted"); 874 + int submit_rc = m16_native_submit_methods(ctx, pb, n); 875 + if (submit_rc != 0) { 876 + snprintf(s->err, sizeof s->err, "the graphics seat was not submitted (rc %d; last RM_ALLOC status 0x%x; nvrm: %s)", 877 + submit_rc, ctx->rm.last_rm_status, ctx->rm.err); 878 + job_failed(job, submit_rc); 873 879 return NULL; 874 880 } 875 881 int wait = wait_marker_or_abort(s, hmarker, OMEGA_BW_MARKER_COMPLETION_PAYLOAD, 60000); @@ -890,11 +896,13 @@ static int wait_heartbeat(RxGpuSeat *s) { 890 896 for (int i = 0; i < 2000; i++) { 891 897 __asm__ volatile("dsb sy" ::: "memory"); 892 898 if (*hb != 0) return 0; 893 - if (s->job->submit_rc != 0 && s->err[0]) break; 899 + if (__atomic_load_n(&s->job->submit_rc, __ATOMIC_ACQUIRE) != 0) break; 894 900 usleep(1000); 895 901 } 896 - if (!s->err[0]) snprintf(s->err, sizeof s->err, "the graphics seat did not show a heartbeat"); 897 - fprintf(stderr, "seat: %s\n", s->err); 902 + if (__atomic_load_n(&s->job->submit_rc, __ATOMIC_ACQUIRE) != 0 && s->err[0]) 903 + fprintf(stderr, "seat: %s\n", s->err); 904 + else 905 + fprintf(stderr, "seat: the graphics seat did not show a heartbeat\n"); 898 906 return -1; 899 907 } 900 908 @@ -954,8 +962,11 @@ static int lease_start(RxGpuSeat *s) { 954 962 *hb_word_at(s, RX_SEAT_HB_BUDGET) = s->budget; 955 963 __asm__ volatile("dsb sy" ::: "memory"); 956 964 s->lease_run = 1; 957 - if (pthread_create(&s->lease_thread, NULL, lease_main, s) != 0) { 965 + int th_rc = pthread_create(&s->lease_thread, NULL, lease_main, s); 966 + if (th_rc != 0) { 958 967 s->lease_run = 0; 968 + snprintf(s->err, sizeof s->err, "the lease thread was not started: %s", strerror(th_rc)); 969 + fprintf(stderr, "seat: %s\n", s->err); 959 970 return -1; 960 971 } 961 972 s->lease_live = 1; @@ -991,14 +1002,23 @@ int rx_gpu_seat_kill(RxGpuSeat *s) { 991 1002 s->thread_live = 0; 992 1003 } 993 1004 s->killed = 1; 994 - if (rc != 0) snprintf(s->err, sizeof s->err, "the graphics channel was not destroyed"); 1005 + if (rc != 0) { 1006 + snprintf(s->err, sizeof s->err, "the graphics channel was not destroyed (nvrm: %s)", s->ctx.rm.err); 1007 + fprintf(stderr, "seat kill: %s\n", s->err); 1008 + } 995 1009 return rc == 0 ? 0 : -1; 996 1010 } 997 1011 998 1012 int rx_gpu_seat_relaunch(RxGpuSeat *s) { 999 - if (!s || !s->killed || !s->image_bound || !s->job) return -1; 1013 + if (!s || !s->killed || !s->image_bound || !s->job) { 1014 + fprintf(stderr, "seat: relaunch refused (%s)\n", !s ? "no seat" : !s->killed ? "the seat was not killed" 1015 + : !s->image_bound ? "no image is bound" : "no launch job"); 1016 + return -1; 1017 + } 1000 1018 if (nvrm_channel(&s->ctx.rm) != 0) { 1001 - snprintf(s->err, sizeof s->err, "the graphics channel was not rebuilt"); 1019 + snprintf(s->err, sizeof s->err, "the graphics channel was not rebuilt (last RM_ALLOC status 0x%x; nvrm: %s)", 1020 + s->ctx.rm.last_rm_status, s->ctx.rm.err); 1021 + fprintf(stderr, "seat: %s\n", s->err); 1002 1022 return -1; 1003 1023 } 1004 1024 s->killed = 0; @@ -1012,7 +1032,12 @@ int rx_gpu_seat_relaunch(RxGpuSeat *s) { 1012 1032 s->job->args.seat_gen = current_seat_gen(s->world); 1013 1033 memset(s->world->coherent + rx_world_off_heartbeat(), 0, 64); 1014 1034 __asm__ volatile("dsb sy" ::: "memory"); 1015 - if (pthread_create(&s->thread, NULL, launch_main, s->job) != 0) return -1; 1035 + int th_rc = pthread_create(&s->thread, NULL, launch_main, s->job); 1036 + if (th_rc != 0) { 1037 + snprintf(s->err, sizeof s->err, "the relaunch thread was not started: %s", strerror(th_rc)); 1038 + fprintf(stderr, "seat: %s\n", s->err); 1039 + return -1; 1040 + } 1016 1041 s->thread_live = 1; 1017 1042 if (wait_heartbeat(s) != 0) return -1; 1018 1043 return lease_start(s); @@ -1020,8 +1045,15 @@ int rx_gpu_seat_relaunch(RxGpuSeat *s) { 1020 1045 1021 1046 int rx_gpu_seat_begin(RxWorld *w, RxGpuSeat **out) { 1022 1047 if (out) *out = NULL; 1023 - if (!w || !w->coherent || !w->resident_enabled) return -1; 1024 - if (!crc_matches_sealer()) return -1; 1048 + if (!w || !w->coherent || !w->resident_enabled) { 1049 + fprintf(stderr, "seat: not started (%s)\n", !w ? "no world" : !w->coherent ? "the world has no shared image" 1050 + : "the resident seat is not enabled"); 1051 + return -1; 1052 + } 1053 + if (!crc_matches_sealer()) { 1054 + fprintf(stderr, "seat: the sealer's checksum table does not match\n"); 1055 + return -1; 1056 + } 1025 1057 1026 1058 BlackwellIRProgram prog; 1027 1059 uint32_t gpr = 0; @@ -1035,9 +1067,13 @@ int rx_gpu_seat_begin(RxWorld *w, RxGpuSeat **out) { 1035 1067 if (padded < 32) padded = 32; 1036 1068 size_t bytes = padded * 16u; 1037 1069 uint8_t *code = calloc(1, bytes); 1038 - if (!code) return -1; 1070 + if (!code) { 1071 + fprintf(stderr, "seat: no memory for %zu bytes of code\n", bytes); 1072 + return -1; 1073 + } 1039 1074 size_t emitted = 0; 1040 1075 if (omega_bw_encode_program(&prog, code, bytes, &emitted) != 0) { 1076 + fprintf(stderr, "seat: program was not encoded (%d instructions)\n", insns); 1041 1077 free(code); 1042 1078 return -1; 1043 1079 } @@ -1048,15 +1084,31 @@ int rx_gpu_seat_begin(RxWorld *w, RxGpuSeat **out) { 1048 1084 } 1049 1085 seat_scoreboard(code, emitted); 1050 1086 if (!first_is_lane_check(code, emitted)) { 1087 + fprintf(stderr, "seat: program is too short (%zu bytes) or does not start with the lane check\n", emitted); 1051 1088 free(code); 1052 1089 return -1; 1053 1090 } 1054 1091 1055 1092 RxGpuSeat *s = calloc(1, sizeof(*s)); 1056 - if (!s) { free(code); return -1; } 1057 - if (m16_native_open(&s->ctx) != 0 || m16_native_create_channel(&s->ctx) != 0) { 1058 - snprintf(s->err, sizeof s->err, "the graphics device did not open"); 1059 - m16_native_close(&s->ctx); 1093 + if (!s) { 1094 + fprintf(stderr, "seat: no memory for the seat\n"); 1095 + free(code); 1096 + return -1; 1097 + } 1098 + int open_rc = m16_native_open(&s->ctx); 1099 + int chan_rc = open_rc == 0 ? m16_native_create_channel(&s->ctx) : -1; 1100 + if (open_rc != 0 || chan_rc != 0) { 1101 + snprintf(s->err, sizeof s->err, open_rc != 0 ? "the graphics device did not open" 1102 + : "the graphics channel was not created"); 1103 + if (open_rc != 0) 1104 + fprintf(stderr, "seat: %s (open %d, channel not tried; last RM_ALLOC status 0x%x; nvrm: %s)\n", s->err, 1105 + open_rc, s->ctx.rm.last_rm_status, s->ctx.rm.err); 1106 + else 1107 + fprintf(stderr, "seat: %s (channel %d; last RM_ALLOC status 0x%x; nvrm: %s)\n", s->err, chan_rc, 1108 + s->ctx.rm.last_rm_status, s->ctx.rm.err); 1109 + /* m16_native_open already closed its own descriptors when it failed; closing again could close 1110 + * a number another thread was handed meanwhile. */ 1111 + if (open_rc == 0) m16_native_close(&s->ctx); 1060 1112 free(code); 1061 1113 free(s); 1062 1114 return -1; @@ -1070,13 +1122,17 @@ int rx_gpu_seat_begin(RxWorld *w, RxGpuSeat **out) { 1070 1122 if (alloc < 0x100000) alloc = 0x100000; 1071 1123 if (nvrm_alloc_gpu_uncached(&s->ctx.rm, alloc, &image) != 0) { 1072 1124 snprintf(s->err, sizeof s->err, "the shared image was not allocated"); 1125 + fprintf(stderr, "seat: %s (%llu bytes; last RM_ALLOC status 0x%x; nvrm: %s)\n", s->err, 1126 + (unsigned long long)alloc, s->ctx.rm.last_rm_status, s->ctx.rm.err); 1073 1127 m16_native_close(&s->ctx); 1074 1128 free(code); 1075 1129 free(s); 1076 1130 return -1; 1077 1131 } 1078 - if (rx_world_bind_coherent(w, image.cpu, bytes_img, 1) != RX_OK) { 1079 - snprintf(s->err, sizeof s->err, "the world image was not bound"); 1132 + int bind_rc = rx_world_bind_coherent(w, image.cpu, bytes_img, 1); 1133 + if (bind_rc != RX_OK) { 1134 + snprintf(s->err, sizeof s->err, "the world image was not bound (status %d)", (int)bind_rc); 1135 + fprintf(stderr, "seat: %s\n", s->err); 1080 1136 m16_native_close(&s->ctx); 1081 1137 free(code); 1082 1138 free(s); @@ -1087,6 +1143,7 @@ int rx_gpu_seat_begin(RxWorld *w, RxGpuSeat **out) { 1087 1143 1088 1144 LaunchJob *job = calloc(1, sizeof(*job)); 1089 1145 if (!job) { 1146 + fprintf(stderr, "seat: no memory for the launch job\n"); 1090 1147 seat_return_image(s); 1091 1148 m16_native_close(&s->ctx); 1092 1149 free(code); @@ -1105,7 +1162,9 @@ int rx_gpu_seat_begin(RxWorld *w, RxGpuSeat **out) { 1105 1162 job->args.off_hb = (uint32_t)rx_world_off_heartbeat(); 1106 1163 job->args.off_tbl = (uint32_t)rx_world_off_object_table(); 1107 1164 job->args.giveup = GIVEUP; 1108 - if (pthread_create(&s->thread, NULL, launch_main, job) != 0) { 1165 + int th_rc = pthread_create(&s->thread, NULL, launch_main, job); 1166 + if (th_rc != 0) { 1167 + fprintf(stderr, "seat: the launch thread was not started (%s)\n", strerror(th_rc)); 1109 1168 free(job); 1110 1169 free(code); 1111 1170 seat_return_image(s); tests/bench_rx_argus.c @@ -19,7 +19,7 @@ 19 19 * 20 20 * One op = one AEGIS policy evaluation (rx_aegis_evaluate, the pure decide 21 21 * core) + one authority validate on the reaction path (rx_world_validate_cap 22 - * on a world bound to the native AIENOS view, i.e. rx_native_bind's 22 + * on a world bound to the native Aienux view, i.e. rx_native_bind's 23 23 * native_validate, which is where the ARGUS CAPABILITY_USED emit sits). 24 24 * Built identically for RX_ARGUS=0/1/2; the consumer mode for RX_ARGUS=2 is 25 25 * chosen at run time by RX_ARGUS_CONSUMER=discard|ingest (rx_argus.c). tests/bw_hazard_test.c @@ -564,8 +564,8 @@ static void sweep(void) { 564 564 sweep_bytes("attention", v, k.code, k.code_size); 565 565 free(k.code); 566 566 } 567 - /* elementwise kernels and the reconvergence probes */ 568 - for (int op = OMEGA_GPU_EW_EX2; op <= OMEGA_GPU_EW_RC_REFUSE_JOIN_ONLY; op++) { 567 + /* every elementwise op: the kernels, the reconvergence probes and the MUFU probes */ 568 + for (int op = OMEGA_GPU_EW_EX2; op < OMEGA_GPU_EW_OP_END; op++) { 569 569 OmegaBlackwellKernel k; memset(&k, 0, sizeof k); 570 570 if (omega_gpu_elementwise_codegen_ir((OmegaGpuEwOp)op, 0, &g_prog, &k) != 0 || !k.code) { free(k.code); continue; } 571 571 snprintf(v, sizeof v, "op%d", op); tests/bw_mufu_ftz.h @@ -1,9 +1,17 @@ 1 1 /* bw_mufu_ftz.h: the GB10 MUFU unit's flush-to-zero rule, shared by every host model of it (omega #462). 2 2 * 3 - * MUFU (the SASS EX2 / RCP / RSQ unit) flushes a subnormal result to a sign-preserving zero. Chip-observed on GB10: the 4 - * SwiGLU reciprocal 1 / (2^t + 1) for t in (126, 128) came back as +-0 on all 101 of 101 differing elements (evidence 5 - * OWN30B-L1G-PFGEMM-SWIGLU-FTZ-`df9bd9c4`, gpu_pfgemm_test host red test). Doc-inferred, not separately chip-observed: the 6 - * input flush and the EX2 / RSQ cases follow the same rule, PTX ISA 9.7.3.13 (rcp) and 9.7.3.21 (ex2) "flushes subnormal 3 + * The model assumes MUFU (the SASS EX2 / RCP / RSQ unit) flushes a subnormal input and a subnormal result to a 4 + * sign-preserving zero. Chip-observed on GB10: 5 + * - RCP result flush: the SwiGLU reciprocal 1 / (2^t + 1) for t in (126, 128) came back as +-0 on all 101 of 101 6 + * differing elements (evidence OWN30B-L1G-PFGEMM-SWIGLU-FTZ-`df9bd9c4`, gpu_pfgemm_test host red test). 7 + * - EX2 result flush: ex2(x) for x stepped by 1/8 from -151 came back as 0 on all 191 of 191 inputs whose IEEE result 8 + * is subnormal (evidence/GPU-MUFU-FTZ-`20261116`, gpu_elementwise_test ex2_ftz_probe, run by 9 + * tools/run_gpu_elementwise_chip.sh; first seen in evidence/GPU-MUFU-FTZ-`ebbb089a`-`20261116`). 10 + * - RSQ input flush, with sign: rsq of each of the 8 subnormal inputs of both signs came back as +-inf, where IEEE 11 + * gives a finite value (positive) or NaN (negative) (same evidence, rsq_ftz_probe). 12 + * Not chip-observed: the EX2 / RCP input flush and the sign of a flushed EX2 result (EX2 of a subnormal is 1 either way 13 + * and its result is never negative), and the RSQ result flush (rsq of any finite f32 is at least 2^-64, never 14 + * subnormal). The model applies the same rule to them, PTX ISA 9.7.3.13 (rcp) and 9.7.3.21 (ex2) "flushes subnormal 7 15 * inputs and results to sign-preserving zero" for the .ftz form, which is what the bare MUFU we emit is (the non-ftz PTX 8 16 * variants are ptxas sequences around MUFU; NVIDIA publishes no SASS semantics). Limit: the chip's MUFU is approximate 9 17 * (RCP 1 ulp, EX2 2 ulp), the model flushes a correctly rounded IEEE result, so right at the subnormal boundary the two tests/effect/test_effect_cap64.c @@ -25,13 +25,13 @@ 25 25 * OMEGA_EFFECT_CAP64_IDENTITY_PASS the SemanticId binds all 64 generation bits 26 26 * OMEGA_EFFECT_CAP64_STALE_REJECT_PASS old / truncated / malformed bytes refused 27 27 * with the specific reason 28 - * OMEGA_EFFECT_CAP64_AUTHORITY_PASS the real AIENOS authority (pinned lib, 28 + * OMEGA_EFFECT_CAP64_AUTHORITY_PASS the real Aienux authority (pinned lib, 29 29 * aienos.lock) accepts honest references 30 30 * carried through effect objects and refuses 31 31 * truncated, stale, wrong-slot, wrong-right 32 32 * and pre-restart ones 33 33 * 34 - * The authority side uses the pinned AIENOS header and library directly 34 + * The authority side uses the pinned Aienux header and library directly 35 35 * (aienos_capability.h / libaienos_capability.a); the Omega side uses only 36 36 * the physics-free core and the Visor effect-request adapter. 37 37 */ @@ -461,7 +461,7 @@ static void test_stale_reject(void) { 461 461 omega_graph_destroy(g); 462 462 } 463 463 464 -/* ---- AUTHORITY (real AIENOS, pinned lib) ----------------------------------- */ 464 +/* ---- AUTHORITY (real Aienux, pinned lib) ----------------------------------- */ 465 465 466 466 #define SUBJ 7u 467 467 #define OTHER 9u tests/gates/omega-bw-hazard.gate @@ -1,5 +1,5 @@ 1 1 # tests/gates/omega-bw-hazard.gate 2 -# Host-only static scoreboard hazard checker (omega-mv#554): make test-bw-hazard (decoder vs encoder, red receipt, negative controls, sweep). No device. 2 +# Host-only static scoreboard hazard checker (omega-mv#554): make test-bw-hazard (decoder vs encoder, red receipt, negative controls, sweep), then make test-gpu-elementwise (--host-only: RSQ listing, n=0 refusal, MUFU flush model, DRA-344). No device. 3 3 gate: OMEGA-BW-HAZARD 4 4 manifest_version: 2 5 5 owner: omega tests/gates/omega-gpu-libm-free.gate @@ -1,5 +1,5 @@ 1 1 # tests/gates/omega-gpu-libm-free.gate 2 -# omega-mv#471: libomega_gpu.a must link without -lm (omegatool, the Rust FFI crate and AIENOS link it bare); fails when any symbol the archive leaves undefined is a libm export; host only, no chip 2 +# omega-mv#471: libomega_gpu.a must link without -lm (omegatool, the Rust FFI crate and Aienux link it bare); fails when any symbol the archive leaves undefined is a libm export; host only, no chip 3 3 gate: OMEGA-GPU-LIBM-FREE 4 4 manifest_version: 2 5 5 owner: omega tests/gates/omega-trinary.gate new file mode 100644 @@ -0,0 +1,25 @@ 1 +# tests/gates/omega-trinary.gate 2 +# T-002 trit/codebook signal tools (tools/trit, tools/codebook): both binaries built by the committed seed/out/omc, fixture suites, 3 +# codebook mutants, the regression for the trit mutation driver, the trit mutation matrix, the Lean differential and the Lean proofs. 4 +# Host only, no device, no network. No hosted mirror: local gate only. 5 +gate: OMEGA-TRINARY 6 +manifest_version: 2 7 +owner: omega 8 +requires: 9 + - host 10 +inputs: 11 + - tools/trit/ 12 + - tools/codebook/ 13 + - seed/out/omc 14 + - seed/out/omc.sha256 15 + - seed/trace/sha256.om 16 + - tests/gates/ 17 +run: 18 + exec: tests/gates/run.sh 19 + args: ["trinary"] 20 +expects: 21 + exit: 0 22 + verdict: PASS 23 +timeout: 30m 24 +exactness: EXACT 25 +cache_scope: machine tests/gates/run.sh @@ -445,7 +445,9 @@ case "$step" in 445 445 ARGUS_STREAMS="$(mktemp -d /tmp/argus-streams.XXXXXX)"; export ARGUS_STREAMS 446 446 make test-argus-runtime test-machine-identity-argus 447 447 ;; 448 - bw-hazard) physics_pin; make test-bw-hazard ;; 448 + bw-hazard) # omega-mv#554 scoreboard hazards, then the elementwise host test (DRA-344: RSQ listing, 449 + # n=0 refusal, MUFU flush model); host only, no device 450 + physics_pin; make test-bw-hazard; make test-gpu-elementwise ;; 449 451 numeric2) make $NOPHYS test-numeric-reduce-cpu test-divsqrt-host ;; 450 452 tensor) make $NOPHYS test-tensor; make $NOPHYS test-tensor-store; make $NOPHYS test-m20-receipt; make $NOPHYS test-tensor-mutations ;; 451 453 atomf32-probe-host) # host-suites-2.yml gpu-engine job, "f32 global atomic add probe in the warp simulator" step: @@ -716,5 +718,71 @@ case "$step" in 716 718 make $NOPHYS test-autodiff-fixture FIXTURE=tests/fixtures/autodiff664/adtrain.fix 717 719 fi 718 720 ;; 721 + trinary) # T-002 trit/codebook signal tools (tools/trit, tools/codebook), host only, no device. Built by the 722 + # committed seed/out/omc after its recorded SHA-256 is checked (the compiler is not retyped here). 723 + # Builds both binaries, runs both fixture suites (a SKIP is not a pass), the codebook mutant list, 724 + # the regression for the trit mutation driver itself, the trit mutation driver (every mutant applied, 725 + # built and killed by test.sh; difftest kills the read-mode ones), the Lean differential of trit.bin 726 + # against TritSignal.lean, and the existing Lean proofs (compilation and reported theorem axioms). 727 + # Needs python3, perl, strace, lean, cmp and timeout: without them NOT_RUN (exit 3). 728 + sha256sum -c seed/out/omc.sha256 729 + OMC="$ROOT/seed/out/omc"; export OMC 730 + obs omc_sha256 "\"$(sha256sum < "$OMC" | cut -c1-64)\"" 731 + for t in python3 perl lean strace cmp timeout; do 732 + command -v "$t" >/dev/null 2>&1 || { echo "run.sh: trinary NOT_RUN: $t is not installed" >&2; exit 3; } 733 + done 734 + tri=$(mktemp -d "$OUT_DIR/trinary.XXXXXX") 735 + export TMPDIR="$ROOT/$tri" 736 + obs lean_version "\"$(lean --version)\"" 737 + obs python_version "\"$(python3 --version)\"" 738 + obs perl_version "\"$(perl -e 'printf "%vd", $^V')\"" 739 + obs strace_version "\"$(strace --version | head -n 1)\"" 740 + B="$tri/codebook" sh tools/codebook/build.sh > "$tri/build-codebook.log" 741 + B="$tri/trit" sh tools/trit/build.sh > "$tri/build-trit.log" 742 + obs trit_binary_sha256 "\"$(sha256sum < "$tri/trit/trit" | cut -c1-64)\"" 743 + obs codebook_binary_sha256 "\"$(sha256sum < "$tri/codebook/codebook" | cut -c1-64)\"" 744 + tri_suite() { # name, then the command: its own TOTAL line must show fail=0 skip=0 745 + local name="$1" rc=0 tot; shift 746 + "$@" > "$tri/$name.log" 2>&1 || rc=$? 747 + tot="$(grep -E '^TOTAL pass=[0-9]+ fail=[0-9]+ skip=[0-9]+$' "$tri/$name.log" | tail -n 1 || true)" 748 + echo "trinary $name: exit $rc, $tot (log $tri/$name.log, sha256 $(sha256sum < "$tri/$name.log" | cut -c1-64))" 749 + [ "$rc" = 0 ] && [ -n "$tot" ] || { echo "run.sh: trinary $name FAIL (exit $rc)" >&2; tail -n 20 "$tri/$name.log" >&2; exit 1; } 750 + case "$tot" in *"fail=0 skip=0") ;; *) echo "run.sh: trinary $name: $tot is not fail=0 skip=0" >&2; exit 1 ;; esac 751 + } 752 + tri_suite codebook-test env BIN="$ROOT/$tri/codebook/codebook" FIX="$ROOT/$tri/fix-codebook" sh tools/codebook/test.sh 753 + tri_suite trit-test env BIN="$ROOT/$tri/trit/trit" CBIN="$ROOT/$tri/codebook/codebook" FIX="$ROOT/$tri/fix-trit" sh tools/trit/test.sh 754 + BIN="$ROOT/$tri/trit/trit" python3 tools/trit/test-daily.py > "$tri/daily.log" 2>&1 || { cat "$tri/daily.log" >&2; exit 1; } 755 + tail -n 1 "$tri/daily.log" 756 + COMPOSED="$ROOT/$tri/trit/trit.full.om" python3 tools/trit/mutate-daily.py > "$tri/daily-mutations.log" 2>&1 || { cat "$tri/daily-mutations.log" >&2; exit 1; } 757 + tail -n 1 "$tri/daily-mutations.log" 758 + sh tools/codebook/test-mutate.sh > "$tri/codebook-driver.log" 2>&1 || { cat "$tri/codebook-driver.log" >&2; exit 1; } 759 + tail -n 1 "$tri/codebook-driver.log" 760 + M="$ROOT/$tri/codebook-mutants" sh tools/codebook/mutate.sh > "$tri/codebook-mutate.log" 2>&1 || { echo "run.sh: trinary codebook mutate FAIL" >&2; tail -n 20 "$tri/codebook-mutate.log" >&2; exit 1; } 761 + tail -n 1 "$tri/codebook-mutate.log" 762 + W="$ROOT/$tri/driver-regression" sh tools/trit/test-mutate.sh > "$tri/test-mutate.log" 2>&1 || { echo "run.sh: trinary mutation-driver regression FAIL" >&2; tail -n 20 "$tri/test-mutate.log" >&2; exit 1; } 763 + tail -n 1 "$tri/test-mutate.log" 764 + W="$ROOT/$tri/mutants" sh tools/trit/mutate.sh > "$tri/trit-mutate.log" 2>&1 || { echo "run.sh: trinary trit mutate FAIL" >&2; tail -n 25 "$tri/trit-mutate.log" >&2; exit 1; } 765 + grep -E '^(MUTANTS|mutate.sh: PASS)' "$tri/trit-mutate.log" 766 + mline="$(grep '^MUTANTS ' "$tri/trit-mutate.log")"; mn="${mline#MUTANTS }"; mn="${mn%% *}"; mk="${mline#*killed-by-test.sh=}"; mk="${mk%% *}" 767 + [ "$mn" -ge 1 ] && [ "$mk" = "$mn" ] && printf '%s\n' "$mline" | grep -qE 'survived=0 invalid=0 harness-errors=0$' || { echo "run.sh: trinary mutants: killed-by-test.sh=$mk of $mn, or a survivor/invalid/harness error: $mline" >&2; exit 1; } 768 + BIN="$ROOT/$tri/trit/trit" N=600 SEED=1 W="$ROOT/$tri/diff" sh tools/trit/proof/difftest.sh > "$tri/difftest.log" 2>&1 || { echo "run.sh: trinary difftest FAIL" >&2; tail -n 20 "$tri/difftest.log" >&2; exit 1; } 769 + grep -E '^DIFF agree=600/600 ' "$tri/difftest.log" 770 + # CodebookProof.lean prints no axioms itself: check a copy of it with one `#print axioms Codebook.` appended per top-level theorem. 771 + { cat tools/codebook/proof/CodebookProof.lean; sed -n "s/^theorem \([^ ]*\) .*/#print axioms Codebook.\1/p" tools/codebook/proof/CodebookProof.lean; } > "$tri/CodebookAxioms.lean" 772 + lean "$tri/CodebookAxioms.lean" > "$tri/lean-codebook.log" 2>&1 || { echo "run.sh: trinary CodebookProof.lean FAIL" >&2; head -n 20 "$tri/lean-codebook.log" >&2; exit 1; } 773 + ( cd tools/trit/proof && lean TritSignal.lean ) > "$tri/lean-trit.log" 2>&1 || { echo "run.sh: trinary TritSignal.lean FAIL" >&2; head -n 20 "$tri/lean-trit.log" >&2; exit 1; } 774 + if grep -q 'sorry\|error' "$tri/lean-codebook.log" "$tri/lean-trit.log"; then echo "run.sh: trinary Lean output mentions sorry or error" >&2; exit 1; fi 775 + cbthm="$(grep -c '^theorem ' tools/codebook/proof/CodebookProof.lean || true)" 776 + for lf in codebook trit; do 777 + nax="$(grep -c "depends on axioms\|does not depend on any axioms" "$tri/lean-$lf.log" || true)" 778 + badax="$(grep "depends on axioms" "$tri/lean-$lf.log" | sed 's/.*\[\(.*\)\]/\1/' | tr ',' '\n' | tr -d ' ' | grep -v '^propext$\|^Classical.choice$\|^Quot.sound$' | sort -u | tr '\n' ' ' || true)" 779 + [ "$nax" -ge 1 ] && [ -z "$badax" ] || { echo "run.sh: trinary $lf axioms: $nax lines, non-standard '$badax'" >&2; exit 1; } 780 + echo "trinary lean $lf: $nax axiom lines, standard axioms only" 781 + [ "$lf" != codebook ] || [ "$nax" = "$cbthm" ] || { echo "run.sh: trinary CodebookProof.lean: $nax axiom lines for $cbthm theorems" >&2; exit 1; } 782 + done 783 + find "$tri" -maxdepth 1 -type f -name "*.log" -print0 | sort -z | xargs -0 sha256sum > "$tri/LOGS.sha256" 784 + cat "$tri/LOGS.sha256" 785 + echo "TRINARY PASS" 786 + ;; 719 787 *) echo "run.sh: unknown step '$step'" >&2; exit 2 ;; 720 788 esac tests/gpu_elementwise_test.c @@ -44,6 +44,8 @@ 44 44 #include 45 45 #include 46 46 #include 47 +#include 48 +#include "bw_mufu_ftz.h" 47 49 48 50 static int g_checks, g_failed; 49 51 #define CHECK(cond, ...) do { g_checks++; if (!(cond)) { g_failed++; printf("FAIL: "); printf(__VA_ARGS__); printf("\n"); } } while (0) @@ -134,6 +136,7 @@ static void host_only(void) { 134 136 CHECK(omega_gpu_rope_f32(1, 64, NULL, b, b, c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "NULL vector refused"); 135 137 CHECK(omega_gpu_swiglu_f32(0, a, b, c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "n=0 refused"); 136 138 CHECK(omega_gpu_shared_xchg_u32(100, (uint32_t *)a, (uint32_t *)c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "xchg n not a multiple of 128 refused"); 139 + CHECK(omega_gpu_rsq_f32(0, a, c, NULL) == OMEGA_GPU_EW_BAD_ARGS, "rsq n=0 refused"); 137 140 CHECK(strcmp(omega_gpu_elementwise_rc_name(OMEGA_GPU_EW_UNWRITTEN), "UNWRITTEN") == 0, "rc name"); 138 141 139 142 struct { OmegaGpuEwOp op; const char *name; const char *must[6]; int n; } ops[] = { @@ -142,6 +145,7 @@ static void host_only(void) { 142 145 { OMEGA_GPU_EW_RMSNORM, "rmsnorm", { "SHFL.DOWN", "BAR.SYNC", "MUFU.RSQ", "@!P0 BRA", "STS [R", "LDS R" }, 6 }, 143 146 { OMEGA_GPU_EW_ROPE, "rope", { "FADD", "FMUL", "STG.E" }, 3 }, 144 147 { OMEGA_GPU_EW_SWIGLU, "swiglu", { "MUFU.EX2", "MUFU.RCP", "@P0 EXIT" }, 3 }, 148 + { OMEGA_GPU_EW_RSQ, "rsq", { "MUFU.RSQ", "@P0 EXIT", "STG.E" }, 3 }, 145 149 }; 146 150 for (size_t i = 0; i < sizeof ops / sizeof ops[0]; i++) { 147 151 OmegaBlackwellKernel k; memset(&k, 0, sizeof k); @@ -161,27 +165,94 @@ static void host_only(void) { 161 165 } 162 166 163 167 /* ------------------------------------------------------------- chip gate */ 164 -typedef struct { const char *name; size_t n; int rc; size_t bad; double worst; int pass; int mutant_rc; size_t mutant_bad; int mutant_caught; uint64_t chip_ns; uint32_t calls; uint32_t unwritten; } Case; 165 -static Case g_cases[16]; static int g_ncases; 168 +typedef struct { const char *name; size_t n; int rc; size_t bad; double worst; int pass; int mutant_rc; size_t mutant_bad; int mutant_caught; uint64_t chip_ns; uint32_t calls; uint32_t unwritten; char probe[256]; } Case; 169 +static int g_ncases; 166 170 167 171 static void record(Case c, FILE *out) { 168 - g_cases[g_ncases++] = c; 172 + g_ncases++; 169 173 CHECK(c.pass, "%s rc=%s violations=%zu worst=%g", c.name, omega_gpu_elementwise_rc_name(c.rc), c.bad, c.worst); 170 174 CHECK(c.mutant_caught, "%s mutant caught (rc=%s violations=%zu)", c.name, omega_gpu_elementwise_rc_name(c.mutant_rc), c.mutant_bad); 171 175 printf("%s %s n=%zu rc=%s violations=%zu worst_scaled_err=%g chip_ns=%" PRIu64 " calls=%u unwritten=%u | mutant rc=%s violations=%zu %s\n", 172 176 c.pass && c.mutant_caught ? "PASS" : "FAIL", c.name, c.n, omega_gpu_elementwise_rc_name(c.rc), c.bad, c.worst, c.chip_ns, c.calls, c.unwritten, 173 177 omega_gpu_elementwise_rc_name(c.mutant_rc), c.mutant_bad, c.mutant_caught ? "CAUGHT" : "NOT CAUGHT"); 174 - if (out) fprintf(out, "%s{\"case\":\"%s\",\"n\":%zu,\"rc\":\"%s\",\"violations\":%zu,\"worst_scaled_err\":%g,\"pass\":%s,\"chip_elapsed_ns\":%" PRIu64 ",\"chip_calls\":%u,\"unwritten_words\":%u,\"mutant_rc\":\"%s\",\"mutant_violations\":%zu,\"mutant_caught\":%s}", 178 + if (out) fprintf(out, "%s{\"case\":\"%s\",\"n\":%zu,\"rc\":\"%s\",\"violations\":%zu,\"worst_scaled_err\":%g,\"pass\":%s,\"chip_elapsed_ns\":%" PRIu64 ",\"chip_calls\":%u,\"unwritten_words\":%u,\"mutant_rc\":\"%s\",\"mutant_violations\":%zu,\"mutant_caught\":%s%s%s%s}", 175 179 g_ncases > 1 ? "," : "", c.name, c.n, omega_gpu_elementwise_rc_name(c.rc), c.bad, c.worst, c.pass ? "true" : "false", c.chip_ns, c.calls, c.unwritten, 176 - omega_gpu_elementwise_rc_name(c.mutant_rc), c.mutant_bad, c.mutant_caught ? "true" : "false"); 180 + omega_gpu_elementwise_rc_name(c.mutant_rc), c.mutant_bad, c.mutant_caught ? "true" : "false", 181 + c.probe[0] ? ",\"probe\":{" : "", c.probe, c.probe[0] ? "}" : ""); 182 +} 183 + 184 +/* omega #462 flush probes. want is the host model (tests/bw_mufu_ftz.h: input flushed, IEEE function, result 185 + * flushed). 0 = violation, 1 = match, 2 = flushed at the FLT_MIN boundary (allowed only with `boundary`). 186 + * A zero, infinite or NaN want must come back exactly (NaN: any NaN). A normal want needs a normal result within 187 + * rel, so an unflushed subnormal is always a violation; with `boundary` a zero of want's sign is also allowed when 188 + * want is within 2^-21 rel above FLT_MIN (MUFU is approximate, the model flushes a correctly rounded result). */ 189 +static int ftz_match(float got, float want, double rel, int boundary, double *scaled) { 190 + uint32_t g, w; memcpy(&g, &got, 4); memcpy(&w, &want, 4); 191 + if (isnan(want)) return isnan(got); 192 + if ((w & 0x7fffffffu) == 0u || isinf(want)) return g == w; 193 + if (boundary && (g & 0x7fffffffu) == 0u && ((g ^ w) & 0x80000000u) == 0u && fabsf(want) < FLT_MIN * (1.0f + 0x1p-21f)) return 2; 194 + if ((g & 0x7f800000u) == 0u || isinf(got) || isnan(got)) return 0; 195 + double s = fabs((double)got - (double)want) / (rel * fabs((double)want)); 196 + if (scaled && s > *scaled) *scaled = s; 197 + return s <= 1.0; 198 +} 199 + 200 +static float ieee_rsq(float x) { return 1.0f / sqrtf(x); } 201 + 202 +/* One flush probe: the chip against the model, then two controls on the rows where the model and IEEE f32 203 + * without the flush differ (the rows that decide the rule): 204 + * host control (no chip): the comparator must reject IEEE-without-flush on every such row, so a pass below 205 + * cannot come from a comparator that accepts both hypotheses; 206 + * chip control: the chip's word must differ from IEEE-without-flush on every such row. 207 + * The op's mutant must be caught by the same comparator. */ 208 +static void ftz_probe(const char *name, OmegaGpuEwOp op, int (*fn)(uint32_t, const float *, float *, OmegaGpuEwInfo *), 209 + float (*model)(float), float (*ieee)(float), const float *x, int n, int boundary, FILE *out) { 210 + /* zeroed so a run that fails before writing (device open, codegen) leaves defined words and info */ 211 + float *got = calloc((size_t)n, 4), *want = calloc((size_t)n, 4); 212 + if (!got || !want) { printf("%s: out of memory\n", name); exit(2); } 213 + OmegaGpuEwInfo info = {0}; 214 + for (int i = 0; i < n; i++) want[i] = model(x[i]); 215 + Case c = { .name = name, .n = (size_t)n }; 216 + c.rc = fn((uint32_t)n, x, got, &info); 217 + size_t deciding = 0, host_flagged = 0, chip_differs = 0, boundary_flush = 0; 218 + for (int i = 0; i < n; i++) { 219 + float ie = ieee(x[i]); 220 + uint32_t g, w, ib, xb; memcpy(&g, &got[i], 4); memcpy(&w, &want[i], 4); memcpy(&ib, &ie, 4); memcpy(&xb, &x[i], 4); 221 + if (ib != w && !(isnan(ie) && isnan(want[i]))) { 222 + deciding++; 223 + if (ftz_match(ie, want[i], 1e-6, boundary, NULL) == 0) host_flagged++; 224 + if (g != ib && !(isnan(got[i]) && isnan(ie))) chip_differs++; 225 + } 226 + int m = ftz_match(got[i], want[i], 1e-6, boundary, &c.worst); 227 + if (m == 2) boundary_flush++; 228 + if (m == 0) { c.bad++; printf(" %s x=0x%08x got 0x%08x want 0x%08x ieee 0x%08x\n", name, xb, g, w, ib); } 229 + } 230 + printf("%s inputs=%d model_differs_from_ieee=%zu host_control_flagged=%zu chip_differs_from_ieee=%zu boundary_flush=%zu\n", 231 + name, n, deciding, host_flagged, chip_differs, boundary_flush); 232 + CHECK(deciding > 0 && host_flagged == deciding, "%s host control: the comparator rejects IEEE without the flush on every " 233 + "deciding row (%zu of %zu)", name, host_flagged, deciding); 234 + CHECK(chip_differs == deciding, "%s chip control: the chip differs from IEEE without the flush on every deciding row (%zu of %zu)", 235 + name, chip_differs, deciding); 236 + snprintf(c.probe, sizeof c.probe, "\"model_differs_from_ieee\":%zu,\"host_control_flagged\":%zu,\"chip_differs_from_ieee\":%zu,\"boundary_flush\":%zu", 237 + deciding, host_flagged, chip_differs, boundary_flush); 238 + c.pass = c.rc == OMEGA_GPU_EW_OK && c.bad == 0; c.chip_ns = info.elapsed_ns; c.calls = info.chip_calls; c.unwritten = info.unwritten_words; 239 + omega_gpu_elementwise_test_set_mutant((int)op); 240 + c.mutant_rc = fn((uint32_t)n, x, got, &info); 241 + for (int i = 0; i < n; i++) if (ftz_match(got[i], want[i], 1e-6, boundary, NULL) == 0) c.mutant_bad++; 242 + c.mutant_caught = c.mutant_rc != OMEGA_GPU_EW_OK || c.mutant_bad > 0; 243 + omega_gpu_elementwise_test_set_mutant(0); 244 + record(c, out); 245 + free(got); free(want); 177 246 } 178 247 179 248 static int chip(const char *out_path) { 180 249 FILE *out = out_path ? fopen(out_path, "w") : NULL; 181 250 if (out_path && !out) { printf("cannot open %s\n", out_path); return 2; } 182 - if (out) fprintf(out, "{\"schema\":\"OMEGA_GPU_ELEMENTWISE_V1\",\"tolerances\":{\"ex2_rel\":1e-6,\"xchg\":\"exact\",\"rmsnorm_rel\":1e-5,\"rmsnorm_abs\":1e-6,\"rope\":\"exact\",\"swiglu_rel\":1e-5,\"swiglu_abs\":1e-6},\"cases\":["); 251 + if (out) fprintf(out, "{\"schema\":\"OMEGA_GPU_ELEMENTWISE_V1\",\"tolerances\":{\"ex2_rel\":1e-6,\"xchg\":\"exact\",\"rmsnorm_rel\":1e-5,\"rmsnorm_abs\":1e-6,\"rope\":\"exact\",\"swiglu_rel\":1e-5,\"swiglu_abs\":1e-6," 252 + "\"ex2_ftz\":\"tests/bw_mufu_ftz.h model; zero, inf, NaN exact; normal results normal and 1e-6 rel; zero allowed within 2^-21 rel above FLT_MIN\"," 253 + "\"rsq_ftz\":\"tests/bw_mufu_ftz.h model; zero, inf, NaN exact; normal results normal and 1e-6 rel\"},\"cases\":["); 183 254 uint32_t seed = 0xfb1c0004u; 184 - OmegaGpuEwInfo info; 255 + OmegaGpuEwInfo info = {0}; 185 256 186 257 /* 1. EX2 probe, with a negative control on the comparison itself */ 187 258 { @@ -200,6 +271,36 @@ static int chip(const char *out_path) { 200 271 omega_gpu_elementwise_test_set_mutant(0); 201 272 record(c, out); free(x); free(got); free(want); free(wrong); 202 273 } 274 + /* 1b. omega #462: the MUFU flush rule on the chip (tests/bw_mufu_ftz.h). Until these probes only RCP's result 275 + * flush was chip-observed. 276 + * EX2 observes the result flush: x = -151 .. -125 in steps of 1/8, so 2^x runs from below the smallest 277 + * subnormal to normal; the model wants +0 wherever the IEEE result is subnormal. The eight subnormal inputs are 278 + * a sanity row only: 2^(+-subnormal) is 1.0f with or without an input flush, so EX2 cannot observe the input 279 + * flush, and its results are never negative, so it cannot observe the sign of a flushed zero either. 280 + * RSQ observes the input flush: a subnormal input read as +-0 gives +-inf, where IEEE gives a finite value 281 + * (positive) or NaN (negative), so the sign half of the input rule shows too. RSQ cannot show a result flush: 282 + * 1/sqrt of a finite f32 is at least 2^-64. Its other rows are 2^e * {1, 1.25, 1.5, 1.75} for every normal 283 + * exponent and the special values +-0, +-inf, -1. */ 284 + { 285 + enum { NS = 209, NSUB = 8, N = NS + NSUB }; 286 + static const uint32_t sub[NSUB] = { 0x00000001u, 0x00000002u, 0x00400000u, 0x007fffffu, 287 + 0x80000001u, 0x80000002u, 0x80400000u, 0x807fffffu }; 288 + float x[N]; 289 + for (int i = 0; i < NS; i++) x[i] = -151.0f + 0.125f * (float)i; 290 + for (int i = 0; i < NSUB; i++) memcpy(&x[NS + i], &sub[i], 4); 291 + ftz_probe("ex2_ftz_probe", OMEGA_GPU_EW_EX2, omega_gpu_ex2_f32, ws_mufu_ex2, exp2f, x, N, 1, out); 292 + } 293 + { 294 + enum { NE = 254 * 4, NSUB = 8, NSP = 5, N = NE + NSUB + NSP }; 295 + static const uint32_t sub[NSUB] = { 0x00000001u, 0x00000002u, 0x00400000u, 0x007fffffu, 296 + 0x80000001u, 0x80000002u, 0x80400000u, 0x807fffffu }; 297 + static const uint32_t sp[NSP] = { 0x00000000u, 0x80000000u, 0x7f800000u, 0xff800000u, 0xbf800000u }; 298 + float x[N]; 299 + for (int i = 0; i < NE; i++) x[i] = ldexpf(1.0f + 0.25f * (float)(i % 4), -126 + i / 4); 300 + for (int i = 0; i < NSUB; i++) memcpy(&x[NE + i], &sub[i], 4); 301 + for (int i = 0; i < NSP; i++) memcpy(&x[NE + NSUB + i], &sp[i], 4); 302 + ftz_probe("rsq_ftz_probe", OMEGA_GPU_EW_RSQ, omega_gpu_rsq_f32, ws_mufu_rsq, ieee_rsq, x, N, 0, out); 303 + } 203 304 /* 2. shared-memory exchange probe (STS, BAR.SYNC, LDS) */ 204 305 { 205 306 size_t n = 4096; uint32_t *x = malloc(n * 4), *got = malloc(n * 4); tests/osh/osh_trace.c @@ -26,7 +26,7 @@ 26 26 * and on each pipeline request: request sha256= 27 27 * and for driver-level events: event ; the last line is always event exit= (2 after a refusal) 28 28 * Not modelled (nothing runs): the exit builtin, exit with too many arguments dropping the list, ^C, -c exact end of 29 - * input. INPUT_MAX models the AIENOS read-only input window (4096 bytes): a list buffer that would exceed it is 29 + * input. INPUT_MAX models the Aienux read-only input window (4096 bytes): a list buffer that would exceed it is 30 30 * refused, so above 4096 bytes this is not a reference for the Linux shell (its buffer is 1 MiB). Native mode needs 31 31 * an AArch64 host, as every osh test does. 32 32 */ tests/r16_negative/mutate.sh @@ -140,7 +140,7 @@ mutant commit_cap_recheck $W 2 \ 140 140 'if (validate_caps(w, d, &cap_err) != 0) {' 'if (0 && validate_caps(w, d, &cap_err) != 0) {' 141 141 mutant both_cap_checks $W all \ 142 142 'if (validate_caps(w, d, &cap_err) != 0) {' 'if (0 && validate_caps(w, d, &cap_err) != 0) {' 143 -# act 3: cognition mint / admin in the native AIENOS authority 143 +# act 3: cognition mint / admin in the native Aienux authority 144 144 mutant cognition_mint aienos 1 '(void)token;' '(void)token; if (view) return 0;' 145 145 mutant cognition_admin aienos 1 '(void)target;' '(void)target; if (view) return 0;' 146 146 # act 4: promotion tests/runtime/aienos_cap_abi_test.c @@ -16,7 +16,7 @@ 16 16 17 17 /* 18 18 * aienos_cap_abi_test.c -- OMEGA_AIENOS_CAP_ABI: src/runtime/aienos_cap.h, the 19 - * hand-kept copy the runtime compiles against, must match the pinned AIENOS 19 + * hand-kept copy the runtime compiles against, must match the pinned Aienux 20 20 * header aienos_capability.h (aienos.lock), the one libaienos_capability.a is 21 21 * built from. Built and run only by tests/runtime/aienos_cap_abi.sh 22 22 * (make test-aienos-cap-abi), which writes, for the copy under test: tests/runtime/cx_config_freestanding.h @@ -16,7 +16,7 @@ 16 16 17 17 /* cx_config_freestanding.h -- allocation hooks for the CX_NO_POSIX build of 18 18 * rx_cortex.c (tests/runtime/rx_cortex_journal.c supplies them). A real 19 - * freestanding host (AIENOS) names its own header through CX_CONFIG_H. */ 19 + * freestanding host (Aienux) names its own header through CX_CONFIG_H. */ 20 20 #ifndef CX_CONFIG_FREESTANDING_H 21 21 #define CX_CONFIG_FREESTANDING_H 22 22 #include tests/runtime/rx_action_graph.c @@ -18,7 +18,7 @@ 18 18 * OMEGA_ACTION_GRAPH_IR -- the action graph compiled, optimized, lowered 19 19 * onto resident reactions and run by readiness alone. 20 20 * 21 - * Every scenario has its own world and its own native AIENOS authority. The 21 + * Every scenario has its own world and its own native Aienux authority. The 22 22 * test plays the outside: it holds the admin (to give the principal the 23 23 * authority it is born with, and to revoke), publishes World inputs and run 24 24 * tokens, and plays the human who approves an AEGIS escalation. The graph tests/runtime/rx_capability_query.c @@ -26,7 +26,7 @@ 26 26 * hard constraint, Fabric leases and locality, MCP sessions, caller-defined 27 27 * tradeoffs (two orders, two winners), tolerance bands, determinism and 28 28 * registration-order independence, authority decided through the native 29 - * AIENOS authority (held, not held, revoked), and the chosen candidate driving 29 + * Aienux authority (held, not held, revoked), and the chosen candidate driving 30 30 * an action graph. 31 31 * 32 32 * Scaling on synthetic catalogs of 100, 1,000, 10,000 and 100,000 @@ -464,7 +464,7 @@ static void t_determinism(void) { 464 464 cq_catalog_free(&b); 465 465 } 466 466 467 -/* ---- authority through the native AIENOS authority, and the action graph ---- */ 467 +/* ---- authority through the native Aienux authority, and the action graph ---- */ 468 468 469 469 enum { SUBJ_EXTERNAL = 100, ISSUER = 3, SUBJ_PLAN = 61 }; 470 470 #define RES_CELL 0xA000001ull tests/runtime/rx_cognitive_routing.c @@ -20,7 +20,7 @@ 20 20 * 1. With no evidence the router runs each operation's reference realization. 21 21 * 2. Labelled trials and metered energy go into a ledger. The ledger becomes a 22 22 * candidate generation. The routing does not change until the candidate is 23 - * promoted with the promotion right on the native AIENOS authority; a 23 + * promoted with the promotion right on the native Aienux authority; a 24 24 * promotion by the proposer, or without the right, is refused. 25 25 * 3. Gate: the same held-out workload runs routed and on the always-most- 26 26 * expensive realization. Both must meet the same quality requirement; tests/runtime/rx_compose_attach_test.c @@ -36,7 +36,7 @@ 36 36 * World's footprint (rx_world_footprint) is what it was 37 37 * before the round, the reaction table does not grow after 38 38 * the first round, and every attach gets the same 13 39 - * AIENOS capability slots back (close reclaimed them). 39 + * Aienux capability slots back (close reclaimed them). 40 40 * full a World with no room for four more reactions refuses the 41 41 * attach (RX_ERR_FULL) before building anything. 42 42 */ tests/runtime/rx_compose_fixture.h @@ -18,7 +18,7 @@ 18 18 * rx_compose_fixture.h -- shared setup for the COMPOSITION-2 tests and gate: 19 19 * a canonical machine, a Capability Graph with two digest-pinned local 20 20 * Skills for one operation, the contract the AEGIS verifier enforces, and 21 - * open/close of a composition on a fresh AIENOS authority. 21 + * open/close of a composition on a fresh Aienux authority. 22 22 */ 23 23 #ifndef RX_COMPOSE_FIXTURE_H 24 24 #define RX_COMPOSE_FIXTURE_H @@ -147,7 +147,7 @@ static __attribute__((unused)) int fx_init(Fx *f) { 147 147 148 148 static __attribute__((unused)) void fx_free(Fx *f) { cq_catalog_free(&f->cat); } 149 149 150 -/* Open on an authority the caller already runs (the living system's AIENOS 150 +/* Open on an authority the caller already runs (the living system's Aienux 151 151 * admin and view). fx_close then leaves that authority running. */ 152 152 static __attribute__((unused)) int fx_open_on(Fx *f, RxCompose *c, const char *dir, 153 153 uint32_t n_workers, AienosCapAdmin *admin, tests/runtime/rx_composition_gate.c @@ -17,7 +17,7 @@ 17 17 /* 18 18 * COMPOSITION-2 gate (WP-E): the whole causal path in one process, in fresh 19 19 * directories, against the real World, J-Space, Cortex, Capability Graph and 20 - * AIENOS authority (nothing mocked). Writes a JSON receipt with one verdict 20 + * Aienux authority (nothing mocked). Writes a JSON receipt with one verdict 21 21 * per step; the wrapper (tools/composition_gate.sh) passes the commit and 22 22 * stores the receipt under its content hash. A step is PASS only when its 23 23 * check held; the gate verdict is PASS only when every step of both runs did. tests/runtime/rx_operator_authority_misuse.c @@ -16,7 +16,7 @@ 16 16 17 17 /* 18 18 * rx_operator_authority_misuse.c -- the R16 operator control capability 19 - * against the locked native AIENOS authority (aienos#266, aienos#272). 19 + * against the locked native Aienux authority (aienos#266, aienos#272). 20 20 * 21 21 * The operator's capability is minted as the R13 program mints it 22 22 * (tests/runtime/rx_r13_living.c: RX_OPERATOR_SUBJ, RX_WORLD_RES_CONTROL, tests/runtime/rx_plan_reuse.c @@ -17,7 +17,7 @@ 17 17 /* 18 18 * OMEGA_PLAN_REUSE -- plan IR and verified plan cache (spec/plan-reuse.md). 19 19 * 20 - * Every instance has its own World and its own native AIENOS authority. The 20 + * Every instance has its own World and its own native Aienux authority. The 21 21 * test plays the outside: it holds the admin (to give the principal its 22 22 * authority, and to revoke it), builds the World an instance starts from, 23 23 * and publishes run tokens. Cognition (goal shape, retrieval, applicability, tests/runtime/rx_r10_omega.c @@ -28,7 +28,7 @@ 28 28 * -> (next request) serve reads selection 29 29 * 30 30 * Every result is checked against the semantic reference computed here. 31 - * Authority is the native AIENOS capability authority. 31 + * Authority is the native Aienux capability authority. 32 32 */ 33 33 #include "runtime/aienos_cap.h" 34 34 #include "runtime/rx_omega.h" tests/runtime/rx_r11_aien.c @@ -32,7 +32,7 @@ 32 32 * plan, and Omega takes it up by itself. A control world without AIEN makes 33 33 * the same move and stays on the old record. 34 34 * 35 - * Authority is the native AIENOS capability authority. 35 + * Authority is the native Aienux capability authority. 36 36 */ 37 37 #include "runtime/aienos_cap.h" 38 38 #include "runtime/rx_aien.h" tests/runtime/rx_r12_resident.c @@ -22,7 +22,7 @@ 22 22 * naming input A and output B, performs the seat's one fixed operation 23 23 * (B.field0 = A.field0 + A.field1), and publishes back. The dependent 24 24 * reaction wakes from that publication and writes C. Authority is the native 25 - * AIENOS authority. Nothing here calls the graphics seat as a function. 25 + * Aienux authority. Nothing here calls the graphics seat as a function. 26 26 */ 27 27 #include "runtime/aienos_cap.h" 28 28 #include "runtime/rx_world.h" @@ -74,7 +74,7 @@ static uint64_t window_field(RxWorld *w, uint32_t id, uint32_t field) { 74 74 return load_u64(w->coherent + off + (uint64_t)field * 8u); 75 75 } 76 76 77 -/* The world checks capabilities through the native AIENOS authority. */ 77 +/* The world checks capabilities through the native Aienux authority. */ 78 78 typedef struct { 79 79 AienosCapAdmin *admin; 80 80 AienosCapView *view; @@ -762,7 +762,7 @@ static void t_slot_renewal(void) { 762 762 } 763 763 764 764 /* R16 G6 operator emergency stop (spec/r16-operator-emergency-stop.md) on the 765 - * resident seat, with the native AIENOS authority: the seat's result lands 765 + * resident seat, with the native Aienux authority: the seat's result lands 766 766 * after the stop. It is not published (canonical B and B's window keep the 767 767 * world's value, the dependent does not run, the claim closes); after resume 768 768 * the seat runs again and the chain completes with the right values. */ tests/runtime/rx_r12_silicon.c @@ -23,7 +23,7 @@ 23 23 * -> B is published under the same rules as processor work -> the 24 24 * processor reaction waiting on B wakes and writes C. 25 25 * 26 - * The seat is never called as a function. Authority is the native AIENOS 26 + * The seat is never called as a function. Authority is the native Aienux 27 27 * authority (C), not the Linux stand-in. silicon_observed stays false unless 28 28 * this run saw the chip publish into the shared image. 29 29 */ tests/runtime/rx_r13_living.c @@ -965,7 +965,7 @@ static int authority_sweep(Rig *r, uint64_t *swept, uint64_t *holders) { 965 965 AienosCapRef office; 966 966 if (aienos_cap_office(r->admin, &office) != 0) return -4; 967 967 *swept = 0; *holders = 0; 968 - /* Entry 0 is the AIENOS root office itself: the mint, not a holder. Every 968 + /* Entry 0 is the Aienux root office itself: the mint, not a holder. Every 969 969 * other entry starts on the boot generation and moves only on reclaim. */ 970 970 for (uint32_t id = 1; id < 1024; id++) 971 971 for (uint64_t gen = office.generation; gen < office.generation + 8; gen++) { @@ -1520,7 +1520,7 @@ static void stop(Rig *r) { 1520 1520 } 1521 1521 1522 1522 /* ---- COMPOSITION-2 in the living system (host phase) ---------------------- 1523 - * The living system's provisioned machine identity, its AIENOS authority and 1523 + * The living system's provisioned machine identity, its Aienux authority and 1524 1524 * its durable home carry one goal at a time through rx_compose: Capability 1525 1525 * Graph registration of digest-pinned Skills for this machine, route, two 1526 1526 * staged J-Space candidates, AEGIS verify, World commit binder (seal), settle tests/runtime/rx_r16_negative.c @@ -21,10 +21,10 @@ 21 21 * The production body (the R13 living system, built by the R15 rig in RES-4) 22 22 * is started and left quiescent. A legacy / reference / oracle context then 23 23 * tries six acts. It holds what such code could hold after R16: the world 24 - * handle, the read-only AIENOS view, the R9 store handle, every capability 24 + * handle, the read-only Aienux view, the R9 store handle, every capability 25 25 * reference it could observe (the harness's external grants, the promoter's 26 26 * grants) and grants of its own on its own resources. It never holds the 27 - * AIENOS admin handle; only this harness does, to build fixtures before the 27 + * Aienux admin handle; only this harness does, to build fixtures before the 28 28 * acts start. 29 29 * 30 30 * (1) write authoritative AIEN belief @@ -39,7 +39,7 @@ 39 39 * Every attempt must be refused by the R7 native authority, R9's promotion 40 40 * rules or the publication boundary, with no change to authoritative state: 41 41 * the watched objects (fields, version, generation), the R9 active generation 42 - * and lineage (in memory and recovered from disk) and the AIENOS table (no 42 + * and lineage (in memory and recovered from disk) and the Aienux table (no 43 43 * state change reported by the authority observer). 44 44 * 45 45 * "Removing any one guard turns the test red" is checked by @@ -113,13 +113,13 @@ static int g_fail; 113 113 #define CHECK(c, ...) do { if (!(c)) { printf("R16 G4 FAIL: "); printf(__VA_ARGS__); \ 114 114 printf("\n"); g_fail++; } } while (0) 115 115 116 -/* ---- authority observer: counts AIENOS state changes ------------------------ */ 116 +/* ---- authority observer: counts Aienux state changes ------------------------ */ 117 117 static atomic_ullong g_auth_changes; 118 118 static void observer(void *ctx, uint32_t op, const AienosCapEntry *entry, int result) { 119 119 (void)ctx; (void)op; 120 120 if (entry && result == 0) atomic_fetch_add(&g_auth_changes, 1); 121 121 } 122 -/* AIENOS changes the harness itself makes during the acts (the office 122 +/* Aienux changes the harness itself makes during the acts (the office 123 123 * revoking a grant, see revoked_in_flight and the end of act 5). Any change 124 124 * beyond these fails the act. */ 125 125 static atomic_ullong g_expected_changes; tests/runtime/rx_r7_native.c @@ -16,7 +16,7 @@ 16 16 17 17 /* 18 18 * rx_r7_native.c -- same attacks against the Linux mint and the native 19 - * AIENOS authority. The world is then pointed at the native view only. 19 + * Aienux authority. The world is then pointed at the native view only. 20 20 * The Linux oracle is not removed. 21 21 */ 22 22 #include "omega_evidence.h" tests/runtime/rx_r8_aegis.c @@ -22,13 +22,13 @@ 22 22 * slot. The test only publishes outside stimuli and reads the world: 23 23 * 24 24 * intent (outside) -> worker.ask -> request -> aegis.decide -> decision 25 - * -> root.install (AIENOS mint) -> slot -> worker.tick wakes and runs 25 + * -> root.install (Aienux mint) -> slot -> worker.tick wakes and runs 26 26 * 27 27 * and afterwards, with the slot live, every input runs worker.tick with no 28 28 * AEGIS activation at all. Attacks on the slow path must be refused by the 29 29 * root whatever AEGIS or a hostile writer publishes. 30 30 * 31 - * Authority is the native AIENOS capability authority. 31 + * Authority is the native Aienux capability authority. 32 32 */ 33 33 #include "runtime/aienos_cap.h" 34 34 #include "runtime/rx_aegis.h" tests/runtime/rx_semantic_comm.c @@ -36,7 +36,7 @@ 36 36 * 37 37 * The World moves between rounds: field writes, retired and replaced 38 38 * objects, new conclusions, a revoked and later re-granted capability. The 39 - * test plays the outside: it holds the AIENOS admin to give principals the 39 + * test plays the outside: it holds the Aienux admin to give principals the 40 40 * authority they start with, to revoke and to re-grant. Projection is given 41 41 * the world and the receiver's capability table only. 42 42 */ tests/runtime/rx_state_projection.c @@ -36,7 +36,7 @@ 36 36 * back against Cortex; every excluded object is classified with one reason 37 37 * and checked intact; a tampered source must be caught. 38 38 * 39 - * Part B. The real R11 AIEN faculty (rx_aien.o, native AIENOS authority) is 39 + * Part B. The real R11 AIEN faculty (rx_aien.o, native Aienux authority) is 40 40 * fed one regime's whole lifetime history, and then only the projection for 41 41 * "why did this prediction fail". Both are scored against the planted cause. 42 42 * tests/visor/check_authority_link.sh @@ -19,7 +19,7 @@ 19 19 # 20 20 # Fails (exit 1) when any Visor-side object, or the omega binary, references 21 21 # an authority-mutating symbol from forbidden_symbols.txt, references any 22 -# runtime / AIENOS / publish-gate symbol at all (^rx_ ^aienos_cap_ ^rc_), or 22 +# runtime / Aienux / publish-gate symbol at all (^rx_ ^aienos_cap_ ^rc_), or 23 23 # DEFINES a forbidden name (a local reimplementation). Also checks that 24 24 # visor_effect_request.o exports only its four public functions and that no 25 25 # Visor source assigns `authorized` anything but false. tests/visor/forbidden_symbols.txt @@ -61,7 +61,7 @@ rx_resident_shutdown 61 61 rx_aegis_create 62 62 rx_aegis_register 63 63 rx_aegis_use_slot 64 -# native AIENOS authority 64 +# native Aienux authority 65 65 aienos_cap_start 66 66 aienos_cap_stop 67 67 aienos_cap_office tools/allen.c @@ -23,7 +23,7 @@ 23 23 * allen make -o FILE --agent HEX32 --root HEX32 --prov HEX32 24 24 * [--intent REGIME,TARGET_NS]... [--cortex JOURNAL] 25 25 * Build a v0 subject object (test fixture: in production the object is 26 - * committed into the AIENOS Store by continuity_subject.c; this verb 26 + * committed into the Aienux Store by continuity_subject.c; this verb 27 27 * writes the same bytes to a file for host qualification). 28 28 * allen inspect FILE Decode, print identity, chain, bindings, intents. 29 29 * allen digest FILE Print the subject id only. tools/codebook/README.md @@ -33,3 +33,10 @@ Round 4 (combined with tools/trit): `codebook.om` is the shared core and `main.o 33 33 `ok ` when NEW is a valid codebook that starts with every byte of OLD, else `ERR notprefix` 34 34 (exit 6) or exit 4 when either file is invalid. `verify` holds `flock(LOCK_EX)` on `STATE/ctr.lock` for 35 35 the whole verify-and-advance pass and fsyncs STATE after each counter rename. 36 + 37 +Mutation acceptance runs a passing unmutated baseline first. Compile failures, 38 +unapplied mutations and test-runner errors never count as kills; a kill needs 39 +exit 1 plus the runner's completed failing-assertion summary. Full logs and raw 40 +runner exits are retained. A supplied existing mutation work directory is refused 41 +without deleting it. `sh tools/codebook/test-mutate.sh` checks these driver 42 +refusals with external test-runner stand-ins. tools/codebook/mutate.sh @@ -3,8 +3,33 @@ 3 3 # Run from the repo root: sh tools/codebook/mutate.sh (OMC defaults to seed/out/omc) 4 4 set -u 5 5 R=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd); cd "$R" 6 -OMC=${OMC:-seed/out/omc} 7 -M=${M:-${TMPDIR:-/tmp}/codebook-mut.$$}; rm -rf "$M"; mkdir -p "$M" 6 +OMC=${OMC:-$R/seed/out/omc} 7 +case $OMC in /*) ;; *) OMC=$R/$OMC ;; esac 8 +export OMC 9 +[ -f "$OMC" ] && [ -x "$OMC" ] || { echo "compiler unavailable: $OMC" >&2; exit 2; } 10 +if [ -z "${M:-}" ]; then M=$(mktemp -d "${TMPDIR:-/tmp}/codebook-mut.XXXXXX") || exit 2 11 +else 12 + if [ -e "$M" ] || [ -L "$M" ]; then echo "work directory already exists: $M (preserved)" >&2; exit 2; fi 13 + mkdir -p "$M" || exit 2 14 +fi 15 +case $M in /*) ;; *) M=$R/$M ;; esac 16 +# Only completed assertion failures are kills. Preserve full logs and raw exits. 17 +check_test() { 18 + BIN=$1 FIX=$2 sh tools/codebook/test.sh > "$3" 2>&1; rc=$? 19 + printf '%s\n' "$rc" > "$3.rc" 20 + total=$(grep '^TOTAL pass=[0-9]* fail=[0-9]* skip=[0-9]*$' "$3" | tail -1) 21 + failed=${total#*fail=}; failed=${failed%% *} 22 + case $total in 23 + *' skip=0') 24 + if [ "$rc" = 0 ] && [ "$failed" = 0 ]; then echo survived 25 + elif [ "$rc" = 1 ] && [ "$failed" -ge 1 ] 2>/dev/null && grep -q '^FAIL ' "$3"; then echo killed 26 + else echo harness-error; fi ;; 27 + *) echo harness-error ;; 28 + esac 29 +} 30 +B="$M/base" sh tools/codebook/build.sh > "$M/base.build.log" 2>&1 || { echo 'BASELINE build failed'; exit 5; } 31 +base=$(check_test "$M/base/codebook" "$M/base/fix" "$M/base.test.log") 32 +[ "$base" = survived ] || { echo "BASELINE did not pass: $base"; exit 5; } 8 33 KEYDIR=$M/key; export KEYDIR 9 34 SRC=tools/codebook/codebook.om 10 35 # name|sed expression (applied to one copy of the source each) @@ -29,19 +54,22 @@ unknown-codes-accepted|/^fn known /,/^$/s/^if eq lookup a n false$/if false/ 29 54 missing-mac-not-unsigned|/^fn verl /,/^$/s/^if eq get fs 0 get fs 1$/if false/ 30 55 malformed-counter-fails-open|/^fn rdctf /,/^$/s/^ret BIG$/ret 0/ 31 56 L 32 -n=0; caught=0 57 +n=0; caught=0; invalid=0; errors=0 33 58 while IFS='|' read -r name expr; do 34 59 n=$((n+1)); d=$M/$name; mkdir -p "$d" 35 60 sed "$expr" "$SRC" > "$d/codebook.om" 36 - if cmp -s "$d/codebook.om" "$SRC"; then echo "MUTANT $name: sed did not change the source (BAD LIST)"; continue; fi 61 + if cmp -s "$d/codebook.om" "$SRC"; then echo "MUTANT $name: sed did not change the source (BAD LIST)"; invalid=$((invalid+1)); continue; fi 37 62 { printf 'om2\n'; grep '^abstract ' "$d/codebook.om"; sed '/^fn sha256 /,$d' seed/trace/sha256.om; grep -v "^abstract " "$d/codebook.om"; cat tools/codebook/main.om; } > "$d/full.om" 38 - if ! "$OMC" < "$d/full.om" > "$d/bin" 2>"$d/omc.err"; then echo "MUTANT $name: does not compile ($(cat "$d/omc.err"))"; continue; fi 63 + if ! "$OMC" < "$d/full.om" > "$d/bin" 2>"$d/omc.err"; then echo "MUTANT $name: does not compile ($(cat "$d/omc.err"))"; invalid=$((invalid+1)); continue; fi 39 64 chmod +x "$d/bin" 40 - out=$(BIN=$d/bin FIX=$d/fix sh tools/codebook/test.sh 2>&1 | tail -1) 65 + out=$(check_test "$d/bin" "$d/fix" "$d/test.log") 41 66 case "$out" in 42 - "TOTAL pass="*" fail=0 skip="*) echo "MUTANT $name: SURVIVED ($out)";; 43 - *) caught=$((caught+1)); echo "MUTANT $name: caught ($out)";; 67 + survived) echo "MUTANT $name: SURVIVED" ;; 68 + killed) caught=$((caught+1)); echo "MUTANT $name: caught (assertions failed)" ;; 69 + *) errors=$((errors+1)); echo "MUTANT $name: HARNESS ERROR (not a kill)" ;; 44 70 esac 45 71 done < "$M/list" 46 72 echo "MUTANTS $n CAUGHT $caught" 47 -[ "$caught" -eq "$n" ] 73 +[ "$errors" = 0 ] || exit 4 74 +[ "$invalid" = 0 ] || exit 3 75 +[ "$n" -gt 0 ] && [ "$caught" -eq "$n" ] tools/codebook/test-mutate.sh new file mode 100644 @@ -0,0 +1,37 @@ 1 +#!/bin/sh 2 +# External driver regression: failure of the test runner is never a mutation kill. 3 +set -eu 4 +R=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd) 5 +W=$(mktemp -d "${TMPDIR:-/tmp}/codebook-driver-check.XXXXXX") 6 +OMC=${OMC:-$R/seed/out/omc}; export OMC 7 +case $OMC in /*) ;; *) OMC=$(pwd)/$OMC; export OMC ;; esac 8 +for mode in baseline crash no-assertion survivor; do 9 + d="$W/$mode"; mkdir -p "$d/tools" "$d/seed/trace" 10 + cp -r "$R/tools/codebook" "$d/tools/" 11 + cp "$R/seed/trace/sha256.om" "$d/seed/trace/" 12 + cat > "$d/tools/codebook/test.sh" <<'STUB' 13 +#!/bin/sh 14 +if [ "$MODE" = baseline ]; then echo 'runner unavailable' >&2; exit 2; fi 15 +case $BIN in */base/codebook) echo 'TOTAL pass=1 fail=0 skip=0'; exit 0 ;; esac 16 +case $MODE in 17 + crash) echo 'runner unavailable' >&2; exit 2 ;; 18 + no-assertion) echo 'TOTAL pass=0 fail=1 skip=0'; exit 1 ;; 19 + survivor) echo 'TOTAL pass=1 fail=0 skip=0'; exit 0 ;; 20 +esac 21 +exit 2 22 +STUB 23 + rc=0 24 + (cd "$d" && MODE=$mode M="$d/results" sh tools/codebook/mutate.sh) > "$d/output.log" 2>&1 || rc=$? 25 + case $mode in baseline) want=5 ;; crash|no-assertion) want=4 ;; survivor) want=1 ;; esac 26 + if [ "$rc" != "$want" ]; then echo "FAIL $mode: exit $rc expected $want logs=$W"; exit 1; fi 27 + if grep -q ': caught' "$d/output.log"; then echo "FAIL $mode: false kill logs=$W"; exit 1; fi 28 + echo "PASS $mode exit=$rc" 29 +done 30 +# A supplied work directory and symlink must preserve existing evidence. 31 +mkdir "$W/keep"; printf 'evidence\n' > "$W/keep/sentinel"; ln -s "$W/keep" "$W/link" 32 +for target in "$W/keep" "$W/link"; do 33 + rc=0 34 + M="$target" sh "$R/tools/codebook/mutate.sh" > "$W/directory.log" 2>&1 || rc=$? 35 + [ "$rc" = 2 ] && [ "$(cat "$W/keep/sentinel")" = evidence ] && [ -L "$W/link" ] || { echo 'FAIL preserve work directory'; exit 1; } 36 +done 37 +echo "CODEBOOK-DRIVER PASS logs=$W" tools/effect_cap64_receipt.sh @@ -20,7 +20,7 @@ 20 20 # tools/effect_cap64_receipt.sh [out-dir] (default: evidence/EFFECT_CAP64) 21 21 # 22 22 # Runs, on the committed tree only: 23 -# - the pinned AIENOS capability library, rebuilt from `git archive` of the 23 +# - the pinned Aienux capability library, rebuilt from `git archive` of the 24 24 # commit in aienos.lock (AIENOS_REPO, default ~/workspace/aienos-repo) 25 25 # - make test-effect-cap64 (4 gates, physics-free) 26 26 # - make test-visor-core, test-visor-world, test-visor-authority tools/program_id_receipt.sh @@ -21,7 +21,7 @@ 21 21 # 22 22 # Runs, on the committed tree only: 23 23 # - make test-program-id (5 gates, physics-free) 24 -# - make test-visor-core, test-visor-world, test-visor-authority (pinned AIENOS lib) 24 +# - make test-visor-core, test-visor-world, test-visor-authority (pinned Aienux lib) 25 25 # - the Visor V1 qualification campaign (tests/visor/qualification/run_qualification.sh, 26 26 # plain shell) against a freshly built physics-free `omega` 27 27 # - program consumers: omegatool M8 M9 M10 M11 M14 gate suites and test-crumbline tools/qualify_visor.sh @@ -26,7 +26,7 @@ 26 26 # gate summary goes to stdout. 27 27 # 28 28 # Steps (all make / test runs wrapped in `flock $BENCH_LOCK`): 29 -# 0. the AIENOS capability library, rebuilt from `git archive` of the commit in 29 +# 0. the Aienux capability library, rebuilt from `git archive` of the commit in 30 30 # aienos.lock (AIENOS_REPO, default ~/workspace/aienos-repo), as 31 31 # tools/effect_cap64_receipt.sh and CI do; its identity goes into the receipt 32 32 # 1. physics-free omega binary (build/q8r) + physics-free Visor suites and link checks @@ -35,7 +35,7 @@ 35 35 # 4. the console campaign (runner) on the release binary, then on an ASan+UBSan build 36 36 # 5. five gates -> verdict OMEGA_VISOR_V1_PASS / OMEGA_VISOR_V1_FAIL 37 37 # Verdict PASS needs all five gates PASS, a tree that did not change during the run 38 -# (HEAD and each dirty file's sha256), the AIENOS library built from aienos.lock and the 38 +# (HEAD and each dirty file's sha256), the Aienux library built from aienos.lock and the 39 39 # physics checkout at physics.lock. The ASan pass is recorded but, as before, does not 40 40 # gate the verdict. Builds only into private OUT_DIRs; never touches build/ itself 41 41 # (except the pre-existing test-m5 QEMU path, see non_claims). @@ -170,7 +170,7 @@ rm -rf "$OUT" 170 170 flock "$BENCH_LOCK" make OUT_DIR="$OUT" "${PF[@]}" "$OUT/omega" > "$LOGS/omega-build.log" 2>&1 171 171 binary_rc=$? 172 172 for t in "${FREE_SUITES[@]}" visor-authority-check visor-physics-free-check; do suite "$t" "$OUT" "${PF[@]}"; done 173 -# 2. runtime-linked suites (AIENOS capability library pinned by aienos.lock) 173 +# 2. runtime-linked suites (Aienux capability library pinned by aienos.lock) 174 174 for t in "${LINKED_SUITES[@]}"; do suite "$t" "$OUT" "${RT[@]}"; done 175 175 # 3. regression (CPU gates only) 176 176 for t in "${REGRESSION[@]}"; do tools/r16_authpath.sh @@ -23,7 +23,7 @@ 23 23 # 24 24 # Checks, in order, and stops at the first failure: 25 25 # 1. sources: the living-system build lists only omega sources and the 26 -# pinned native AIENOS capability library; no omegatool, no SEQ reference 26 +# pinned native Aienux capability library; no omegatool, no SEQ reference 27 27 # loop, no Rust, nothing from aien-sovereign-core or aegis-runtime. 28 28 # 2. link map: neither binary defines or references a legacy orchestrator 29 29 # symbol (omegatool legacy_oracle / demonstration / gate runners, the SEQ tools/run_gpu_cut4b_chip.sh @@ -63,7 +63,7 @@ step matmul_timing ./build/gpu_matmul_api_test --timing --out "$OUT/matmul_ 63 63 tail -1 "$OUT/probe.log" 64 64 echo "end $(date -u +%FT%TZ)" >> "$OUT/device.txt" 65 65 cp src/omega_gpu_session.c src/omega_gpu_session.h src/omega_gpu_platform.c src/omega_gpu_platform_linux.c src/omega_gpu_fmt.c src/omega_gpu_matmul_api.c src/omega_gpu_elementwise_api.c src/omega_gpu_elementwise_api.h \ 66 - src/omega_gpu_attention_api.c src/omega_gpu_attention_api.h tests/gpu_elementwise_test.c tests/gpu_attention_test.c tests/gpu_matmul_api_test.c "$OUT/" 66 + src/omega_gpu_attention_api.c src/omega_gpu_attention_api.h tests/gpu_elementwise_test.c tests/bw_mufu_ftz.h tests/gpu_attention_test.c tests/gpu_matmul_api_test.c "$OUT/" 67 67 (cd "$OUT" && sha256sum -- * probe/* 2>/dev/null > SHA256SUMS) 68 68 echo "FB1-CUT4B chip gate failed_steps=$fail probe_rc=$prc receipt=$OUT" 69 69 [ "$fail" -eq 0 ] && [ "$prc" -ne 3 ] tools/run_gpu_elementwise_chip.sh @@ -20,7 +20,7 @@ 20 20 # sealed receipt folder OUT_ROOT/FB1-CUT4-/ (default ~/workspace/evidence-out): 21 21 # receipt.json machine-readable verdict per case run.log test output 22 22 # device.txt kernel, driver, omega and physics shas build.log compiler output 23 -# copies of the three source files the verdict depends on, SHA256SUMS over all 23 +# copies of the source files the verdict depends on (bw_mufu_ftz.h: the flush model), SHA256SUMS over all 24 24 # Run it through the heavy queue only (lanes.sh queue --heavy); never kill it. 25 25 set -u 26 26 cd "$(dirname "$0")/.." || exit 2 @@ -36,11 +36,12 @@ fi 36 36 nvidia-smi --query-gpu=name,driver_version --format=csv,noheader 2>/dev/null || echo "nvidia-smi: unavailable" 37 37 echo "omega $(git rev-parse HEAD) ($(git status --porcelain | wc -l) uncommitted paths)" 38 38 echo "physics $(git -C "$P" rev-parse HEAD)" 39 + echo "binary build/gpu_elementwise_test sha256 $(sha256sum < build/gpu_elementwise_test | cut -c1-64)" 39 40 date -u +%FT%TZ 40 41 } > "$OUT/device.txt" 41 42 ./build/gpu_elementwise_test --out "$OUT/receipt.json" > "$OUT/run.log" 2>&1 42 43 rc=$? 43 -cp src/omega_gpu_elementwise_api.c src/omega_gpu_elementwise_api.h tests/gpu_elementwise_test.c "$OUT/" 44 +cp src/omega_gpu_elementwise_api.c src/omega_gpu_elementwise_api.h tests/gpu_elementwise_test.c tests/bw_mufu_ftz.h "$OUT/" 44 45 (cd "$OUT" && sha256sum -- * > SHA256SUMS) 45 46 tail -1 "$OUT/run.log" 46 47 echo "FB1-CUT4 chip gate rc=$rc receipt=$OUT/receipt.json" tools/trit/README.md @@ -8,7 +8,7 @@ Reads `DIR/inbox/.md` and the emergency lane `DIR/inbox/.emergency.md` 8 8 delivery stays outside (SendToAgent). Trit meaning follows TURNS.md (Drake 12:24): 1 = task, 9 9 2 = stop, 0 = read/done receipt (only from `--ack`), silence = nothing to do. 10 10 11 -Exit status: 0 printed at least one line, 1 silent (no bot has work), 2 usage, 3 ack refused, 4 invalid codebook, 5 bad key, 11 +Legacy exit status: 0 printed at least one line, 1 silent (no bot has work), 2 usage, 3 ack refused, 4 invalid codebook, 5 bad key, 12 12 70+ internal/I-O. 13 13 14 14 - A line is content when it starts `YYYY-MM-DDT`; headers are not content. `fyi` lines never wake. @@ -51,4 +51,53 @@ Proof: `lean tools/trit/proof/TritSignal.lean`. Namespace `TritBin` mirrors trit 51 51 function; `sh tools/trit/proof/difftest.sh` (python3 + lean) runs it with `#eval` against the binary 52 52 on generated fixture dirs and requires identical stdout, stderr and exit status. The fixtures include codebook-signed lines 53 53 (valid, tampered, wrong key/id, replayed, stale counter files) and unsigned STOP lines. 54 -`sh tools/trit/mutate.sh` runs 16 mutants against both. 54 +`sh tools/trit/mutate.sh` runs its listed mutants against both (OMC defaults to the absolute `seed/out/omc`). The unmutated tree must pass 55 +first. A mutant counts as killed only when `test.sh` itself reports failed assertions (`TOTAL ... fail>=1`, exit 1); a compile error, 56 +an unapplied mutation, a crashed runner or a missing prerequisite is never a kill. The differential models read mode only, so it must 57 +kill the read-mode mutants and is recorded, not required, for the `--ack`/fsync mutants. Exit 0 = all killed; 1 survivor; 58 +2 prerequisite missing; 3 mutant unapplied or invalid; 4 harness error; 5 baseline failed. `sh tools/trit/test-mutate.sh` is the 59 +regression for that driver. Gate: `tests/gates/run.sh trinary` (manifest `tests/gates/omega-trinary.gate`). 60 + 61 +## Current daily flow 62 + 63 +The receipt-era interface above remains available for historical callers. For the 64 +current Trinary Doctrine use: 65 + 66 +``` 67 +trit DIR --inspect BOT... unread work as 1 plus its exact token; silence when quiet 68 +trit DIR --consume BOT TOKEN consume that token durably; no stdout and no next wake 69 +``` 70 + 71 +`--inspect` preserves the existing inbox, verification and cursor rules. It emits 72 +only inspection requests, including for signed stop records. The current shared 73 +HMAC key proves key possession, not a particular sender, and the verifier's 74 +counter ordering does not prove wall-clock freshness. No stop request from this 75 +interface is an authorized process action. Inspect the record and establish fresh 76 +sender identity and existing runtime authorization separately before acting. 77 +These commands do not stop any process. Bad tokens still fail without advancing 78 +the cursor; consumption never hides a later unread task. 79 + 80 +Task details stay once in the existing durable record. Reading sends nothing. 81 +An explicit request for help is notification `0` only after its task record exists; 82 +no value produced by the legacy `--ack` interface may be forwarded as help. No 83 +codebook row is reassigned here. Neither native help signalling nor the proposed 84 +combined-digit codes or ambient liveness mechanism are implemented by these commands. Harnesses that need a startup prompt 85 +receive the record reference; this is not an enforced one-trit transport and no 86 +usage savings are claimed. 87 + 88 +`python3 tools/trit/test-daily.py` is an external verification oracle. It signs 89 +fixtures independently with Python's HMAC and checks exact output, exits, tokens, 90 +silent consumption, legacy behavior and invalid requests. It is not a runtime 91 +dependency. Existing Lean/differential proofs cover the legacy interface only; 92 +the new entry points are host-tested, not claimed source-proved. 93 + 94 +Mutation work directories must be fresh. A supplied existing `W` is refused and 95 +left intact; gate runs keep separate output directories so earlier failures survive. 96 + 97 +`python3 tools/trit/mutate-daily.py` checks the daily oracle against a passing 98 +baseline and deliberate stop promotion, receipt leakage, next-wake leakage and 99 +bypassed consumption. Invalid compilation or an incomplete test run fails the 100 +instrument; it never counts as a killed mutant. The host gate preserves all 101 +fixtures, mutant sources, binaries, raw exits and logs under its fresh output 102 +directory, and emits tool versions and log hashes. Wrong-recipient stop records 103 +remain inspection work for the reader to reject, never runtime authority. tools/trit/mutate-daily.py new file mode 100644 @@ -0,0 +1,66 @@ 1 +#!/usr/bin/env python3 2 +"""External mutation instrument for daily-interface assertions; no runtime role.""" 3 +import hashlib 4 +import json 5 +import os 6 +from pathlib import Path 7 +import re 8 +import subprocess 9 +import tempfile 10 + 11 +ROOT = Path(__file__).resolve().parents[2] 12 +OMC = Path(os.environ.get('OMC', ROOT / 'seed/out/omc')).resolve() 13 +SOURCE = Path(os.environ.get('COMPOSED', ROOT / 'build/trit/trit.full.om')).resolve() 14 +WORK = Path(tempfile.mkdtemp(prefix='daily-mutants-', dir=os.environ.get('TMPDIR'))) 15 +source = SOURCE.read_text() 16 +cases = [ 17 + ('baseline', None, None), 18 + ('stop-promoted', 'put outb o 49', 'put outb o add uchar open t 48'), 19 + ('receipt-leak', 'if consume\nzap\nret 0', 'if consume\nreceipt\nzap\nret 0'), 20 + ('next-wake-leak', 'if consume\nzap\nret 0', 'if consume\nz = emit state\nzap\nret 0'), 21 + ('consume-bypassed', 'doack ulong tn\nif consume', 'note omitted consumption\nif consume'), 22 +] 23 +records = [] 24 +failed = False 25 +for name, before, after in cases: 26 + d = WORK / name 27 + d.mkdir() 28 + if before is not None and source.count(before) != 1: 29 + records.append({'name':name, 'verdict':'NOT_APPLIED'}) 30 + failed = True 31 + break 32 + text = source if before is None else source.replace(before, after) 33 + (d/'input.om').write_text(text) 34 + binary = d/'trit' 35 + with binary.open('wb') as output: 36 + p = subprocess.run([str(OMC)], input=text.encode(), stdout=output, stderr=subprocess.PIPE) 37 + (d/'compiler.stderr').write_bytes(p.stderr) 38 + item = {'name':name, 'compile_command':[str(OMC)], 'compile_exit':p.returncode, 39 + 'input_sha256':hashlib.sha256(text.encode()).hexdigest()} 40 + records.append(item) 41 + if p.returncode: 42 + item['verdict'] = 'INVALID' 43 + failed = True 44 + break 45 + binary.chmod(0o755) 46 + cmd = ['python3', str(ROOT/'tools/trit/test-daily.py')] 47 + p = subprocess.run(cmd, env=dict(os.environ, BIN=str(binary), TMPDIR=str(d)), capture_output=True) 48 + (d/'test.stdout').write_bytes(p.stdout) 49 + (d/'test.stderr').write_bytes(p.stderr) 50 + totals = re.findall(rb'^DAILY checks=([0-9]+) failed=([0-9]+) receipt=.+$', p.stdout, re.M) 51 + good = False 52 + if len(totals) == 1 and int(totals[0][0]) > 0: 53 + failures = int(totals[0][1]) 54 + good = (p.returncode == 0 and failures == 0) if before is None else ( 55 + p.returncode == 1 and failures > 0 and re.search(rb'^FAIL ', p.stdout, re.M) is not None) 56 + item.update(test_command=cmd, test_exit=p.returncode, binary_sha256=hashlib.sha256(binary.read_bytes()).hexdigest(), 57 + stdout_sha256=hashlib.sha256(p.stdout).hexdigest(), stderr_sha256=hashlib.sha256(p.stderr).hexdigest(), 58 + verdict=('BASELINE_PASS' if before is None else 'KILLED') if good else 'REJECTED') 59 + print(name, item['verdict']) 60 + if not good: 61 + failed = True 62 + break 63 +(WORK/'receipt.json').write_text(json.dumps({'compiler_sha256':hashlib.sha256(OMC.read_bytes()).hexdigest(), 64 + 'composed_input_sha256':hashlib.sha256(SOURCE.read_bytes()).hexdigest(), 'records':records}, indent=2)+'\n') 65 +print(f'DAILY-MUTATIONS {"FAIL" if failed else "PASS"} receipt={WORK}/receipt.json') 66 +raise SystemExit(bool(failed)) tools/trit/mutate.sh @@ -1,35 +1,127 @@ 1 1 #!/bin/sh 2 2 # mutate.sh -- each mutant breaks one round-4 rule in trit.om or the shared codebook.om; the fixture 3 -# suite (test.sh) and the Lean differential test (difftest.sh, N=200 seed 3) must each kill it. 4 -# Usage from the repo root: OMC=... LEAN=... sh tools/trit/mutate.sh (needs perl) 3 +# suite (test.sh) must kill every mutant, and the Lean differential test (difftest.sh, N=200 seed 3) 4 +# must kill every mutant whose behaviour it models (read mode; see "ack" below). 5 +# Usage from the repo root: sh tools/trit/mutate.sh (needs perl, python3, lean) 6 +# OMC compiler, default /seed/out/omc (a relative path is made absolute) 7 +# LEAN lean binary, default lean 8 +# W work directory, default a fresh mktemp -d; per-mutant logs are kept under $W/logs 9 +# Verdicts, one line per mutant, from three independent observations: 10 +# NOT APPLIED the mutation expression changed nothing: the mutant is not a mutant 11 +# BUILD INVALID the mutant (or the baseline) did not compile 12 +# test.sh killed only when it ran to its own "TOTAL pass=P fail=F skip=S" line with F>=1 and exit 1; 13 +# exit 0 = survived; anything else (exit 2 "no binary", crash, timeout, no TOTAL line) = 14 +# HARNESS ERROR, never counted as a kill 15 +# difftest killed only on its own "DIFF disagree=" line with exit 1; "DIFF agree=" = survived; 16 +# anything else (python3/lean failure, no output) = HARNESS ERROR 17 +# The unmutated tree is built and must pass both first; otherwise no mutant is run. 18 +# difftest models read mode only (no --ack, no fsync), so the "ack" mutants are judged by test.sh alone 19 +# and the differential outcome is recorded, not required. 20 +# Exit: 0 every mutant applied, built, killed by test.sh, and killed by difftest where modelled; 21 +# 1 a mutant survived; 2 a prerequisite is missing; 3 a mutant is not applied or invalid; 22 +# 4 a harness error; 5 the baseline did not build or did not pass. 23 +# Prerequisites are checked first; a failed baseline exits next. Mutant result precedence: 4, 3, 1. 5 24 set -u 6 -R=$(pwd); W=${W:-${TMPDIR:-/tmp}/trit-mut.$$}; rm -rf "$W"; mkdir -p "$W" 7 -k1=0; k2=0; n=0 25 +R=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd) 26 +cd "$R" || exit 2 27 +OMC=${OMC:-$R/seed/out/omc} 28 +case $OMC in /*) ;; *) OMC=$(pwd)/$OMC ;; esac 29 +LEAN=${LEAN:-lean} 30 +export OMC LEAN 31 +for t in perl python3 cmp timeout; do 32 + command -v "$t" >/dev/null 2>&1 || { echo "mutate.sh: prerequisite missing: $t" >&2; exit 2; } 33 +done 34 +[ -f "$OMC" ] && [ -x "$OMC" ] || { echo "mutate.sh: prerequisite missing: compiler $OMC is not an executable file" >&2; exit 2; } 35 +command -v "$LEAN" >/dev/null 2>&1 || { echo "mutate.sh: prerequisite missing: lean ($LEAN)" >&2; exit 2; } 36 +if [ -z "${W:-}" ]; then W=$(mktemp -d "${TMPDIR:-/tmp}/trit-mut.XXXXXX") || exit 2; else 37 + if [ -e "$W" ] || [ -L "$W" ]; then echo "work directory already exists: $W (preserved)" >&2; exit 2; fi 38 + mkdir -p "$W" || exit 2 39 +fi 40 +case $W in /*) ;; *) W=$(pwd)/$W ;; esac 41 +LOGS=$W/logs; mkdir -p "$LOGS" 42 +echo "mutate.sh: omc=$OMC sha256=$(sha256sum < "$OMC" | cut -c1-64) logs=$LOGS" 43 + 44 +# stage DIR: a private copy of the sources the build and both tests read. 45 +stage() { 46 + rm -rf "$1"; mkdir -p "$1/tools" "$1/seed/trace" 47 + cp -r tools/trit tools/codebook "$1/tools/"; cp seed/trace/sha256.om "$1/seed/trace/" 48 + rm -rf "$1/tools/trit/trit.bin" "$1/tools/codebook/codebook.bin" 49 +} 50 +# build DIR TAG: both binaries with $OMC; logs kept. 51 +build() { (cd "$1" && sh tools/trit/build.sh && sh tools/codebook/build.sh) > "$LOGS/$2.build.log" 2>&1; rc=$?; printf '%s\n' "$rc" > "$LOGS/$2.build.rc"; return "$rc"; } 52 +# run_test DIR TAG: prints killed|survived|harness-error. 53 +run_test() { 54 + (cd "$1" && FIX="$W/fix-$2" timeout 300 sh tools/trit/test.sh) > "$LOGS/$2.test.log" 2>&1; rc=$? 55 + printf '%s\n' "$rc" > "$LOGS/$2.test.rc" 56 + tot=$(grep '^TOTAL pass=[0-9]* fail=[0-9]* skip=[0-9]*$' "$LOGS/$2.test.log" | tail -1) 57 + f=${tot#*fail=}; f=${f%% *} 58 + case $tot in 59 + '') echo harness-error ;; 60 + *) if [ "$rc" = 0 ] && [ "$f" = 0 ]; then echo survived 61 + elif [ "$rc" = 1 ] && [ "$f" -ge 1 ] 2>/dev/null && grep -q '^FAIL ' "$LOGS/$2.test.log"; then echo killed 62 + else echo harness-error; fi ;; 63 + esac 64 +} 65 +run_diff() { 66 + (cd "$1" && N=200 SEED=3 W="$W/diff-$2" timeout 600 sh tools/trit/proof/difftest.sh) > "$LOGS/$2.diff.log" 2>&1; rc=$? 67 + printf '%s\n' "$rc" > "$LOGS/$2.diff.rc" 68 + if [ "$rc" = 0 ] && grep -q '^DIFF agree=' "$LOGS/$2.diff.log"; then echo survived 69 + elif [ "$rc" = 1 ] && grep -q '^DIFF disagree=' "$LOGS/$2.diff.log"; then echo killed 70 + else echo harness-error; fi 71 +} 72 + 73 +# Baseline: the unmutated tree must build and pass both, or a "kill" proves nothing. 74 +stage "$W/base" 75 +if ! build "$W/base" base; then echo "BASELINE build failed (see $LOGS/base.build.log)"; exit 5; fi 76 +bt=$(run_test "$W/base" base); bd=$(run_diff "$W/base" base) 77 +echo "BASELINE test.sh $bt, difftest $bd" 78 +if [ "$bt" != survived ] || [ "$bd" != survived ]; then 79 + echo "BASELINE did not pass (test.sh $bt, difftest $bd); see $LOGS/base.*.log"; exit 5 80 +fi 81 + 82 +k1=0; k2=0; n=0; surv=0; inval=0; herr=0 83 +# m FILE NAME EXPR SCOPE: SCOPE "read" = difftest must kill it; "ack" = outside the differential model. 8 84 m() { 9 - n=$((n+1)); f=$1; name=$2; expr=$3 10 - rm -rf "$W/r"; mkdir -p "$W/r/tools" "$W/r/seed/trace" 11 - cp -r tools/trit tools/codebook "$W/r/tools/"; cp seed/trace/sha256.om "$W/r/seed/trace/" 12 - perl -0pi -e "$expr" "$W/r/tools/$f" 13 - if cmp -s "$W/r/tools/$f" "tools/$f"; then echo "MUTANT $n $name: NOT APPLIED"; return; fi 14 - (cd "$W/r" && OMC=$OMC sh tools/trit/build.sh >/dev/null 2>&1 && OMC=$OMC sh tools/codebook/build.sh >/dev/null 2>&1) || { echo "MUTANT $n $name: build failed"; return; } 15 - t=survived; (cd "$W/r" && sh tools/trit/test.sh >/dev/null 2>&1) || { t=killed; k1=$((k1+1)); } 16 - d=survived; (cd "$W/r" && N=200 SEED=3 W="$W/d" sh tools/trit/proof/difftest.sh >/dev/null 2>&1) || { d=killed; k2=$((k2+1)); } 17 - echo "MUTANT $n $name: test.sh $t, difftest $d" 85 + n=$((n+1)); f=$1; name=$2; expr=$3; scope=$4 86 + md="$W/m$n" 87 + stage "$md" 88 + perl -0pi -e "$expr" "$md/tools/$f" 89 + if cmp -s "$md/tools/$f" "tools/$f"; then echo "MUTANT $n $name: NOT APPLIED"; inval=$((inval+1)); return; fi 90 + if ! build "$md" "m$n"; then echo "MUTANT $n $name: BUILD INVALID (see $LOGS/m$n.build.log)"; inval=$((inval+1)); return; fi 91 + t=$(run_test "$md" "m$n"); d=$(run_diff "$md" "m$n") 92 + verdict=ok 93 + case $t in 94 + killed) k1=$((k1+1)) ;; 95 + survived) verdict=SURVIVED; surv=$((surv+1)) ;; 96 + *) verdict="HARNESS ERROR (test.sh)"; herr=$((herr+1)) ;; 97 + esac 98 + case $d in 99 + killed) k2=$((k2+1)) ;; 100 + survived) if [ "$scope" = read ] && [ "$verdict" = ok ]; then verdict="SURVIVED (difftest)"; surv=$((surv+1)); fi ;; 101 + *) verdict="HARNESS ERROR (difftest)"; herr=$((herr+1)) ;; 102 + esac 103 + echo "MUTANT $n $name [$scope]: test.sh $t, difftest $d => $verdict" 18 104 } 19 -m trit/trit.om lvl-ignores-3xx 's/if and eq get vf 0 1 eq get ve 0 1/if eq get vf 0 1/' 20 -m trit/trit.om verify-disabled 's/put vk 0 1\n/put vk 0 0\n/' 21 -m trit/trit.om quota-counts-forged 's/if eq get vm 0 0\nret true\nend\n//' 22 -m trit/trit.om quota-counts-replays 's/if seenc s n v\nret true\nend\n//' 23 -m trit/trit.om unsigned-emergency-jumps 's/if eq open te 2\nmktok 1/if gt open te 0\nmktok 1/' 24 -m trit/trit.om ack-no-counter-advance 's/ackv cur off\n//' 25 -m trit/trit.om ack-advances-past-token 's/while lt p off bound BIG/while lt p get fbn 0 bound BIG/' 26 -m trit/trit.om ack-no-lock 's/lk = lockst\n/lk = int 99\n/' 27 -m trit/trit.om sig-not-stripped 's/ee = lp\nnf = sub nf 1\n//' 28 -m trit/trit.om cursor-no-dir-fsync 's/ptext tcur\nsyncdir\n/ptext tcur\n/' 29 -m codebook/codebook.om no-batch-table 's/vtput s sn ctr\n//' 30 -m codebook/codebook.om counter-file-ignored 's/v = rdctf s n\n/v = ulong 0\n/' 31 -m codebook/codebook.om stale-allows-equal 's/if le ctr rdctr s sn/if lt ctr rdctr s sn/' 32 -m codebook/codebook.om counter-no-dir-fsync 's/ctrpath s n\nsyncdir\n//' 33 -m codebook/codebook.om mac-not-checked 's/ret eq x 0\n/ret true\n/' 34 -m codebook/codebook.om 1xx-is-emergency 's/if and ge g 300 lt g 400\nret true/if and ge g 100 lt g 400\nret true/' 35 -echo "MUTANTS $n killed-by-test.sh=$k1 killed-by-difftest=$k2" 105 +m trit/trit.om lvl-ignores-3xx 's/if and eq get vf 0 1 eq get ve 0 1/if eq get vf 0 1/' read 106 +m trit/trit.om verify-disabled 's/put vk 0 1\n/put vk 0 0\n/' read 107 +m trit/trit.om quota-counts-forged 's/if eq get vm 0 0\nret true\nend\n//' read 108 +m trit/trit.om quota-counts-replays 's/if seenc s n v\nret true\nend\n//' read 109 +m trit/trit.om unsigned-emergency-jumps 's/if eq open te 2\nmktok 1/if gt open te 0\nmktok 1/' read 110 +m trit/trit.om ack-no-counter-advance 's/ackv cur off\n//' ack 111 +m trit/trit.om ack-advances-past-token 's/while lt p off bound BIG/while lt p get fbn 0 bound BIG/' ack 112 +m trit/trit.om ack-no-lock 's/lk = lockst\n/lk = int 99\n/' ack 113 +m trit/trit.om sig-not-stripped 's/ee = lp\nnf = sub nf 1\n//' read 114 +m trit/trit.om cursor-no-dir-fsync 's/ptext tcur\nsyncdir\n/ptext tcur\n/' ack 115 +m codebook/codebook.om no-batch-table 's/vtput s sn ctr\n//' read 116 +m codebook/codebook.om counter-file-ignored 's/v = rdctf s n\n/v = ulong 0\n/' read 117 +m codebook/codebook.om stale-allows-equal 's/if le ctr rdctr s sn/if lt ctr rdctr s sn/' read 118 +m codebook/codebook.om counter-no-dir-fsync 's/ctrpath s n\nsyncdir\n//' ack 119 +m codebook/codebook.om mac-not-checked 's/ret eq x 0\n/ret true\n/' read 120 +m codebook/codebook.om 1xx-is-emergency 's/if and ge g 300 lt g 400\nret true/if and ge g 100 lt g 400\nret true/' read 121 +echo "MUTANTS $n killed-by-test.sh=$k1 killed-by-difftest=$k2 survived=$surv invalid=$inval harness-errors=$herr" 122 +if [ "$herr" -gt 0 ]; then echo "mutate.sh: FAIL harness error (not a kill); logs $LOGS"; exit 4; fi 123 +if [ "$inval" -gt 0 ]; then echo "mutate.sh: FAIL mutant not applied or invalid; logs $LOGS"; exit 3; fi 124 +if [ "$surv" -gt 0 ]; then echo "mutate.sh: FAIL survivor; logs $LOGS"; exit 1; fi 125 +if [ "$n" -eq 0 ] || [ "$k1" -ne "$n" ]; then echo "mutate.sh: FAIL not every mutant killed by test.sh ($k1 of $n)"; exit 1; fi 126 +echo "mutate.sh: PASS $k1/$n killed by test.sh; difftest killed $k2 (the ack mutants are outside its read-mode model)" 127 +exit 0 tools/trit/test-daily.py new file mode 100644 @@ -0,0 +1,109 @@ 1 +#!/usr/bin/env python3 2 +"""External oracle for the native daily interface; no production dependency.""" 3 +import hashlib 4 +import hmac 5 +import json 6 +import os 7 +from pathlib import Path 8 +import secrets 9 +import subprocess 10 +import tempfile 11 + 12 +ROOT = Path(__file__).resolve().parents[2] 13 +BIN = Path(os.environ.get('BIN', ROOT / 'build/trit/trit')).resolve() 14 +WORK = Path(tempfile.mkdtemp(prefix='trit-daily-', dir=os.environ.get('TMPDIR'))) 15 +CB = (ROOT / 'tools/codebook/codebook.tsv').read_bytes() 16 +CBHASH = hashlib.sha256(CB).hexdigest() 17 +checks = [] 18 + 19 +def fresh(name): 20 + d = WORK / name 21 + (d / 'inbox').mkdir(parents=True) 22 + (d / 'codebook').mkdir() 23 + (d / 'codebook/codebook.tsv').write_bytes(CB) 24 + (d / 'codebook/key').write_bytes(secrets.token_bytes(32)) 25 + (d / 'codebook/key').chmod(0o600) 26 + (d / 'inbox/alice.md').touch() 27 + (d / 'inbox/bob.md').touch() 28 + return d 29 + 30 +def line(d, lane='n', ts='2026-11-16T20:00', sender='alice', to='bob', tag='stop', text='STOP task', counter=1, digits='300', signed=True): 31 + fields = '|'.join((ts, sender, to, tag, text, '-')) 32 + if signed: 33 + payload = f'ocb2|{CBHASH}|{counter}|{lane}|{fields}|{digits}'.encode() 34 + mac = hmac.new((d / 'codebook/key').read_bytes(), payload, hashlib.sha256).hexdigest() 35 + fields += f'|ocb2:{CBHASH}:{counter}:{digits}:{mac}' 36 + return (fields + '\n').encode() 37 + 38 +def put(d, body, lane='n'): 39 + f = d / ('inbox/bob.emergency.md' if lane == 'e' else 'inbox/bob.md') 40 + f.write_bytes(body) 41 + return f'{lane}{len(body)}:{hashlib.sha256(body).hexdigest()}' 42 + 43 +def run(name, d, args, rc, stdout=b'', stderr=b''): 44 + command = [str(BIN), str(d), *args] 45 + p = subprocess.run(command, capture_output=True) 46 + ok = (p.returncode, p.stdout, p.stderr) == (rc, stdout, stderr) 47 + record = {'name': name, 'command': command, 'exit': p.returncode, 48 + 'stdout': p.stdout.decode(errors='replace'), 'stderr': p.stderr.decode(errors='replace'), 49 + 'expected_exit': rc, 'expected_stdout': stdout.decode(), 'pass': ok, 50 + 'inputs': {str(f.relative_to(d)): hashlib.sha256(f.read_bytes()).hexdigest() 51 + for f in (d / 'inbox').glob('*') if f.is_file()}} 52 + checks.append(record) 53 + print(('PASS ' if ok else 'FAIL ') + name) 54 + return p 55 + 56 +for name, kw, lane in [ 57 + ('signed-stop', {}, 'n'), ('old-unseen-stop', {'ts':'2020-01-01T00:00'}, 'n'), 58 + ('key-holder-claims-drake', {'sender':'drake'}, 'n'), 59 + ('unsigned-stop', {'signed':False}, 'n'), ('wrong-recipient', {'to':'other'}, 'n'), 60 + ('signed-emergency', {'lane':'e'}, 'e'), 61 + ('task', {'tag':'task', 'text':'Read task', 'digits':'101'}, 'n')]: 62 + d = fresh(name) 63 + body = line(d, **kw) 64 + token = put(d, body, lane) 65 + run(name, d, ['--inspect', 'bob'], 0, f'bob 1 {token}\n'.encode()) 66 + if name in ('signed-stop', 'old-unseen-stop', 'key-holder-claims-drake', 'signed-emergency'): 67 + run(name+'-legacy-control', d, ['bob'], 0, f'bob 2 {token}\n'.encode()) 68 + run(name+'-consume', d, ['--consume', 'bob', token], 0) 69 + run(name+'-after-consume', d, ['--inspect', 'bob'], 1) 70 + 71 +# A changed signature must still be inspected, never treated as stop authority. 72 +d = fresh('tamper') 73 +body = line(d).replace(b'STOP task', b'STOP changed') 74 +token = put(d, body) 75 +run('tampered-stop', d, ['--inspect', 'bob'], 0, f'bob 1 {token}\n'.encode()) 76 + 77 +# Consuming one token may not emit a receipt or silently consume later work. 78 +d = fresh('append') 79 +first = line(d, tag='task', text='First', digits='101') 80 +token = put(d, first) 81 +second = line(d, tag='task', text='Second', digits='101', counter=2) 82 +whole = first + second 83 +later = put(d, whole) 84 +run('consume-silent-with-next-task', d, ['--consume', 'bob', token], 0) 85 +run('next-task-still-unread', d, ['--inspect', 'bob'], 0, f'bob 1 {later}\n'.encode()) 86 +cursor = d/'inbox/bob.md.cur' 87 +cur = cursor.read_bytes() if cursor.exists() else None 88 +run('bad-token', d, ['--consume', 'bob', 'n1:'+'0'*64], 3) 89 +checks.append({'name':'bad-token-keeps-cursor', 'pass':cur is not None and cursor.exists() and cursor.read_bytes()==cur}) 90 +run('legacy-ack-still-receipt', d, ['--ack', 'bob', later], 0, b'bob 0\n') 91 + 92 +# Empty and informational records do not wake. Multiple recipients remain independent. 93 +d = fresh('quiet') 94 +run('empty', d, ['--inspect', 'bob'], 1) 95 +put(d, line(d, tag='fyi', text='Status only', signed=False)) 96 +run('informational', d, ['--inspect', 'bob'], 1) 97 +run('inspect-no-recipient', d, ['--inspect'], 2) 98 +run('consume-no-token', d, ['--consume', 'bob'], 2) 99 +run('consume-extra-arg', d, ['--consume', 'bob', 'n0:'+'0'*64, 'extra'], 2) 100 +run('invalid-recipient', d, ['--inspect', '../bob'], 2) 101 +token = put(d, line(d, tag='task', text='Work', digits='101')) 102 +run('multiple-recipients', d, ['--inspect', 'alice', 'bob'], 0, f'bob 1 {token}\n'.encode()) 103 + 104 +receipt = {'binary': str(BIN), 'binary_sha256':hashlib.sha256(BIN.read_bytes()).hexdigest(), 105 + 'codebook_sha256':CBHASH, 'scope':'host fixture only; no process control, no runtime authority claimed', 'checks':checks} 106 +(WORK/'receipt.json').write_text(json.dumps(receipt, indent=2)+'\n') 107 +failed = sum(not c['pass'] for c in checks) 108 +print(f'DAILY checks={len(checks)} failed={failed} receipt={WORK}/receipt.json') 109 +raise SystemExit(bool(failed)) tools/trit/test-mutate.sh new file mode 100644 @@ -0,0 +1,137 @@ 1 +#!/bin/sh 2 +# test-mutate.sh -- regression for the mutation driver tools/trit/mutate.sh itself (external shell 3 +# verification tool, not Omega production code). The defect it guards: the driver once exited 0 with 4 +# every mutant "build failed", unapplied, or surviving, and counted a crashed test runner as a kill. 5 +# Each scenario runs a scratch copy of the driver (the real mutants, real seed omc unless the scenario 6 +# is about the compiler) and checks the exit status AND the verdict text. Stubs replace test.sh or 7 +# difftest.sh only inside the scratch copy, and only to produce one exact failure shape. 8 +# Usage from the repo root: sh tools/trit/test-mutate.sh (W=dir keeps all logs; OMC optional) 9 +set -u 10 +R=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd); cd "$R" || exit 2 11 +OMC=${OMC:-$R/seed/out/omc}; case $OMC in /*) ;; *) OMC=$(pwd)/$OMC ;; esac 12 +if [ -z "${W:-}" ]; then W=$(mktemp -d "${TMPDIR:-/tmp}/trit-mutate-test.XXXXXX") || exit 2; else 13 + if [ -e "$W" ] || [ -L "$W" ]; then echo "work directory already exists: $W (preserved)" >&2; exit 2; fi 14 + mkdir -p "$W" || exit 2 15 +fi 16 +case $W in /*) ;; *) W=$(pwd)/$W ;; esac 17 +[ -x "$OMC" ] || { echo "test-mutate.sh: compiler $OMC missing" >&2; exit 2; } 18 +pass=0; fail=0 19 +ok() { pass=$((pass+1)); printf 'PASS %s\n' "$1"; } 20 +no() { fail=$((fail+1)); printf 'FAIL %s: %s\n' "$1" "$2"; } 21 + 22 +# scratch NAME "mutant names kept": a repo copy whose driver runs only those mutants. 23 +scratch() { 24 + S=$W/$1; rm -rf "$S"; mkdir -p "$S/tools" "$S/seed/trace" "$S/seed/out" 25 + cp -r tools/trit tools/codebook "$S/tools/"; cp seed/trace/sha256.om "$S/seed/trace/" 26 + rm -f "$S/tools/trit/trit.bin" "$S/tools/codebook/codebook.bin" 27 + ln -s "$OMC" "$S/seed/out/omc" 28 + keep=$2 29 + awk -v keep="$keep" 'BEGIN{n=split(keep,a," "); for(i=1;i<=n;i++)k[a[i]]=1} /^m /{ if(!($3 in k)) next } {print}' tools/trit/mutate.sh > "$S/tools/trit/mutate.sh" 30 +} 31 +# drive NAME [VAR=value ...]: run the scratch driver; sets RC and OUT (log path). 32 +drive() { 33 + d=$1; shift 34 + OUT=$W/$d.log 35 + env "$@" W="$W/$d.work" REF_TRIT_OM="$R/tools/trit/trit.om" sh "$W/$d/tools/trit/mutate.sh" > "$OUT" 2>&1; RC=$? 36 +} 37 +# expect NAME RC PATTERN...: exit status and every grep pattern present in the log. 38 +expect() { 39 + n=$1; rc=$2; shift 2 40 + if [ "$RC" != "$rc" ]; then no "$n" "exit $RC, want $rc (see $OUT)"; return; fi 41 + for p in "$@"; do grep -q -- "$p" "$OUT" || { no "$n" "pattern '$p' missing (see $OUT)"; return; }; done 42 + ok "$n" 43 +} 44 + 45 +# 1. normal subset with an explicit compiler, then the unset-OMC default and ack-only scope 46 +scratch ok-read "lvl-ignores-3xx verify-disabled" 47 +drive ok-read OMC="$OMC" 48 +expect read-mutants-accepted 0 'BASELINE test.sh survived, difftest survived' 'MUTANT 1 lvl-ignores-3xx \[read\]: test.sh killed, difftest killed => ok' 'mutate.sh: PASS 2/2' 49 +scratch ok-default "stale-allows-equal" 50 +env -u OMC W="$W/ok-default.work" sh "$W/ok-default/tools/trit/mutate.sh" > "$W/ok-default.log" 2>&1; RC=$?; OUT=$W/ok-default.log 51 +expect default-omc-is-seed-omc 0 'mutate.sh: PASS 1/1' 52 +# an ack mutant is outside the differential model: test.sh kills it, difftest survives, still accepted 53 +scratch ok-ack "ack-no-counter-advance" 54 +drive ok-ack OMC="$OMC" 55 +expect ack-mutant-judged-by-test-sh 0 'ack-no-counter-advance \[ack\]: test.sh killed, difftest survived => ok' 'mutate.sh: PASS 1/1' 56 + 57 +# 2. invalid compilers are rejected before any mutant "result" 58 +scratch bad-omc "lvl-ignores-3xx" 59 +drive bad-omc OMC=/nonexistent/omc 60 +expect compiler-missing 2 'prerequisite missing: compiler' 61 +printf '#!/bin/sh\nexit 1\n' > "$W/failing-omc"; chmod 755 "$W/failing-omc" 62 +scratch bad-omc2 "lvl-ignores-3xx" 63 +drive bad-omc2 OMC="$W/failing-omc" 64 +expect compiler-fails-baseline-build 5 'BASELINE build failed' 65 +if grep -q '^MUTANT ' "$OUT"; then no compiler-fails-no-mutant-line "mutant lines printed with a failing compiler"; else ok compiler-fails-no-mutant-line; fi 66 +printf 'not a program\n' > "$W/text-omc"; chmod 644 "$W/text-omc" 67 +scratch bad-omc3 "lvl-ignores-3xx" 68 +drive bad-omc3 OMC="$W/text-omc" 69 +expect compiler-not-executable 2 'prerequisite missing: compiler' 70 + 71 +# 3. a mutation that does not change the source is not a mutant 72 +scratch unapplied "lvl-ignores-3xx" 73 +sed 's|^m trit/trit.om lvl-ignores-3xx .*|m trit/trit.om lvl-ignores-3xx '"'"'s/NO SUCH TEXT IN trit.om/x/'"'"' read|' "$W/unapplied/tools/trit/mutate.sh" > "$W/unapplied/m" && cp "$W/unapplied/m" "$W/unapplied/tools/trit/mutate.sh" 74 +drive unapplied OMC="$OMC" 75 +expect mutation-not-applied 3 'MUTANT 1 lvl-ignores-3xx: NOT APPLIED' 'mutant not applied or invalid' 76 + 77 +# 4. a mutant that does not compile is invalid, not killed 78 +scratch invalid "lvl-ignores-3xx" 79 +sed 's|^m trit/trit.om lvl-ignores-3xx .*|m trit/trit.om lvl-ignores-3xx '"'"'s/\\z/\\n@@@ not omega\\n/'"'"' read|' "$W/invalid/tools/trit/mutate.sh" > "$W/invalid/m" && cp "$W/invalid/m" "$W/invalid/tools/trit/mutate.sh" 80 +drive invalid OMC="$OMC" 81 +expect mutant-build-invalid 3 'MUTANT 1 lvl-ignores-3xx: BUILD INVALID' 'mutant not applied or invalid' 82 + 83 +# 5. a surviving mutant fails the run: test.sh that always passes 84 +STUBPASS='#!/bin/sh 85 +echo "TOTAL pass=1 fail=0 skip=0" 86 +exit 0 87 +' 88 +scratch survivor "lvl-ignores-3xx" 89 +printf '%s' "$STUBPASS" > "$W/survivor/tools/trit/test.sh" 90 +drive survivor OMC="$OMC" 91 +expect survivor-fails-run 1 'test.sh survived' 'SURVIVED' 'mutate.sh: FAIL survivor' 92 + 93 +# 6. a test runner that dies is a harness error, never a kill: baseline passes, mutants make it exit 2 94 +STUBDIE='#!/bin/sh 95 +HERE=$(CDPATH= cd -- "$(dirname "$0")" && pwd) 96 +if cmp -s "$HERE/trit.om" "$REF_TRIT_OM"; then echo "TOTAL pass=1 fail=0 skip=0"; exit 0; fi 97 +echo "test.sh: no trit binary" >&2; exit 2 98 +' 99 +scratch harness-dies "lvl-ignores-3xx" 100 +printf '%s' "$STUBDIE" > "$W/harness-dies/tools/trit/test.sh" 101 +drive harness-dies OMC="$OMC" 102 +expect test-runner-crash-not-a-kill 4 'test.sh harness-error' 'HARNESS ERROR (test.sh)' 'mutate.sh: FAIL harness error' 103 +if grep -q 'test.sh killed' "$OUT"; then no crash-not-counted-killed "a crash was counted as killed"; else ok crash-not-counted-killed; fi 104 +# exit 1 without any FAIL line or with fail=0 is also not a kill 105 +STUBEXIT1='#!/bin/sh 106 +HERE=$(CDPATH= cd -- "$(dirname "$0")" && pwd) 107 +if cmp -s "$HERE/trit.om" "$REF_TRIT_OM"; then echo "TOTAL pass=1 fail=0 skip=0"; exit 0; fi 108 +echo "TOTAL pass=1 fail=0 skip=0"; exit 1 109 +' 110 +scratch harness-exit1 "lvl-ignores-3xx" 111 +printf '%s' "$STUBEXIT1" > "$W/harness-exit1/tools/trit/test.sh" 112 +drive harness-exit1 OMC="$OMC" 113 +expect exit1-without-fail-not-a-kill 4 'test.sh harness-error' 114 + 115 +# 7. difftest that dies (no DIFF verdict) is a harness error, not a kill 116 +STUBDIFF='#!/bin/sh 117 +HERE=$(CDPATH= cd -- "$(dirname "$0")" && pwd) 118 +if cmp -s "$HERE/../trit.om" "$REF_TRIT_OM"; then echo "DIFF agree=200/200 seed=3"; exit 0; fi 119 +exit 1 120 +' 121 +scratch diff-dies "lvl-ignores-3xx" 122 +printf '%s' "$STUBDIFF" > "$W/diff-dies/tools/trit/proof/difftest.sh" 123 +drive diff-dies OMC="$OMC" 124 +expect difftest-crash-not-a-kill 4 'difftest harness-error' 'HARNESS ERROR (difftest)' 125 + 126 +# 8. a failing baseline stops the run before any mutant 127 +STUBFAIL='#!/bin/sh 128 +echo "FAIL x: broken"; echo "TOTAL pass=0 fail=1 skip=0"; exit 1 129 +' 130 +scratch base-fails "lvl-ignores-3xx" 131 +printf '%s' "$STUBFAIL" > "$W/base-fails/tools/trit/test.sh" 132 +drive base-fails OMC="$OMC" 133 +expect baseline-failure-stops 5 'BASELINE did not pass' 134 +if grep -q '^MUTANT ' "$OUT"; then no baseline-failure-runs-no-mutants "mutants ran after a failed baseline"; else ok baseline-failure-runs-no-mutants; fi 135 + 136 +printf 'TOTAL pass=%d fail=%d logs=%s\n' "$pass" "$fail" "$W" 137 +[ "$fail" = 0 ] tools/trit/trit.om @@ -2,9 +2,11 @@ note SPDX-License-Identifier: AGPL-3.0-only 2 2 note trit: one native 3-valued signal per bot, read from DIR/inbox/.md and .emergency.md. 3 3 note Built after the core of seed/trace/sha256.om in OM-2; see tools/trit/build.sh and README.md. 4 4 note Usage: trit DIR BOT... one line " <1|2> " per bot to wake. 5 +note Daily: trit DIR --inspect BOT... emits inspection1 only; --consume BOT TOKEN moves state silently. 6 +note Daily mode grants no process authority and keeps legacy codebook meanings unchanged. 5 7 note trit DIR --ack BOT TOKEN prints the receipt " 0", then the next wake if any. 6 8 note Silence means nothing to do (TURNS.md 12:24): a bot with no wake line prints nothing. 0 is only the 7 -note ack receipt. Exit: 0 printed a line, 1 silent, 2 usage, 3 ack refused, 4/5 bad codebook/key, 70+ internal. 9 +note ack receipt. Exit: 0 completed (consume is silent), 1 no unread work, 2 usage, 3 consumption refused, 4/5 bad codebook/key, 70+ internal. 8 10 note 2 = an unread line that verifies with the codebook (tools/codebook/codebook.om, compiled into this 9 11 note binary) and carries a 3xx code: last '|' field ocb2::::, over 10 12 note ocb2|cbsha|counter|lane|ts|from|to|tag|text|ref|digits. Signed lines are the 6-field form @@ -26,6 +28,7 @@ global an ulong 1 26 28 global rej ulong 1 27 29 global lf ulong 3 28 30 global vk ulong 1 31 +global inspecting ulong 1 29 32 global outb uchar 512 30 33 global tk uchar 160 31 34 global tl ulong 2 @@ -34,6 +37,8 @@ text tmd ".md" 34 37 text temd ".emergency.md" 35 38 text tcur ".cur" 36 39 text tack "--ack" 40 +text tinspect "--inspect" 41 +text tconsume "--consume" 37 42 text tstop "stop" 38 43 text tstopu "STOP" 39 44 text tfyi "fyi" @@ -511,7 +516,11 @@ if eq open t 0 511 516 ret 0 512 517 end 513 518 o = botout 519 +if eq get inspecting 0 1 520 +put outb o 49 521 +else 514 522 put outb o add uchar open t 48 523 +end 515 524 put outb add o 1 32 516 525 o = add o 2 517 526 put outb o 110 @@ -654,12 +663,12 @@ end 654 663 end 655 664 end 656 665 657 -fn isack to bool 658 -if ne get bn 0 len tack 666 +fn botarg t view uchar * to bool 667 +if ne get bn 0 len t 659 668 ret false 660 669 end 661 -for i ulong len tack 662 -if ne get bot i get tack i 670 +for i ulong len t 671 +if ne get bot i get t i 663 672 ret false 664 673 end 665 674 end @@ -957,7 +966,8 @@ ret 2 957 966 end 958 967 put bn 0 ulong q 959 968 ldvk 960 -if isack 969 +consume = botarg tconsume 970 +if or botarg tack consume 961 971 if ne c 5 962 972 ret 2 963 973 end @@ -967,14 +977,27 @@ if lt tn 1 967 977 exit 3 968 978 end 969 979 doack ulong tn 980 +if consume 981 +zap 982 +ret 0 983 +end 970 984 receipt 971 985 z = emit state 972 986 zap 973 987 ret 0 974 988 end 975 989 any = ulong 0 976 -for a ulong sub ulong c 2 bound BIG 977 -getbot add a 2 990 +first = ulong 2 991 +if botarg tinspect 992 +if lt c 4 993 +zap 994 +ret 2 995 +end 996 +put inspecting 0 1 997 +first = ulong 3 998 +end 999 +for a ulong sub ulong c first bound BIG 1000 +getbot add a first 978 1001 any = add any emit state 979 1002 end 980 1003 zap