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/aien/blob/main/docs/TEACHING.md # aien aien-dev/aien Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien / docs / TEACHING.md` 59 lines · 6520 bytes Raw Blame History Rendered 1 # How it works: one objective through the microjob admission kernel 2 3 This lesson follows one synthetic objective through the only evaluation flow implemented on `main`: the seeded Omega admission kernel for Aien #13 ([docs/GOAL_MICROJOBS.md](GOAL_MICROJOBS.md)). It covers the expected verdict, the refusals, and what the evidence does not show. The B0 contract, the source map, `inventory/` and `guard/` are still planned (see [PHASES.md](PHASES.md) and [PLAN.md](PLAN.md)). This lesson does not stand in for them. 4 5 ## The problem 6 7 Aien keeps one persistent objective across many small jobs, some run by a model. A planner or model that reports its own success cannot be trusted to decide what counts as done. The design separates **proposing** from **admitting**: workers and models append events, and one small deterministic program decides from the plan and the journal alone which events are admitted. 8 9 ## The mechanism 10 11 - **Identity, memory and authority stay outside.** The kernel holds no identity and writes no Cortex memory or runtime authority. The journal is the local replay log of one objective, not a second memory store (ADR 0022 owns durable memory; the Cortex writer does not exist yet). The boundary table is in [GOAL_MICROJOBS.md § Boundary](GOAL_MICROJOBS.md#boundary). 12 - **The kernel** is [`src/goal_microjobs/kernel.om`](../src/goal_microjobs/kernel.om), compiled by [`scripts/goal_microjobs/build.sh`](../scripts/goal_microjobs/build.sh) with the pinned seeded compiler. It reads a header record, node records and event records as decimal words on stdin. It prints the derived state (`100`/`101`/`102`/`103` lines) or refuses with `199 seq code` and exits with that code. 13 - **Admission rules** are in the event table of [GOAL_MICROJOBS.md § Records](GOAL_MICROJOBS.md#records-local-replay-abi-canonical-adapter-below). For example: a VERIFY is admitted only from the node's named verifier, never from the worker, and only when its digest equals the result. A DISPATCH is admitted only when every dependency is done and the budget can fund the reservation. 14 - **The gate** [`tests/goal_microjobs/gate.sh`](../tests/goal_microjobs/gate.sh) runs the 12-node synthetic acceptance objective (concurrent nodes, a model failure with retry, a SIGKILL'd writer, an owner correction that resets exactly nodes 3, 7–12). It then rebuilds the kernel nine times, each with one rule deliberately broken, and requires every broken kernel to be caught. 15 16 ### Why these choices 17 18 - **Seeded `.om`, one compiler pin.** The decision logic is first-party Omega, built by a compiler that rebuilds from seed-0. The build refuses any other compiler digest, so a replay cannot pass with a different compiler. 19 - **Refusal codes, not booleans.** Each rule has its own exit code (33 wrong state, 34 stale generation, 39 wrong verifier, …), so a mutant that drops one rule shows up as a wrong code. 20 - **Limitation, recorded at the time:** the historical compiler was an untracked build artifact, so the 2026-10-22 recipe ended `BLOCKED` on a fresh clone ([GOAL_MICROJOBS.md § Reproduce](GOAL_MICROJOBS.md#reproduce)). The replay below rebuilds it from seed instead. 21 22 ## Replay (offline, no model, no GPU) 23 24 Requirements: Linux aarch64 (the compiler emits arm64 ELF), POSIX `sh`, `bash`, `git`, `python3`, `sha256sum`. No network after cloning, no account, no model. 25 26 ```sh 27 set -eu 28 git clone https://github.com/aien-dev/aien.git aien-lesson 29 git clone https://github.com/aien-dev/omega-mv.git omega-seed 30 git -C aien-lesson checkout --detach `c149760e8722ed943abcc5e3c7a33e2065b4036c` 31 # 1. Rebuild the historical compiler from seed-0 at the commit that published it. 32 git -C omega-seed worktree add --detach ../omega-29b1 `29b12760f4c962606411d6bf25032aedef063301` 33 (cd omega-29b1 && rm seed/out/omc && sh seed/omega-from-seed.sh) # ends RC=0 34 sha256sum omega-29b1/seed/out/omc # `191b776ef98821597c3e30655da6d680a9b66edbc9ceaca3c39c61ea6df098e9` 35 # 2. Lay it out where build.sh expects it, under the pinned Omega checkout. 36 git -C omega-seed worktree add --detach ../omega-c434 `c434565c67552c0b01df2d7f76c1a04287c70560` 37 T=omega-c434/build/L574/toolchain 38 mkdir -p "$T/build/bootstrap" "$T/seed/omc" "$T/tools" 39 cp omega-29b1/seed/out/omc "$T/build/bootstrap/omc" 40 cp omega-29b1/seed/omc/omc.om "$T/seed/omc/omc.om" # `8608fa11f6a2cf1c50db22d871eef16b00d5bc719bc1a222cc3e456984ac5ebf` 41 git clone https://github.com/aien-dev/omega-bridge.git 42 git -C omega-bridge show `e461b7a`:tools/verify-elf.sh > "$T/tools/verify-elf.sh" # `afe24b29f105241f268fbaf3bfdd8e010c790a13b8f807de1263f92aacca76cd` 43 # 3. Run the gate, writing outside the checkout. 44 OMEGA_WORKTREE="$PWD/omega-c434" GM_RUN_ROOT="$PWD/run" bash aien-lesson/tests/goal_microjobs/gate.sh 45 ``` 46 47 **Expected:** exit 0 and one line `PASS /offline-