interplane-forge
INTERPLANE Forge
Brought by drakestapleton
interplane-forge / tools / bring / PLATFORMS.md
| 1 | # Interplane tool platforms |
| 2 | |
| 3 | Research pin: omega-mv `b2ad967e57146172c1bedf1eac98babb75baef65`, read from Radicle storage `z6do9WDBhuSnvopDkgFdFr1yWA62`, canonical `refs/heads/main` when inspected. Forge base initially `12cb2d9d59c34517f5f3005e24598f4c9f1f3eea`, updated to integrator `4a7dc9997097ef98b4c7c750623c0a42b59583f0`. |
| 4 | |
| 5 | ## Linux |
| 6 | |
| 7 | Production compiler: `~/work/flux/omega-mv/seed/out/omc`, measured SHA-256 `3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194`. It reads source on stdin and emits static AArch64 Linux ELF. `target x86linux` on the first line emits static x86-64 Linux ELF. A SHA-256 streaming probe compiled (exit 0) and ran under `qemu-x86_64` (exit 0), printing the standard abc digest. |
| 8 | |
| 9 | | Target | Status | |
| 10 | |---|---| |
| 11 | | Linux aarch64 | SUPPORTED: built with the pinned omc, `tests/run.sh` passes (see below) | |
| 12 | | macOS arm64 | BUILT and EXERCISED on this Mac (macOS 26.6.2): version, walk, scan, archive, unpack, consent, bring against the stand-in through a tunnel, get (below) | |
| 13 | | Linux x86_64 | RELEASED in 0.1.1, checked under emulation, not yet on a real x86-64 machine. Built by `build.sh x86linux`; under qemu-x86_64 8.2.2 (binfmt on the AArch64 Spark) `--version`, the walk, the scan and the archive give byte-identical archives to aarch64, and e2e-tool-x86 ran bring, get and withdraw (curl, ssh-keygen and the network path included) against a sandboxed forged, 34 pass 0 fail at 10ace1ad (`~/handoffs/open-builds/e2e-tool-x86-10ace1ad.log`) | |
| 14 | | Intel macOS | CANNOT YET: no Omega toolchain here emits x86_64 Mach-O (below) | |
| 15 | |
| 16 | **omc stat layout: Omega's 128-byte asm-generic structure on every target (the contract).** The words `fstat`, `stat` and `lstat` write Omega's 128-byte Linux ARM64 (asm-generic) stat structure on every target, x86linux included: `st_mode` at byte 16, `st_size` at 48. This is the contract: OMEGESE section 10 (omega-mv main 1fa9e360a, docs/one_layer/OMEGESE.md lines 1090-1092) says "Write the 128-byte Linux ARM64 stat structure", and seed/omc/omc.om:16716 says "Native x86 struct stat is private; output remains Omega's 128-byte asm-generic ABI" (since bf54b19fa, #923). `src/arch-x86.om` reads mode at 16 and size at 48 for that reason; it is the portable reading, not a work-around. Open flags stay x86-native (O_DIRECTORY 65536, O_NOFOLLOW 131072), and directory opens work with them. |
| 17 | |
| 18 | Measured on 2026-11-11 with omc 3ad9f10f (the pin) and c52e986e (omega-mv main 1fa9e360a; 3537baad9 repinned it). The probe `~/work/hive/slop-collector/omc-x86stat/stat-probe.om` on the Spark (lstat of a 5-byte 0640 file, 144 bytes as hex) printed identical bytes under both compilers, for `target x86linux` under qemu-x86_64 8.2.2 and for native aarch64: mode `a081` at byte 16, size 5 at 48. The control: a static x86_64-linux-gnu-gcc 13.3.0 program making the same raw `newfstatat` call under the same qemu gets the kernel's x86_64 layout (mode at 24), so omc converts as its contract says. An earlier note here called this a defect; that was wrong (the compiler owner, OmcNoCaps, pointed to the contract). Not run on x86_64 hardware. |
| 19 | |
| 20 | OMEGESE section 10 at the installed source provides: |
| 21 | |
| 22 | - `getdnts fd A off n`: raw Linux getdents64, count or negative errno. |
| 23 | - `fopen A off n flags mode`, `fclose`, `read`, `write`: `/dev/tty` needs no special word. Open `/dev/tty`, then read exactly one line from its descriptor; stdin is not consent. |
| 24 | - `lstat` does not follow the final symlink; `fstat` writes the 128-byte AArch64 stat structure. Host layouts are target-native. |
| 25 | - `fork`: zero in child, PID in parent, negative errno on failure. |
| 26 | - `execprog A off n`: u16 record count, then u16 length and bytes per argument; argv[0] is the absolute executable. No shell, PATH search or inherited environment. Closes descriptors >=3 with close_range before exec; fails closed if closure fails. Packet <=4096 bytes, 1..64 records are compiler limitations, not project policy. |
| 27 | - `dupfd fd target flags`, `pipefds A off n flags`, `waitpid pid A off n options` (four-byte status), `fchdir`, `pread` and `pwrite` supply stream redirection and file-backed processing. |
| 28 | |
| 29 | Paths are length-delimited, at most 4095 bytes under this compiler; argument reads internally scan at most 1 MiB. Neither is a new tool cap. `bring`, `get`, `withdraw`, `pack` and `unpack` start no git process. `interplane patch` (since 2026-11-17, `src/50patch.om`) starts `/usr/bin/git` through the same `execprog` path (argument list, empty environment, no shell) for read-only commands; see `docs/BRING.md` "patch" and the section below. |
| 30 | |
| 31 | ### interplane patch: what was run, per target (2026-11-17) |
| 32 | |
| 33 | Only what was run is listed; the tree is `patch/docs` 8a19474e7c18 (the `patch/git-intake` a9c887f code with this branch's docs, `patch/tests/e2e.sh` and infra), on the Spark under pool 18, against a scratch forged on 127.0.0.1:18488 (fixture repository, scratch data folder, throwaway key in a scratch HOME). |
| 34 | |
| 35 | | Target | interplane patch | |
| 36 | |---|---| |
| 37 | | Linux aarch64 | EXERCISED (loopback): `patch/tests/e2e.sh`, 15 pass 0 fail, exit 0. `patch --yes` in a scratch clone with `env -i`: git runs, the summary, key made, sign-in, upload accepted (exit 0, the page printed); the raw route is byte-equal to `git format-patch` with the tool's flags; `git am` of it onto the base gives the tool's tree. Log `~/work/lanes/ipl-forge-patch/logs/e2e-8a19474e7c18.log` (sha256 `d115eadadf83c3a785d340d003809b4141f9252168426731490706825e0ab590`). Consent without `--yes` (no terminal, typed no, typed yes), replay, options and server refusals are in `patch/tests/run.sh`, not run by me | |
| 38 | | Linux x86_64 | EXERCISED under emulation only: the same e2e with `E2E_TARGET=x86linux` (`build.sh x86linux`, run by qemu-x86_64 8.2.2 through binfmt on the AArch64 Spark; it starts the native `/usr/bin/git`, `/usr/bin/ssh-keygen` and `/usr/bin/curl`), 15 pass 0 fail, exit 0, log `~/work/lanes/ipl-forge-patch/logs/e2e-x86linux-8a19474e7c18.log` (sha256 `833202e4d905b580ab12c5abcf8d660b1882b14077db64fc4b026001147cb6ba`). Not run on x86-64 hardware | |
| 39 | | macOS arm64 | BUILT only: `build.sh macos` with ng `5ed20188...` exited 0 and gave a Mach-O arm64 PIE executable (unsigned sha256 `f482447d760c99c5...`). NOT_RUN: not copied to a Mac or run; whether `posix_spawn` of `/usr/bin/git` works there is unknown | |
| 40 | | Intel macOS | CANNOT YET (no x86_64 Mach-O emitter, below) | |
| 41 | |
| 42 | ## macOS arm64 |
| 43 | |
| 44 | Sources inspected: `seed/ng/a64/DESIGN.md` sections 11, 13, 14; `seed/ng/a64/tests/macho/run.sh`; `seed/ng/front/README.md`; library fixtures `libwrite.om`, `libobjc.om`, and `lib/expect.txt`. |
| 45 | |
| 46 | `@ng a64 macho` emits PIE arm64 Mach-O. Raw host operations are only read, write and exit; clocks and other Linux host operations are refused. This does **not** mean filesystem/process operations are impossible: first-line `target macos` enables the explicit system-library gateway: |
| 47 | |
| 48 | - `libfn 0` is dlopen, `libfn 1` is dlsym. |
| 49 | - `libptr A off n` gives the checked writable slice's address. |
| 50 | - `libcall F A off n` uses a 128-byte register packet: eight integer and eight float arguments, with results x0/x1 and d0..d3 written back. |
| 51 | - Library calls run on the system stack. No stack arguments, C variadic arguments, or x8 large-struct return are supplied. Use nonvariadic libc entry points; in particular do not assume `open(..., O_CREAT, mode)` can receive its variadic mode this way. |
| 52 | - The callback gateway is single-thread only. It is unnecessary for this command-line tool. |
| 53 | |
| 54 | The shared SHA-256 unit `om/tls/sha2.om` (SHA-256 `5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33`) compiled through ng and ran on this Mac: `codesign --force --sign - p3; printf abc | ./p3`, exit 0, digest `ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad`. macOS reported 26.6.2, Darwin arm64. This is a SHA probe, **not** a claim that interplane works on macOS. |
| 55 | |
| 56 | ### Build actually exercised |
| 57 | |
| 58 | The exact tree was exported into Spark `~/work/hive/slop-collector/tool-scratch/omv` with `git archive b2ad967e` (no clone or source export to the Mac). Its seed/out/omc SHA-256 is `f4fa7951816bbd09c5eaaae6692852a70c3c305164b365027c5b683dec7d63e9`. |
| 59 | |
| 60 | Under pool-17, core 17: |
| 61 | |
| 62 | ``` |
| 63 | seed/out/omc < seed/ng/tests/ngbuild/gate.om > ../ngb/ngbuild-gate |
| 64 | chmod +x ../ngb/ngbuild-gate |
| 65 | ../ngb/ngbuild-gate seed/out/omc ../ngb/ngbuild-birth |
| 66 | ../ngb/ngbuild-birth/ngbuild build seed/out/omc seed/ng/ng.units ../ngb/ng |
| 67 | ``` |
| 68 | |
| 69 | Gate and build exited 0. ng SHA-256: `5ed20188ba8582f27105393d7578cbbe13a420630bd9dc50bedbf06a1443170c`. The gate log is `tool-scratch/ngb/gate.log`, ending `NGBUILDGATE PASS`. |
| 70 | |
| 71 | Compilation is three invocations: prefix source with `@ng front-ir`, then prefix the resulting IR with `@ng opt`, then prefix optimized IR with `@ng a64 macho`. `target macos` precedes `om2` (the reverse order refuses error 16). An om2 header is required for the shared SHA library. Globals cannot be passed as arguments: use local streaming buffers. |
| 72 | |
| 73 | The Mach-O binary must be copied to the Mac, chmodded and ad-hoc signed by `/usr/bin/codesign --force --sign -` before running. Signing remains a disclosed host dependency, not Omega implementation. |
| 74 | |
| 75 | ### Exercised on the Mac (2026-11-11, macOS 26.6.2, Darwin arm64) |
| 76 | |
| 77 | Binary built on the Spark by `tools/bring/build.sh macos` (ng `5ed20188...`), copied with scp to |
| 78 | `~/tmp/slop-tool-mac/interplane`, `chmod 755`, `/usr/bin/codesign --force --sign - interplane` |
| 79 | (signed binary sha256 `0080ca4e23df8d79821def8d51547451a12ebd0aa6d03e483ecd0694bd4136ea`). Run there: |
| 80 | |
| 81 | - `./interplane --version` printed `interplane 0.1.0`, exit 0. |
| 82 | - A sample folder (README.md, an executable run.sh, src/deep/a.om, a planted AKIA key in |
| 83 | src/conf.txt, a private key block in notes.txt, keys/id_ed25519, a symlink, and a partial-clone |
| 84 | `.git` whose promisor is `http://127.0.0.1:1/x`): `./interplane pack sample m1.tar` listed all five |
| 85 | left-outs with their reasons, archived 3 files, exit 0. After `touch` the second archive was |
| 86 | identical (`cmp`), sha256 `6368f615f14275e14d4c4cfed362a045c1d56371e756d9ad4e02ed2fcda53423`. |
| 87 | The same folder copied to the Spark (`COPYFILE_DISABLE=1 tar --no-xattrs`) and packed by the |
| 88 | Linux build gave the same sha256. macOS `tar -tvf` lists 0/0, modes 0644/0755, mtime 0. |
| 89 | - `./interplane unpack m1.tar out`: exit 0, `diff -r` equal; a second unpack into `out`: exit 1. |
| 90 | - Consent through a real pty (`expect`, since macOS `script` sends ^D for piped input): `no` and `YES` |
| 91 | printed `Nothing sent.`, exit 1, made no key, and the stand-in's connection count did not change |
| 92 | (8 before, 8 after). |
| 93 | - `yes` against `tests/standin.om` on the Spark (port 19893 through `ssh -N -L`): exit 0, the progress |
| 94 | line, both final lines; the stand-in log shows the contract's sequence; the uploaded bytes decode to |
| 95 | sha256 `6368f615...` (the archive above), and on the Spark `ssh-keygen -Y verify` says "Good" for |
| 96 | both the statement (`interplane-bring`) and the sign-in (`interplane-forge`) with the key made on |
| 97 | the Mac (`~/.interplane/key` mode 0600). So posix_spawn of `/usr/bin/curl` and `/usr/bin/ssh-keygen` |
| 98 | works through libcall. |
| 99 | - `./interplane get rad:z3gq...` against the stand-in serving `git archive HEAD open`: exit 0, |
| 100 | `diff -r` against the forge's `open/` equal; a second get refuses the existing folder. |
| 101 | - After the last source change (unused texts removed from `10base.om`), the committed head's macOS |
| 102 | build (unsigned sha256 `f03cae1c83658f26eeb4f1e046a4d5920771d73be629412f926ee45181c9168b`, signed |
| 103 | `f114f09f6099728c96a51a81d4d359992b1cdf0c9fe102a840c9fcc85ff7b7ce`) was rerun on the Mac for |
| 104 | `--version`, `pack sample` (same sha256 `6368f615...`) and `no` (Nothing sent, exit 1, no key, no |
| 105 | temp folder left). The bring, get and unpack runs above used the build before that change. |
| 106 | |
| 107 | **ng front-ir defect met (worked around).** With `fn pollup` ending in `while ... end` followed by |
| 108 | a call `finalln` (a function that calls `mustval` twice and prints), `@ng front-ir` exited 64 |
| 109 | `not lowered` at the end of `pollup`, while omc compiled the same unit. Moving the call to the caller |
| 110 | (`pollup sh` then `finalln` in `bringflow`) is accepted by both. Not minimized further; omega-mv's |
| 111 | ng-front lane owns it (front/README.md: a "not lowered" exit is an unlowered construct, not a |
| 112 | language refusal). |
| 113 | A second instance, 2026-11-11: in `fn getflow`, `r = new uchar 64 0` straight after a leading |
| 114 | `setbase` (a void call with no arguments as the first statement) made front-ir exit 64 `not lowered` |
| 115 | on the `new` line. omc compiled it for linux and x86linux. A dummy assignment between the two, or |
| 116 | making `r` before `setbase`, is accepted; the tool makes `r` first. `wdflow`, which calls `setbase` |
| 117 | then `haskey` and then makes a `new`, lowers fine. Not minimized beyond that. |
| 118 | |
| 119 | ## Intel macOS |
| 120 | |
| 121 | No x86-64 Mach-O emitter is supplied by these toolchains. ng explicitly excludes x86/EFI targets (front-end exit 64); its native emitters are a64 ELF, a64 Mach-O and the GPU backend. omc's x86 targets are Linux ELF and UEFI PE, not Mach-O. An Intel macOS release cannot be claimed from an x86 Linux build. |
| 122 | |
| 123 | ## Dependencies |
| 124 | |
| 125 | Runtime external processes are restricted to `/usr/bin/curl` for HTTP(S) and `/usr/bin/ssh-keygen` for key creation/signing, after exact consent for bring, and, for `interplane patch` only, `/usr/bin/git` for read-only commands (`rev-parse`, `merge-base`, `rev-list`, `format-patch`, `diff`, `log`) before consent. They are contract-authorized host dependencies (git by contract interplane-connector r1 F7), not claimed to be Omega. No shell, tar, Radicle or package manager is invoked by the tool, and no git command that fetches, pushes or writes. The tests use outside checks only as oracles and glue: GNU tar, strace, script, ssh-keygen -Y verify, basenc, git (to make the partial clone and its fetch control, `git archive` fixtures, and in `patch/tests/` the fixture repository, `format-patch` and `am` oracles), qemu-x86_64, and python3 for the one-line mutant edits (the pattern of open/tests/run.sh); on the Mac, expect, codesign and macOS tar. |
| 126 | |
| 127 | SHA reuse search found `social/20crypt.om` (base64, base58 decoding and argv-only signing verification), `dl/`, and ng's `seed/ng/sha256.om`. `om/tls/sha2.om` is the existing streaming SHA API; no new cryptographic algorithm is needed. |