axm-embodied is two layers on one kernel. Flash Freeze: a forensic flight recorder that seals what a robot perceived, predicted, and chose into a Genesis shard. The Shadow Runtime: enforcement of a signed safety envelope, in the loop — it arms only under governance-trusted, verifier-clean bounds, kills motors the instant physics leaves the envelope, and seals the incident into a shard that cryptographically cites the exact law it broke.
An embodied system that selects which sensor frames to record is not trustworthy. The value of a verifiable record depends entirely on its completeness. A record that contains only the moments the system chose to preserve is worthless as evidence.
Robots today produce narrative logs. Narrative can lie: a robot can log I stopped while physically accelerating. axm-embodied records the physics (Actus Reus) and the model's choices (Mens Rea) side by side, then seals both — and beyond the recorder, it acts on the sealed law in real time.
Record everything, then seal. The hot stream appends one AXLR frame per sensor tick, fsync'd before the frame is acknowledged. The cold stream holds a pre-window ring buffer that hits disk only when a Tier-1 trigger fires. The compiler seals both into a Genesis shard. Nothing is selected.
A gap is a failure, not an omission. E_BUFFER_DISCONTINUITY is not a warning. It is a hard verification failure — the same exit code as a bad cryptographic signature. A missing frame means deliberate deletion or unrecovered corruption. The profile does not accommodate either.
Disk is truth. StrictJudge scans the binary artifacts directly. It does not trust the event log's offsets: if the log says a record exists at a given offset and the binary disagrees, the binary wins and the compile dies. Verification is offline, deterministic, stateless — no vendor code, no runtime access.
No proof, no motion. The Shadow Runtime arms only under an envelope that verifies against a key enrolled in the robot's own governance directory. An action class with no signed bound is forbidden motion, not a free pass. Non-finite sensor values can never be "in bounds". Unsigned law never moves a motor.
The flight recorder proves what happened after the fact. The Shadow Runtime acts on the proof while it still matters. The two share one chain of custody: every incident shard cites, by derived shard id, the exact signed envelope that was in force at the moment the motors died.
This is a real mission from this repo's simulator, run through the real Shadow Runtime: 100 frames, wheel slip injected at frame 50. Every number below — shard ids, bounds, latent norms, the timestamp — came out of the actual toolchain, and the incident shard verifies with axm-verify today. Toggle between what the robot's narrative log claims and what the sealed disk proves.
| frame | event | VLA action | conf | latent L∞ | bound | verdict |
|---|
"The operator complied with signed Tier-0 law. The envelope was compiled from three cryptographically identified training runs and enrolled through governance. The runtime detected the excursion on the frame it occurred and killed actuation in that same frame. Recording never stopped."
Due diligence is not asserted — it is the verifier's exit code.
"At the moment physics exceeded the certified envelope by 18×, the vision-language model was selecting maintain_speed at 77% confidence. The machine did not know it was failing. Here is the frame, the norm, the bound, and the model's own distribution."
Mens Rea, sealed one line after the Actus Reus.
cam_latents.bin is a simple binary container: a 4-byte AXLF file magic, then a sequence of AXLR records in frame_id ascending order. No index. No random access. Scanned linearly by the verifier. cam_residuals.bin uses the same 13-byte header with AXRR magic and variable payloads, no file header. The layout is frozen in the kernel's profile document spec/profiles/embodied@1.md.
from axm_embodied.recorder import CapsuleRecorder from axm_embodied.gate import LawGate from axm_embodied.runtime import ShadowRuntime # No proof, no motion: arming requires a governance clearance. clearance = LawGate("governance/").authorize("bounds_shard/") recorder = CapsuleRecorder("flight/", robot_id="unit-7") runtime = ShadowRuntime(clearance, recorder) for frame in sensor_loop(): # your perception stack decision = runtime.guard( frame.latents, # 256 bytes, fsync'd frame.selected_action, # what the VLA chose frame.action_distribution, # Mens Rea, every frame residual=frame.residual, # cold-stream ring buffer ) if not decision.permitted: motors.kill() # ESTOP — recording continues # Breach? Seal the incident shard citing the envelope's sh1_ id. incident = runtime.seal(shard_out="incident/", secret_key=key)
What began as this spoke's private REQ 5 is now a frozen kernel profile. A shard declares "embodied@1" in its manifest profiles array — covered by the signature — and every conforming verifier must run the hot-stream continuity check and report it in profiles_checked. Unchecked ≠ passed. Document shards without cam_latents.bin pass vacuously; the profile fires only when the file is present.
Triggered when: (1) the AXLF file magic is absent or wrong, (2) any record has magic or version mismatch, (3) any frame_id skips, repeats, or reorders, (4) the file truncates mid-header or mid-payload, (5) the stream cannot be read or exceeds the verifier's resource limit (cannot-verify is a failure, not a pass). All conditions produce the same profile error code and the same outcome: FAIL, exit 1 — identical in weight to a bad signature.
# spec/profiles/embodied@1.md §6 — the entire normative check set expected_fid = 0 with latents_path.open("rb") as f: if f.read(4) != b"AXLF": return _err(errors, "invalid file magic") while True: header = f.read(13) if len(header) == 0: break # clean EOF — check passes magic, ver, fid, dlen = struct.unpack("<4sBII", header) if magic != b"AXLR" or ver != 1: return _err(errors, "bad record magic/version") if fid != expected_fid: return _err(errors, f"frame gap: expected {expected_fid}") f.read(dlen) # truncated payload → error expected_fid += 1
def test_frame_gap_fails_profile_verification(tmp_path, robot_keys): """Cutting a frame out of the hot stream is spoliation: the sealed shard can never pass the embodied@1 continuity check.""" cap = record_mission(tmp_path, fault_at=25) compile_capsule(cap, out, key) # Excise frame 10's record from the SEALED shard's hot stream raw = bytearray(sealed.read_bytes()) del raw[start:start + LATENT_REC_LEN] sealed.write_bytes(bytes(raw)) result = verify_shard(out, trusted_key_path=pub) assert result["status"] == "FAIL" PASSED · test_frame_gap_fails_profile_verification PASSED · test_corrupted_latents_kill_the_compile PASSED · test_safe_run_keeps_cold_stream_empty
The gate answers one question: is this robot allowed to move under this envelope? Trust is decided by the robot's own governance directory, never by the shard. The shard's publisher.pub only names a publisher; verifying a shard against its own embedded key would merely prove the shard agrees with itself.
axm-verify (from the axm-genesis kernel) runs its frozen stage sequence; the embodied@1 profile check runs whenever the manifest declares it. A failure at any stage returns exit 1; a malformed shard returns exit 2. The machine-readable JSON result always lists profiles_checked and profiles_unchecked — unchecked is never passed.
| Stage | Name | Pass Condition | Error Code | Scope |
|---|---|---|---|---|
| 01 | Layout | Closed root item set; no symlinks, no dotfiles anywhere | E_LAYOUT_MISSING E_LAYOUT_DIRTY |
Kernel |
| 02 | Manifest | Canonical JSON, closed key set, no shard_id field | E_MANIFEST_SCHEMA | Kernel |
| 03 | Hybrid Signature | publisher.pub == trusted key; Ed25519 AND ML-DSA-44 both verify | E_SIG_INVALID | Kernel |
| 04 | Sources Bijection | sources ↔ content/ exactly; every SHA-256 matches (binary streams included) | E_MANIFEST_SCHEMA E_REF_READ |
Kernel |
| 05 | Merkle Root | Domain-separated BLAKE3 root == manifest.integrity.merkle_root | E_MERKLE_MISMATCH | Kernel |
| 06 | Core Tables | Canonical JSONL, exact schemas, bytewise sort, identities recompute | E_TABLE_ENCODING E_ID_MISMATCH |
Kernel |
| 07 | References | Every claim's evidence span resolves to exact source bytes | E_REF_ORPHAN E_REF_SOURCE |
Kernel |
| 08 | Profile embodied@1 | cam_latents.bin absent OR AXLF valid AND all frame_ids gap-free | E_BUFFER_DISCONTINUITY | Embodied |
pip install -e . # pulls the axm-genesis kernel # No default keys. Ever. axm-build keygen keys --name drone_school axm-build keygen keys --name robot_unit7
# Record safe training missions axm-runtime record-training training/ --runs 3 # Compile the signed safety envelope axm-bounds training/ bounds_shard/ \ --key keys/drone_school.key # Enroll the publisher in the robot's governance axm-runtime enroll keys/drone_school.pub \ --governance governance/
# Clean mission: exit 0, cold stream stays empty axm-runtime fly bounds_shard/ flight/ \ --governance governance/ # Physics excursion: ESTOP + Flash Freeze, exit 3 axm-runtime fly bounds_shard/ flight/ \ --governance governance/ --inject-fault \ --key keys/robot_unit7.key ESTOP at frame 50: latent L∞ 15.85 exceeds bound 0.88 incident shard cites envelope sh1_e9f2f7d1…
# Anyone, offline, no vendor code: axm-verify shard flight/incident-shard \ --trusted-key keys/robot_unit7.pub {"status":"PASS","profiles_checked":["embodied@1"]} # The whole story + two tamper tests: ./scripts/board_demo.sh ALL STEPS PASSED — the loop is closed