interplane.Get Omega
Read in your language

physics-mv

FORGE: request-bound machine realization, providers and verification for AienOS. Host, simulated and GB10 hardware paths have separate evidence.

Brought by drakestapleton

branch main Branches Tags History

physics-mv / README.md

138 lines · 17884 bytes Raw Blame History Source

Source · Walkthrough · Replay receipt · Issues · Actual tags

PHYSICS

Two things live here: the FORGE machine realization layer (C), and the historical Atlas / PHYSICS boot artifacts (AArch64 assembly) with their evidence. FORGE turns a verified Omega meaning into a concrete realization on the machine at hand (today the CPU and the NVIDIA GB10 GPU; a simulated analog provider exists for testing). It realizes and, once a real backend exists, will lower; today its "lowering" is a labelled simulation that copies the IR (DRA-176), and it is not a security gatekeeper: AEGIS verifies, and Aienux owns the trusted substrate. This repository also holds nvrm/, the small C client that drives the GB10 directly through the open NVIDIA kernel interface (no CUDA).

Part of Sovereign Intelligence (SI). SI's repository index lists it under "CUDA++ runtime" (ADR 0045).

Status 2026-10-19: research-grade, pre-alpha. FORGE's realize-and-verify seam and its descriptor contract pass their gates. The boot artifacts are qualified in an emulator (QEMU) only and have not booted natively on the DGX Spark. The native memory design for the Spark is a design document, not code.

ATLAS AWAKENS. AIEN PROPOSES. OMEGA DEFINES. FORGE REALIZES. AEGIS VERIFIES. HARDWARE ACTS. EVIDENCE TEACHES.

Historical PHYSICS_* milestone names (for example PHYSICS_BOOT) are unchanged in evidence. The subsystem role was renamed FORGE by ADR 0014 in aien-architecture. The repository itself is still named physics: the planned rename to forge (aien-architecture CURRENT_EXECUTION_PLAN.md, step A2) has not been done.

How it works / how I built it: a small result you can reproduce

Problem. A backend that lowers an Omega meaning to machine code (none exists here yet; see Mechanism, step 2) must not be the party that declares the code safe for a machine. FORGE therefore proposes a realization and AEGIS verifies it. Only a verified realization reaches the GPU client (nvrm/). ADR 0014 records this boundary.

Mechanism.

  1. A ForgeRealizationRequest carries a program digest, an opcode count, IR bytes and a target machine descriptor.
  2. forge_realize checks the descriptor digest, copies the IR into an aligned code buffer as a lowering simulation, and computes request, code and realization digests. Real lowering is not implemented yet (tracked in DRA-176). The result is labelled FORGE_LOWERING_SIMULATED, and forge_realization_is_compiled answers 0 for it, so it is not counted as a compiler or native-code effect by that predicate. The predicate refuses a buffer that holds the IR bytes at any offset, with any padding, or that is a prefix of the IR; it is a set of necessary conditions, not a proof that a compiler ran (a byte-swapped or split copy passes it). tests/run_forge_aegis_host_gates.sh checks all of this and fails on each of its mutant controls.
  3. aegis_verify_realization recomputes the request digest and checks code size, machine limits and descriptor binding. The request digest covers the program digest, opcode count, target descriptor digest, IR size and a SHA-256 of the IR bytes, so a result realized from one IR does not verify against a request that carries another. It refuses a lowering label outside NONE/SIMULATED/COMPILED, and a COMPILED label unless forge_realization_is_compiled answers 1, so it never verifies a copy labelled COMPILED. It keeps a copy of the label it verified, and the verification token covers that copy; forge_submit_realization refuses a realization whose label no longer matches it (the token's key is public, so this is an integrity check, not authentication).
  4. forge_submit_realization accepts only a verified realization, and refuses before any NVRM call otherwise. On the GB10 it copies the code into GPU memory and submits a pushbuffer that only releases a completion semaphore: the code buffer is never executed. Its ForgeExecutionEvidence says so (code_executed = false, lowering_kind = the sealed label). The historical seam evidence evidence/m19r_gate3_forge_seam_evidence.json (FORGE_TYPED_BOUNDARY_ENFORCED) predates these fields; it proves a typed, verified submission reached the GPU and a completion marker came back, not that FORGE code ran (DRA-176).

Limitation and failed approach. Until b0f7308 (physics#53/#54), verification took the request but never compared it with the result. A valid result realized for program A therefore also verified for program B. The host test tests/test_forge_aegis_host.c now refuses that replay. The AEGIS token is a public constant: an integrity marker, not authentication.

Evidence classes. The host seam is implemented and gated, and needs no GPU. The analog provider is a simulation. The boot receipts are from QEMU. None of these is GB10 execution. For the GPU tutorial see CUDA++ (aien-dev/CUDApp).

The worked lesson narrates each stage with its source and runs tests/gates/run.sh forge-aegis offline: exit 0 with FAILED=0 (13 checks at the lesson's commit; the gate prints today's total), including NEG_RESULT_REPLAYED_TO_OTHER_PROGRAM_REFUSED. The replay record shows a GPU-free host result.

Current state

Research-grade and pre-alpha.

What is where

PathWhat it is
forge/FORGE in C: descriptor, realize, the V2 substrate serializer (forge/v2/), the realization forms (forge/form/) and the simulated analog provider (forge/analog-sim/)
nvrm/Native GB10 client over the open NVIDIA kernel interface, plus its lifecycle and submission-visibility gates
m15/, m16/Milestone 15 and 16 code for the native accelerator path (GB10 sysfs access, native submission, the GPU wait primitive)
*.s, physics.bin, atlas*.bin, build.sh, m2_build.sh, run_m2_gates.shMilestone 2 boot artifacts (AArch64 assembly) and their build and QEMU gates
m3/Milestone 3 (PHYSICS_EFFECTS): effect broker, receipt ledger, its build and QEMU gates
third_party/nvidia-open-580.173.02/The NVIDIA open driver headers used by nvrm/, with their own COPYING and SHA256SUMS
contracts/Draft machine contract for the native DGX Spark (not canonical)
docs/Specs and designs (FORGE V2, native frame authority, Physics Zero benchmarks, the test pipeline)
evidence/Receipts and raw logs. Add only: old receipts are never edited
tests/Gate scripts; tests/gates/ holds the gate manifests the Spark judge runs
tools/Host tools in C and shell (m2tool, the QEMU inspector)

How this fits with the other repositories

nvrm_channel_n (2026-10-20, omega L136) opens up to three extra command queues (GPFIFO channels) in the same channel group and address space as the first; nvrm_channel is nvrm_channel_n(rm, 0), unchanged. Measured on the GB10: two queues side by side give no speed gain for 27B decode (omega docs/numeric/GPU_CHANNELS.md).

Standing rules

Per ADR 0024 (aien-architecture, accepted 2026-10-01): Rust is scaffolding, Omega is the destination, and C is used only where hardware justifies it, with assembly only where measured. In this repository that is the C of FORGE and nvrm/, and the AArch64 boot artifacts. No Python (the old Python harness was removed; tools are C or shell). No CUDA toolkit or CUDA library dependence: the GB10 is driven natively through its open kernel interface. No systemd. Offline builds. Never overwrite old receipts.

Build and verify

Needs host gcc and make, the AArch64 binutils and compiler (aarch64-linux-gnu-gcc, -ld and -objcopy by default; override with CC, LD, OBJCOPY, or CROSS for the M3 build), QEMU for AArch64 (qemu-system-aarch64), socat (the QEMU inspector uses QMP) and jq.

tests/gates/run.sh <step> is the one entry point. It runs the same script as the gate manifest of that name. Some steps need sibling checkouts next to this one: ../omega for analog-sim, form0 and gate34-writer, and ../aien-architecture for m3. They exit 3 with a message if the sibling is missing.

git clone https://github.com/aien-dev/physics-mv physics
git clone https://github.com/aien-dev/omega-mv omega
git clone https://github.com/aien-dev/aien-architecture-mv aien-architecture
cd physics
tests/gates/run.sh forge-v2           # FORGE V2 known-answer tests
tests/gates/run.sh forge-aegis        # AEGIS verifier binds a result to its request; submit refusals before any GPU call
tests/gates/run.sh analog-sim         # simulated analog provider vs digital oracle
tests/gates/run.sh form0              # FORM0 realization-form gates (simulated results only)
tests/gates/run.sh gate34-writer      # Gate 3/4 receipt writer, no GPU
tests/gates/run.sh gb10-lock          # GPU lock helper, scratch lock file, no GPU
tests/gates/run.sh zero-disk-secrets  # no plaintext .env files in the tree
tests/gates/run.sh m2                 # M2 PHYSICS_BOOT in QEMU, rebuilt from source
tests/gates/run.sh m3                 # M3 PHYSICS_EFFECTS in QEMU, in a temporary copy
make host-tests-m16                   # m16 GPU wait primitive: host test plus 3 mutants that must be caught
make test-nvrm-buddy                  # nvrm 2 MiB-block count per buddy zone, from a recorded table

Last run of these on main aecb9d3, on the DGX Spark, 2026-10-19: every one exited 0. The counts each script printed: forge-v2 6 passed, forge-aegis 13 of 13, analog-sim 14, form0 16, gate34-writer 47, gb10-lock 9, m2 15 gates, m3 19 of 19, and make host-tests-m16 killed 3 of 3 mutants. These runs were not recorded as receipts; the Spark judge's signed results are in aien-receipts. make test-nvrm-buddy came later (DRA-351, 2026-11-16) and was not part of that run.

./run_m2_gates.sh leaves the committed receipt untouched unless --write-receipt is passed, which is only for a recorded requalification decision.

Gates that need the real GB10 run on the DGX Spark one at a time and are never killed mid-run: forge-gate34 (tests/run_forge_gates.sh), m15, m16-requal, nvrm-lifecycle and submission-visibility. They take the GPU lock (/tmp/aien-gb10.lock) through tests/gb10_lock.sh, which skips it when the caller already holds it (the runner sets AIEN_GB10_LOCK_HELD=1, or a parent process holds the lock). A gate that locked again would wait on its own parent forever (physics#70, merged 2026-10-18). tests/test_gb10_lock.sh (gate PHYSICS-GB10-LOCK, no GPU) checks this.

How a pull request is tested

Since 2026-10-16 the DGX Spark is the only test judge for pull requests (aien-architecture ADR 0033, phase 3). Its gates are the manifests in tests/gates/. On 2026-10-18 the hosted test workflows were removed (physics#69). The one workflow left, .github/workflows/aien-verification.yml, does not build or test this code: it fetches the Spark's signed result from aien-receipts and verifies it. The verdict of record is the commit status "AIEN Verification (Spark)". docs/PIPELINE.md explains how a pull request is tested and how the ready-to-merge label leads to a merge.

Evidence notes

Contributing

Open a pull request with the command you ran and its output. Do not edit committed receipts or binaries without the matching rebuilt evidence. A pull request merges only after the Spark judge passes it and a maintainer adds the ready-to-merge label. Who built what is in CONTRIBUTORS.md. Contact: aien@aienos.com.

Crumbs

This repo used the Crumb Protocol (RFC-0001): each directory carries a .crumb file (what the directory is for, its rules, and a backfilled history). Crumbs are retired from the active workflow (DRA-97, 2026-11-07): no gate or workflow checks them, and reading, writing or refreshing a crumb is not a step of any change. The .crumb files stay as history. Backfilled history (marked as such, not live whispers) is in docs/crumbs/BACKFILL.md.

License

Apache License 2.0 with LLVM Exceptions, see LICENSE. The NVIDIA headers in third_party/nvidia-open-580.173.02/ keep NVIDIA's own license terms (MIT except where that file notes otherwise), see COPYING.

Human-Directed Agentic Engineering

Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, architecture, constraints, acceptance criteria, and stopping points; agents implement, execute checks, diagnose failures, and revise within those boundaries. Human review retains responsibility for claims, acceptance, and release decisions. This describes current development, not a retrospective claim about historical experiments or receipts.

For the documented method and a systems-software case study, see Gregory M. Kurtzer, *Ginux: Building an Independent Kernel That Runs Linux Userspace through Human-Directed Agentic Engineering* (2026), https://doi.org/10.5281/zenodo.23682548.