LOT rootless on Slurm (release candidate 3) drawn as one computer: one Slurm job on one compute node, its cores, memory, disks and sockets, and every part of a proof tree as an hrun instance, with no root anywhere. It replays the rc3 tree’s 12th Slurm job (2026-11-25, 01:14–02:57Z) on the Lean-Eval problem two_ninety_theorem, cut when the data was read, 50 s before the job’s clean stop.
把 Slurm 上的无 root LOT(第 3 个发布候选版)画成一台计算机:一个计算节点上的一个 Slurm 作业,它的核、内存、磁盘和套接字,以及证明树的每个部件作为 hrun 实例运行,全程没有 root。上面重放的是 rc3 树的第 12 个 Slurm 作业(2026-11-25 01:14–02:57Z,Lean-Eval 题目 two_ninety_theorem),截至读取数据的时刻,即该作业干净停止前 50 秒。
This browser could not start WebGL, so the 3D room is replaced by this schematic. The replay, the panels and the report still work.此浏览器无法启动 WebGL,3D 机房改为下面的示意图。重放、面板和正文仍然可用。
Drag to orbit; + / − (buttons or keys), pinch or Ctrl/⌘ + wheel (in full screen the wheel alone) to zoom. Click a part to read about it.拖动旋转;用 + / − 按钮或按键、双指或 Ctrl/⌘ + 滚轮缩放(全屏时直接用滚轮)。点击部件查看说明。
Network modes tints each part by the network hrun gives it: none (no route at all), nat (slirp4netns, with private ranges, the metadata address and the node unreachable) or the node’s own network (the job’s processes; the CLIs only toward TCP 443, 53 and the gate).网络模式按 hrun 给出的网络为每个部件着色:none(完全没有路由)、nat(slirp4netns,私有网段、元数据地址和节点不可达)或节点自身网络(作业自身的进程;CLI 只能连 TCP 443、53 和 gate)。
The room is one compute node of the cluster’s cpu partition. The two plates in the middle are its two sockets: 112 physical cores, each drawn as a pair of hardware threads (CPU c and c+112), 224 CPUs in all. The tree runs as one Slurm job that holds 160 of them and 720 GiB of the node’s 869 GiB; the other 64 CPUs (grey) belong to other jobs or sit idle. Nothing in the job runs as root. The job’s own processes sit on the control deck above: the in-job driver, the controller T with its gate, hrun’s broker and the agent CLIs. Every other part is an hrun instance with its own namespaces and cgroup: the desks in the box group over socket 0, the sandboxes S and checkers Tw in the U group over socket 1, the run-workers in front, and lot-sched, lot-gitd, hpsearchd and the node pack on the back shelf. The front row is the hrun book as one 720 GiB memory bank, with the job’s private local disk behind it. The network boundary is on the left; the cluster (Slurm’s controller, the login host, an attempt node and NFS) is on the right.
这个机房是集群 cpu 分区里的一个计算节点。中间两块板是它的两个插槽:112 个物理核,每个核画成一对硬件线程(CPU c 与 c+112),共 224 个 CPU。树作为一个 Slurm 作业运行,占用其中 160 个 CPU 和节点 869 GiB 中的 720 GiB;其余 64 个 CPU(灰色)属于其他作业或空闲。作业里没有任何东西以 root 运行。作业自身的进程在上方的控制台上:作业内驱动、带 gate 的控制器 T、hrun 的 broker 和 agent CLI。其余每个部件都是有独立命名空间和 cgroup 的 hrun 实例:插槽 0 上方 box 组里的 desk,插槽 1 上方 U 组里的沙箱 S 和检查器 Tw,前面的 run-worker,以及后排架子上的 lot-sched、lot-gitd、hpsearchd 和节点包。前排是画成一条 720 GiB 内存条的 hrun 账本,后面是作业私有的本地磁盘。左边是网络边界,右边是集群(Slurm 控制器、登录主机、尝试作业节点和 NFS)。
Each core shows what books it now. hrun leases CPU ids by load, least-booked first and never exclusively, so leases overlap and a core rises for each extra booking. Every packet is one recorded event, one model request at its recorded time, or one per-minute count spread over its minute (labelled). It travels the channel it really used: the control channel between T and its broker, a desk’s road (an hrun exec socket), the gate’s per-desk socket, lot-gitd’s or lot-sched’s socket, the Tw relay’s mutual-TLS socket, a file on the local disk or on NFS, or TCP 443 to the model provider. The memory bank fills with the sampled use and the booked share of each part, and the knowledge towers fill as the stores grow.
每个核显示此刻预订它的是什么。hrun 按负载出租 CPU id,最少被预订者优先,从不独占,所以租约会重叠,每多一个预订,核就升高一格。每个数据包是一个记录事件、一个按记录时间发出的模型请求,或一个在其分钟内摊开的每分钟计数(已标注)。它沿真实使用的通道移动:T 与其 broker 之间的控制通道、desk 的通道(hrun exec 套接字)、gate 的逐 desk 套接字、lot-gitd 或 lot-sched 的套接字、Tw relay 的双向 TLS 套接字、本地磁盘或 NFS 上的文件,或到模型提供方的 TCP 443。内存条按每部分的采样用量和预订份额填充,知识塔随存储增长而升高。
This version of LOT moves 33 kinds of data. The room groups them into nine packet kinds, one shape and one color each. The trust family matters most: only the green gems carry records that can make a proof count, and only T writes them.
这个版本的 LOT 传送 33 种数据,机房把它们归为九类数据包,每类一种形状、一种颜色。最要紧的是信任归属:只有绿色宝石形的包承载能让证明生效的记录,而且只有 T 写入它们。
| Packet数据包 | Data types数据类型 | Typical channel典型通道 | Trust信任 |
|---|
--exclusive, never requeued, USR1 600 s before the time limit. hrun’s batch shell starts the node step, and hrun’s step supervisor runs the in-job driver. The driver stages the bundles (each file checked), writes the node pack, restores K6, T’s state and lot-sched’s state from the NFS mirrors, and starts T. A job never continues itself: the next job restores from the mirrors on whatever node it gets.u_gib), and T’s host room the remaining 371 for the box and the run-workers. hrun never oversubscribes memory: a lease that does not fit now is refused at once, never queued. CPUs go to the least-booked ids, as affinity sets plus a CFS quota where a Spec asks for one.--exclusive,从不重新排队,到期前 600 秒发 USR1。hrun 的批处理 shell 启动节点 step,hrun 的 step 监督进程运行作业内驱动。驱动暂存 bundle(逐文件校验),写出节点包,从 NFS 镜像恢复 K6、T 的状态和 lot-sched 的状态,然后启动 T。作业从不自行续跑:下一个作业在分到的任意节点上从镜像恢复。u_gib),T 的主机房间得到其余 371,给 box 和 run-worker。hrun 从不超额分配内存:当下放不下的租约立即被拒绝,从不排队。CPU 分给最少被预订的 id,以亲和集合加上 Spec 要求时的 CFS 配额实现。Agents write untrusted Lean, so LOT trusts no executor that runs it. In this version one login uid runs every process, so the roles are separated by namespaces, mount views, seccomp, Landlock and network modes, not by other uids. hrun gives every instance the same rules. G1: its own user, pid, mount, ipc, uts, cgroup and network namespaces, an empty bounding set, NoNewPrivs and exactly one pinned seccomp filter. G2: protected roots are never writable, and never visible to an untrusted instance. G3: no host proc and no host cgroupfs. G4: network none, loopback or nat only. G5: secrets only in the environment. G6: every bundle verified by sha256 when staged. G7: a new pid namespace for every exec. The Trust boundaries overlay draws the cages: teal for trusted parts, orange for untrusted executors, red for untrusted builders, grey for untrusted services, coral for agents, and blue for what runs outside the job.
agent 写的 Lean 不可信,所以 LOT 不信任任何运行它的执行体。这个版本只有一个登录 uid 运行所有进程,所以角色之间靠命名空间、挂载视图、seccomp、Landlock 和网络模式隔离,而不是靠不同的 uid。hrun 给每个实例同样的规则。G1:独立的 user、pid、mount、ipc、uts、cgroup 和网络命名空间,清空的边界能力集,NoNewPrivs,以及恰好一个固定的 seccomp 过滤器。G2:受保护根永不可写,且对不可信实例不可见。G3:没有主机 proc 和主机 cgroupfs。G4:网络只能是 none、loopback 或 nat。G5:秘密只放在环境变量里。G6:每个 bundle 暂存时按 sha256 校验。G7:每次 exec 一个新的 pid 命名空间。信任边界叠加层把隔离画成笼子:青色为可信部件,橙色为不可信执行体,红色为不可信构建者,灰色为不可信服务,珊瑚色为 agent,蓝色为作业之外运行的部分。
| Executor执行体 | uid | Namespaces命名空间 | Network网络 | Syscall filter / privileges系统调用过滤 / 权限 | File access文件访问 |
|---|---|---|---|---|---|
| Agent session (CLI)agent 会话(CLI) | the login uid, mapped to itself登录 uid,映射为自身 | hostns: own user, pid, ipc and mount namespaces; a root of the fence’s paths onlyhostns:独立 user、pid、ipc、mount 命名空间;根中只有围栏允许的路径 | the node’s: TCP 443, 53, the gate and proxy ports only (Landlock)节点网络:只有 TCP 443、53、gate 与代理端口(Landlock) | no capability, NoNewPrivs无 capability、NoNewPrivs | its fence paths; commands only through its desk’s road围栏内路径;命令只经其 desk 的通道 |
| Deskdesk | a nominal desk uid名义 desk uid | all seven; each exec again in its own user, mount and pid namespace全部七种;每次 exec 再进入独立 user、mount、pid 命名空间 | nat (slirp4netns) | the box profile, then a second filter per execbox 配置,之后每次 exec 再加一层过滤 | its own directory, scratch and tmp; inputs read-only; its gate and search sockets自己的目录、临时区与 tmp;输入只读;自己的 gate 与检索套接字 |
| Run-worker | its desk’s nominal uid其 desk 的名义 uid | all seven全部七种 | nat, as its desknat,同其 desk | hrun’s default profilehrun 默认配置 | scratch below its desk’s root; Lean inputs and the node pack read-only; reached only through T’s exec socket其 desk 根下的临时区;Lean 输入与节点包只读;只能经 T 的 exec 套接字到达 |
| Sandbox S沙箱 S | a nominal job uid名义作业 uid | all seven; lotsup-rt as PID 1全部七种;lotsup-rt 为 PID 1 | none | S’s pinned profileS 的固定配置 | writes only its sbx/ (24 GiB budget); ctl/ read-only只写自己的 sbx/(预算 24 GiB);ctl/ 只读 |
| Tw relay / checkerTw relay / checker | 0 inside (the relay); the checker a second nominal uid内部 0(relay);checker 为第二个名义 uid | all seven; the checker in its own pid and mount namespace, keys masked全部七种;checker 在自己的 pid 与 mount 命名空间中,密钥被遮蔽 | none; T reaches the relay over a unix socket with mutual TLS 1.3无;T 经 unix 套接字上的双向 TLS 1.3 访问 relay | hrun’s default profile; landrun around the checkerhrun 默认配置;checker 外加 landrun | K6, the sealed K15 tools and S’s export read-only (K11)K6、密封的 K15 工具与 S 的导出只读(K11) |
| lot-sched | a nominal service uid名义服务 uid | all seven全部七种 | none | the default allow-list with socket() for AF_UNIX only默认白名单,socket() 只允许 AF_UNIX | only its state directory只有自己的状态目录 |
| lot-gitd | a nominal lot-git uid名义 lot-git uid | all seven全部七种 | none | hrun’s default profilehrun 默认配置 | the tree’s repositories; refuses to start if K6, T’s state, a key or a credential is in view树的仓库;若视图中有 K6、T 的状态、密钥或凭据则拒绝启动 |
| hpsearchd | a nominal service uid名义服务 uid | all seven全部七种 | none | hrun’s default profilehrun 默认配置 | its index (sums checked before serving); never a tree file自己的索引(服务前校验和);从不看到树的文件 |
| Official final check官方终检 | a nominal uid, in its own Slurm attempt job名义 uid,在独立的 Slurm 尝试作业中 | all seven全部七种 | none | hrun’s default profilehrun 默认配置 | the checker and the checked-out tree read-only; its attempt OUT read-write检查器与检出的树只读;本次尝试的 OUT 可写 |
The trusted side rests on a few named rules. K6 is the write-once trusted store, and only T writes it. K10 binds a verdict to its own dispatch record. K11 is Tw’s safe read of an export, into one private buffer. K15 are the sealed tools, staged from the site’s pins. Rule G says git runs on the tree’s repositories only inside lot-gitd: a desk never talks to lot-gitd, T asks it to fetch the desk’s commits with fsck. lot-sched never writes a verdict, a dispatch record or a trusted store. credsync writes access tokens without refresh tokens, so a tree can never refresh or spend the host’s refresh token. One limit is accepted: everything shares one trust domain, so a kernel escape from a user namespace would reach the tree’s files and keys.
可信侧建立在几条有编号的规则上。K6 是一次写入的可信存储,只有 T 写入。K10 把判定绑定到它自己的派发记录。K11 是 Tw 对导出的安全读取,读入唯一的私有缓冲。K15 是密封工具,从站点固定的版本暂存。规则 G:树的仓库上的 git 只在 lot-gitd 内运行;desk 从不与 lot-gitd 通信,由 T 请它在开启 fsck 的情况下取回 desk 的提交。lot-sched 从不写判定、派发记录或可信存储。credsync 写入不含刷新令牌的访问令牌,因此树永远无法刷新或动用主机的刷新令牌。有一个限制是接受的:所有东西共享一个信任域,若有人从用户命名空间逃逸到内核,就能触及树的文件与密钥。
LOT is mostly Python. hrun, its sandbox layer, uses only the standard library, and the S supervisor is a small static C program. The source is in a private repository. These are the modules behind each part of the room.
LOT 主要用 Python 编写。它的沙箱层 hrun 只用标准库,S 的监督程序是一个小的静态 C 程序。源码在私有仓库中。下表列出机房各部分背后的模块。
| Part部件 | Modules模块 |
|---|---|
| Launcher, in-job driver, mirrors启动器、作业内驱动、镜像 | tools/lot-tree-rt lean_option_tree/infra/rt/mirror.py lean_option_tree/infra/rt/book.py hrun/src/hrun/backends/slurm.py |
| hrun: broker, leases, cgroups, namespaces, NAThrun:broker、租约、cgroup、命名空间、NAT | hrun/src/hrun/broker.py hrun/src/hrun/place.py hrun/src/hrun/cg.py hrun/src/hrun/launch.py hrun/src/hrun/view.py hrun/src/hrun/seccomp.py hrun/src/hrun/nat.py |
| Controller T, gate, dispatch控制器 T、gate、派发 | lean_option_tree/app/controller.py lean_option_tree/algo/engine.py lean_option_tree/algo/gate/server.py lean_option_tree/infra/exec/gate_transport.py lean_option_tree/uctl/rtservices.py lean_option_tree/uctl/dispatch.py lean_option_tree/uctl/sjobs.py |
| Specs of every role各角色的 Spec | lean_option_tree/infra/rt/specs.py lean_option_tree/infra/rt/oneshot.py |
| Box, desks, sessionsbox、desk、会话 | lean_option_tree/infra/exec/rtbox.py lean_option_tree/infra/exec/procs.py lean_option_tree/infra/exec/runtime.py |
| Run-workers and the host roomrun-worker 与主机房间 | lean_option_tree/infra/rt/runworker.py lean_option_tree/infra/exec/runyield.py lean_option_tree/infra/exec/dispatch.py |
| lot-sched | lean_option_tree/sched/core_rules.py lean_option_tree/sched/core_model.py lean_option_tree/sched/lotsched/daemon.py lean_option_tree/infra/rt/sched.py |
| Sandbox S沙箱 S | lean_option_tree/u/sbxrt.py lean_option_tree/u/sbxshape_rt.py lean_option_tree/u/lotsup/lotsup.c |
| Trusted checker Tw可信检查器 Tw | lean_option_tree/u/twrt.py lean_option_tree/u/twhost.py lean_option_tree/u/relay.py lean_option_tree/u/tw.py lean_option_tree/u/k11.py lean_option_tree/u/k15.py |
| Stores存储 | lean_option_tree/u/tstore.py lean_option_tree/u/objstore.py lean_option_tree/uctl/packfeed.py |
| Git under rule G规则 G 下的 git | lean_option_tree/infra/rt/gitd.py trusted/lotgit/ |
| Global search全局检索 | lean_option_tree/infra/rt/hpsd.py lean_option_tree/search/hpsearchsvc.py lean_option_tree/search/libwiki.py |
| Official final check and prune官方终检与剪枝 | lean_option_tree/lean/final/finalrt.py lean_option_tree/infra/rt/fcjob.py lean_option_tree/lean/final/finalcheck.py lean_option_tree/lean/final/finalprune.py |
Architecture of LOT rootless on Slurm, release candidate 3; replay of the rc3 tree’s 12th Slurm job (2026-11-25, 01:14–02:57Z). The tree works on two_ninety_theorem and had run for 33.6 h when its 12th Slurm job resumed it (unpause) on 2026-11-25 at 01:14:13Z. The replay ends at the moment the data was read, 02:56:32Z (t = 6,138.9 s). In that window 53 sessions started and made 4,857 model requests; the gate took 45 hand-ins; 12 obligations were born and 3 accepted. The root still waits for its children, so no official final check ran. 50 s after the cut the job got a clean stop (USR1): T paused in 40.1 s, the mirrors were written and hrun left no cgroup behind. The tree’s later jobs (it went on at 03:10Z) are not part of this replay.
架构为 Slurm 上的无 root LOT 第 3 个发布候选版;重放的是 rc3 树的第 12 个 Slurm 作业(2026-11-25 01:14–02:57Z)。这棵树在做 two_ninety_theorem,已运行 33.6 小时,2026-11-25 01:14:13Z 由它的第 12 个 Slurm 作业恢复(unpause)。重放截至读取数据的时刻 02:56:32Z(t = 6,138.9 s)。在这段时间里,新开 53 个会话,发出 4,857 个模型请求;gate 收到 45 个提交;新增 12 个义务,3 个被接受。根仍在等待子节点,所以没有运行官方终检。截止后 50 秒,作业收到干净停止信号(USR1):T 在 40.1 秒内暂停,镜像写出,hrun 没有留下任何 cgroup。这棵树之后的作业(03:10Z 起继续运行)不在本重放之内。