interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / docs / OPEN-BUILDS.md

445 lines · 41250 bytes Raw Blame History Source

Open builds: the shelf of unfinished projects (Open Humanity)

Drake, 2026-11-10: "people can use this as a way for them to complete their broken projects. We upload our projects that didn't quite get finished, or are not quite what you want yet. It's not ready to publish, but it's still open and we want to work on it. Radicle is the way to do it, through Interplane."

A person signed in with a Radicle key gives the Radicle id (RID) of a project. This node seeds and fetches it within limits and lists it at /open/ as open, unfinished and not verified, with its rad clone line, so other builders and their agents can pick it up and send patches over Radicle.

PartWhere it runsWhat it does
open/route.om (in forged)inside the forged sandboxGET /open/ (HTML, or JSON interplane/open-builds/1 on Accept: application/json), POST /open/ with action=bring (rid, note, consent=yes) or action=withdraw (rid); session, CSRF token and origin are checked as for every forge write; it appends one line to <data>open/queue
open/intake.om (./run.sh intake)its own service, outside that sandboxreads the queue, checks every field again, asks the Radicle node (rad seed <rid> --scope all --fetch), keeps the free-space reserves, publishes <data>open/list.tsv

forged has no network and cannot run rad, so it only leaves a file; the intake polls that file once a second.

The project page

JSON under names of their own: /open.json (the shelf) and /open/<rid>.json (one project) answer the same JSON as the page addresses do with Accept: application/json. Use these names from outside: the cache in front of forged keys on the address, so an anonymous request with only the Accept header can be answered with the cached HTML page (ledger L1139). The forge row carries an "Open builds" entry on every page.

GET /open/<rid> shows one listed project: its row, then a snapshot of its HEAD that the intake took with read-only git commands: the head and its date, the last 10 commits, the top-level files (at most 200) and the README (README.md, else README; at most 32 KiB). JSON interplane/open-build/1 on Accept: application/json. The snapshot is the file <data>open/p/<rid>.txt; forged cannot read a brought repository itself (its sandbox mounts only the curated ones). It is written when the project is listed, again when the key that listed it brings it again, and removed when it is withdrawn. Every line is cut at 400 bytes, control bytes become spaces, bytes that are not UTF-8 become ?, and forged escapes all of it on output. git runs with a cleared environment and no system or user configuration; nothing from the project is executed. Only a project on the shelf (open, held or stored) has a page.

The "Unfinished:" line, on the shelf card and on the page, is left out when the note is empty (no placeholder); the JSON keeps "unfinished": "". The page of a project the hub stored (the one-command bring) ends with a developer section, <section class="pj-dev" id="For-developers"> with <dl class="pj-terms"> (the curated project page's classes): the Radicle ID, the clone line, the download and its SHA-256, the bringer's DID and public key in ssh form (ssh-ed25519 AAAA..., encoded in forged from the did:key, so the check command can be copied as it stands), the hub's key and what each signature shows and how to check it. The hub's key is the node's own DID as the intake read it (rad self --did, written as line N of the snapshot), never a constant in forged; a snapshot without that line (taken before this change, or when rad self did not answer) leaves the key out of the section and the sentence. Every value is escaped.

Parts taken from the project. The page also lists submissions (docs/SALVAGE.md) that came from this project: a source whose origin field is exactly rad:<rid>, and an Omega part derived from such a source. The salvage slice publishes a derived part only after its declared example was reproduced, so a listed part is a verified one and links to its page and receipt; a source is listed as not verified. This is how work on a shelf project gets verified piece by piece: bring the project, submit a source from it with that origin, derive a part, verify it. The project line itself stays "Not verified": the list states facts, it is not a verdict on the whole project. The newest 200 submissions are looked at; nothing is listed while the salvage store is off.

Rules the intake enforces

What it does not do yet

One-command bring and get (hub side)

Contract: ~/handoffs/yourtrained-cortex/briefs/one-command-contract.md (slice HUB). A person's program (interplane bring, slice TOOL) makes an Ed25519 key on their machine, signs in like every forge sign-in, uploads a canonical ustar archive and signs a five-line bring statement. The hub checks it, creates the Radicle repository with its own key and lists it in state stored.

What forged does (inside its sandbox; it decodes, unpacks and runs nothing it is sent):

RequestAnswer
POST /open/up action=chunk, sha (64 lowercase hex), seq (from 0), data (base64url, no padding)the same write gate as every forge write (session, CSRF field, Origin, the 30 writes a minute per IP and per key, the store); signed out is 403 here, not a redirect. 200 next <n>; 409 next <n> when seq is not the next one or the upload was finished; 503 with the reason when there is no room by the intake's measure (below); 400 for a bad field; 503 when the spool cannot be written. Text bodies
POST /open/up action=finish, sha, files, bytes, name ([a-z0-9-], 1 to 64, no leading, trailing or double -), note (optional, as the bring note), consent=yes, sig (armored SSH signature)200 queued <sha>; 409 next <n> when fewer bytes than bytes arrived; 400 when more did or a field is bad; 503 with the reason when there is no room; 404 when the key has no such upload; a second finish answers queued again and queues nothing
GET /open/up/<sha>.jsonthe signed-in key's upload: {"schema":"interplane/open-upload/1","state":...,"rid":...,"page":...}; receiving (chunks only), queued (finished), then the intake's file (stored with rid and page, or refused: <reason>); 403 signed out, 404 for no upload of that archive under this key
GET /open/<rid>.tar<data>open/a/<rid>.tar for a row on the shelf, application/x-tar, attachment; filename="<name>.tar"; 404 when there is none
GET /open/alarms.json<data>open/alarms.json as the intake wrote it
GET /bring.sh, GET /get.sh, GET /withdraw.sh<data>open/tools/bring.sh, get.sh and withdraw.sh as they are (the TOOL release writes them); 404 when absent

forged writes only under <data>open/up/: <sha>.<didhash>.b64 (didhash: the first 8 bytes of sha256 of the DID, in hex, so a key only ever appends to its own spool; one line a chunk: the data, a tab, seq and the running byte total as 20 digits each, so every 64-bit count fits; the former 10 digits wrapped at 10^10 bytes), <sha>.<didhash>.sig at finish, and one queue line U <tab> sha <tab> did <tab> files <tab> bytes <tab> name <tab> note. A chunk or queue line that is written only in part (a full disk) is cut back to the file's size before the write and answered 503, so no fragment joins the next line. The shelf JSON and the page JSON carry stored_by_hub (true for a stored row), download ("/open/<rid>.tar" or null) and download_sha256 (from <data>open/a/<rid>.sha256, or null). A stored row on the shelf says: "Stored on Radicle by the Interplane hub: the hub's key signed the Radicle record. The person who brought it signed the list of files."

What the intake does with a U line (outside the sandbox, in this order; every refusal writes the status file <data>open/up/<sha>.<didhash>.json and removes the spool and scratch):

  1. Checks every field again (sha 64 hex, did printable, files and bytes decimal, name with forged's rule: [a-z0-9-], 1 to 64 bytes, no - first, last or twice in a row; note without control bytes, exactly seven fields). A line that breaks a rule is ignored.
  2. The remove file (refused: removed by the operator) and the allow file. No number a key, on the shelf or a project. The list must have room for the row (above). The storage filesystem must keep its reserve after four times the archive's size (the decoded copy, the unpacked tree, the git objects, the Radicle copy): else "refused: this computer is nearly full; try again later" and the reserve_refused alarm names the key and the bytes asked for.
  3. Decodes the spool record by record (each record's seq and running total must match), checks the byte count (refused: wrong archive byte count) and the sha256 (refused: wrong archive sha256).
  4. Copies the spool's signature into <work>bring.sig, writes the statement and an allowed-signers line built from the DID into the work dir and runs `env -i PATH=/usr/bin:/bin /usr/bin/ssh-keygen -Y verify -f <work>signers -I forge-user -n interplane-bring -s <work>bring.sig with the statement on stdin (refused: bad bring signature`). The DID must be canonical base58 (no 1 right after z, as forged's sign-in requires), so one key has one DID string for its quota and the remove file.
  5. Reads the whole archive once without writing anything: ustar headers with magic ustar\0 and version 00, type 0 only (no link, symlink, device, directory or extension entries), mode 0644 or 0755, uid, gid and mtime 0, empty uname, gname, linkname and device fields, a correct checksum, zero padding, paths (prefix rule) of 1 to 255 bytes with no empty, . or .. component, no leading /, no control byte, in strictly increasing byte order (so no duplicate), the files count, two zero blocks and nothing after them (`refused: archive is not canonical ustar). A component named .gitin any case isrefused: the archive holds a .git folder`. A file holding -----BEGIN and then PRIVATE KEY----- on the same line (also across 512-byte blocks) is refused: the archive holds a private key.
  6. Unpacks into <work>upload-tree/ (a fresh folder; files created exclusively, mode kept), writes .interplane/brought.txt (the statement, then one line per file: sha256, bytes, path) and .interplane/brought.sig (the person's signature as sent).
  7. git, with the git dir <work>upload.git outside the tree: `env -i GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null GIT_ALLOW_PROTOCOL=file GIT_NO_LAZY_FETCH=1 GIT_TERMINAL_PROMPT=0 PATH=/usr/bin:/bin HOME=<work> GIT_AUTHOR_NAME=<did> GIT_AUTHOR_EMAIL= GIT_COMMITTER_NAME=Interplane hub GIT_COMMITTER_EMAIL= /usr/bin/git -c core.hooksPath=/dev/null -c commit.gpgsign=false --git-dir=... --work-tree=...theninit --bare --template= --initial-branch=main, add --all --force -- <tree>, commit --no-verify -m "Project brought through Interplane"`.
  8. `rad init --public --no-confirm --name=<name> --description=<note, else "Project brought through Interplane"> --default-branch main <work>upload.git` (name and description one argument each, so a note that starts with - is never read as an option) as the node's user (the same `env -i HOME PATHas every rad call); the RID is therad:z... in its output (refused: repository creation failed` otherwise). rad init seeds it.
  9. The row in state stored (kilobytes from du of the storage folder, the name, the note), the page snapshot and the download (below), the status stored with rid and page, then removes the spool and scratch. The status file stays (so the program can read it); a new upload of the same archive by the same key removes it at its first chunk. The intake is built with the SHA-256 unit om/tls/sha2.om of omega-mv composed in front of open/intake.om (./run.sh intake).

Nothing from the archive is executed, built or opened by anything but the parser and git; the gate plants a Makefile, an executable hooks/post-checkout and configure that would touch a marker, and the marker stays absent.

Withdraw and take-down treat a stored row as a fetched one: rad unseed, remove the storage folder, the snapshot and the download; a withdrawn row keeps its name.

Downloads: for every row on the shelf (open, held, stored) the intake runs `git archive --format=tar HEAD` with the snapshot's environment and its stdout on a pipe. The intake counts, hashes and copies the bytes into a/<rid>.tar.tmp (created O_EXCL|O_NOFOLLOW in the a/ it opened itself, above). It stops when the open dir's filesystem would go below its reserve (the free bytes measured just before, minus OPEN_RESERVE_DATA_BYTES, while the archive is written; no size limit), after 30 s, or when git fails; then git is stopped and the row has no download (download and download_sha256 are null). Else the old hash is removed, the temp file is renamed onto <rid>.tar and the hash written to <rid>.sha256. It is written when a row is listed or refreshed, and for every shelf row at each intake start.

No network for git: every git command the intake runs (snapshot, archive, init, add, commit) has GIT_ALLOW_PROTOCOL=file GIT_NO_LAZY_FETCH=1 GIT_TERMINAL_PROMPT=0 beside `GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null`. The gate builds a partial clone whose blob is missing and whose promisor remote is a listener on a private port; snapshot and archive fail cleanly and the listener counts 0 connections. Without the environment (a mutant) git connects.

Free-space reserves (the machine boundary)

The only refusal for room on intake. Two settings, in <work>reserve (outside the folder forged can write; one NAME=digits line each; a missing file or a malformed line keeps the default):

SettingDefaultFilesystemReasoning (measured 2026-11-11)
OPEN_RESERVE_STORAGE_BYTES100,000,000,000the one holding the Radicle storage (and, on the Spark, the work dir and the hive builds): /, 4,031,871,553,536 bytes283,988,869,120 bytes free at 14:31:10Z (7 percent). It fell from 293 GB at 12:49Z and 287 GB at 14:08Z, about 6.4 to 7.8 GB an hour, all hive builds (Radicle storage is 1.04 GB in all). 12 hours at the faster rate is 94 GB; rounded up. The storage_free_bytes alarm fires at twice it (200 GB), about 12 hours before refusals at that rate. Measured again at 16:22:52Z: 191,542,358,016 bytes free, 92 GB used in 1 h 52 min (about 50 GB an hour, hive builds); at that rate the alarm already fires and refusals start in about 2 hours, so the rate, not the reserve, is what needs a person now. What it protects: everything else on that filesystem, the live sites (forged and the site trees it serves), the Radicle storage and the hive builds; a bring never takes the last 100 GB from them. Today's swing (2026-11-11): free space moved between 178 and 184 GB within minutes (16:24-16:29Z), and 92 GB was lost between 14:31 and 16:22Z. ~/handoffs/BOARD.md has no DiskAlarm report (checked 17:04Z); its nearest basis is the disk emergency of 15:07:01Z and 15:08:42Z: one runaway pipeline took free space from 268 to 155 GB at about 514 GB an hour (by df, 182 GB at 15:03:10Z to 155 GB at 15:06:19Z), so a single fault can use 100 GB in about 12 minutes. The reserve is the floor that keeps the sites and Radicle writing while a person looks; the storage_free_bytes alarm at twice it is the signal to look.
OPEN_RESERVE_DATA_BYTES1,073,741,824the one holding <data> (the spool open/up/, the downloads open/a/, forged's logs and stores): ~/forge-data, its own 8,350,298,112-byte filesystem6,821,240,832 bytes free at 14:31Z. forged's log grew 43.6 MB in 18 hours (about 58 MB a day; 325 MB of logs, 1.47 GB of download cache in all), so 1 GiB is about 17 days of the log at that rate, 13 percent of the filesystem: room for forged and the site to keep running after uploads stop. data_free_bytes fires at twice it.

Where each is checked:

Alarms

No-hard-caps point 5: a measurement beside each former cap and each buffer. Nothing here refuses anything. Measured after every intake pass that did something, at start, and at least every 60 passes (about a minute when idle); the queue is also measured before each pass. <work>alarms.txt holds one line per firing alarm (`name <tab> value <tab> threshold <tab> source <tab> key <tab> volume_bytes; the key is -` when the alarm names none), the same lines go to stderr (the journal) under an ALARM line, and <data>open/alarms.json (interplane/open-alarms/1) lists every check with key (or null), volume_bytes and firing.

AlarmFires atMeasuresKey, volume
key_shelf_rows8 or morethe most rows this intake fetched or stored for one keythat key, the KiB of its rows
shelf_rows200 or morerows on the shelf (held too)the key with the most rows, the KiB of the shelf
largest_project_kib51200 or morethe largest rowits key, its bytes
queue_bytes1048576 or more<data>open/queue-, the bytes
spool_bytes1073741824 or moreall files in <data>open/up/ (lstat)-, the bytes
rad_seed_output_bytes52428 or morethe output of rad seed (no arguments)the intake's 65,535-byte command buffer (policy() answers "node did not answer" at or above it; live 2026-11-11: 9,022 bytes for 93 rows, the edge near 690 seeded repositories)
storage_free_bytes2 × OPEN_RESERVE_STORAGE_BYTES or lessfree bytes of the storage filesystem-, the reserve
rad_delegates_output_bytes52428 or morethe largest rad inspect --delegates output seen by this processthe same 65,535-byte buffer
data_free_bytes2 × OPEN_RESERVE_DATA_BYTES or lessfree bytes of the open dir's filesystem-, the reserve
list_bytes209715 or morethe private list's bytes (no size limit: read and written a row at a time)-, the bytes; the threshold is 80 percent of the former 262,143-byte read buffer
list_row_bytes4096 or morethe longest row of the private list (the intake writes at most about 900 bytes)-, its bytes; every row is kept whole, the intake and forged read the first 4,096 bytes of each field
reserve_refusedwhile the last reserve check refused (until a later check finds room)free bytes then, against the reservethe key refused, the bytes it asked for

Caps met (no-hard-caps point 6)

WhereNumberWhat it isWhat was done
projects a key (intake)8an arbitrary shelf numberremoved (2026-11-11); key_shelf_rows alarm
projects on the shelf (intake)200an arbitrary shelf numberremoved; shelf_rows alarm
size of a project (intake fetch, upload, decode, download; forged chunk and finish 413)50 MiBan arbitrary shelf numberremoved; largest_project_kib alarm; the reserves bound it
forged's queue1 MiBnot a buffer (read 64 KiB at a time from an offset)removed; queue_bytes alarm; the data reserve bounds it
free spacethe two reservesthe machine boundarykept, stated and measured (above); refusal with the reason; alarms at twice each
the intake's list read buffer (and forged's)262,143 bytesa fixed buffer holding the whole list; past it the list was cut without a wordremoved (2026-11-11): both read the list a row at a time in 64 KiB chunks and the intake writes it streamed through a temp file; no size limit; gate at 1.2 MB with a 70,000-byte row, and a mutant cut at 262,143 bytes is caught; list_bytes and list_row_bytes alarms
the "shelf list is full" refusal (lfits)262,143 − 900 byteskept new rows inside that bufferremoved with the buffer
refusal and withdrawal rows in the list (keep)65,536 bytes, oldest droppedkept the list under that bufferremoved with the buffer; every row stays (retention tests)
forged's list scans (shelf page, /open.json, project page)4,096 rowsa loop bound: past it forged trappedremoved: a scan is bounded by the file
the intake's output buffer ob in a stream524,288 bytesa write bufferthe list is written through it streamed (flushed when full); outside a stream (snapshot, status, alarms) it still holds one small file and drops past it: not changed in this slice
forged's reply buffer fob for /open/ and /open.json8 MiBa whole-response buffer; an overflowing shelf answered 500removed as a response limit: both URLs now stream chunked, in complete-row batches through fob; no pagination or whole-response allocation. A read/send failure closes without the final HTTP chunk (never a successful prefix). Other routes retain their existing buffer behavior. Gated with 10,000 rows, HTML and JSON each past 8 MiB, every row in order, and a mutant that fills fob again.
the spool's running total10 digitsa format width that wrapped at 10^10 byteswidened to 20 digits (every 64-bit count)
one fetch (radicle-node fetchPackReceive)500 MiBradicle's own limitkept (point 5); recorded as part of the reserve design (above)
the intake's command buffer cb65,535 bytesa real buffer of our own (point 1 would remove it)not changed in this slice; two alarms
forged's per-IP and per-key write limits30 a minuteedge rate limitingkept (decision 2)
forged's sandbox limitsnproc 256, as 4 GiB, fsize 1 GiB, nofile 1024containment of untrusted inputkept (decision 2)

Install on the Spark (after review)

C=$(git rev-parse --short=8 HEAD); D=$HOME/.local/lib/interplane-open/$C
mkdir -p "$D" "$HOME/forge-open-work" && chmod 700 "$HOME/forge-open-work"
INTAKE_OUT="$D/open-intake" ./run.sh intake
ln -sfn "$D" "$HOME/.local/lib/interplane-open/current"
rad self --did > "$HOME/forge-open-work/allow"        # the owner's key only; add DIDs, or one line * for everyone
cp infra/spark/interplane-open-intake.service ~/.config/systemd/user/
systemctl --user daemon-reload && systemctl --user enable --now interplane-open-intake.service

The reserves keep their measured defaults unless ~/forge-open-work/reserve names others, for example `printf 'OPEN_RESERVE_STORAGE_BYTES=100000000000\nOPEN_RESERVE_DATA_BYTES=1073741824\n' > ~/forge-open-work/reserve`; the intake reads the file at every check. The forged built from this tree takes upload chunks only once the intake has written <data>open/space, so start (or keep) the intake service before or with the new forged.

The page is served by any forged built from a tree that holds open/READY and salvage/READY. Undo: systemctl --user disable --now interplane-open-intake.service (the page stays, requests queue and nothing is fetched); remove open/READY and rebuild to remove the page. Projects already brought stay seeded until withdrawn.

Gate for the one-command bring: ./run.sh check-open-up (open/tests/up.sh, ports 19880 and 19882 by default) ends with RESULT pass=N fail=0 (N in the gate log of the commit). It runs a test copy of forged and the intake against a stand-in rad whose init clones the scratch git dir into a throwaway storage folder and prints a RID: a good upload end to end (row, commit, brought.txt and its signature, shelf and page JSON, download), every refusal (bad signature, wrong sha256, wrong byte count, wrong file count, .., absolute path, symlink, device, duplicate and unsorted paths, a private key, also across blocks, .git in any case, an out-of-order seq, a POST without a session, a wrong CSRF token, a foreign Origin, another key's spool, a removed key, a key that is not invited, hostile queue lines), an upload into a 1 MiB list (four times the former read buffer, every row kept and listed), the ninth project of a key and the 201st on the shelf and a 60 MiB project all stored with their alarms naming the key, withdraw and the remove file, a Makefile, hooks/post-checkout and configure that are never run, the partial clone with a counting listener, a probe under infra/spark/forged-sandbox.sh that cannot write the work dir, each alarm at its threshold and one below it with the upload still stored, links planted in the open folder (a/<rid>.tar, .sha256 and .tar.tmp to outside files; a/, p/, up/ and <data>open itself to outside folders; alarms.json and list.tsv to outside files), a download that would cross the data reserve (none, page JSON null) beside one within it, and with room one past the former 50 MiB, a non-canonical DID of the same key, a note --private and signed names that break the name rule, forged's room (no room, seven malformed space files, a linked and a FIFO space file, no file, a B line without room, a stale measure that forged's own count refuses), the storage reserve on a tmpfs crossed (refused with the reason, nothing written, the alarm naming key and volume) and kept (stored), a fetch under the reserve, a FIFO as the queue, a .b64 and a .sig with a takedown in the same pass; then mutants of the intake (signature, sha256, byte count, .., empty component, entry type, path order, key scan, .git, remove check, the no-network environment, an alarm threshold, the folder check (a/, p/ and up/), the open dir check, the temp file and rename of the download, the data reserve in the download, the storage reserve, the old 8-a-key cap, a list read cut at the former 262,143 bytes, the regular-file check, canonical base58, the one-argument --description=, the name rule) and of forged (seq check, write gate, per-key spool, the space file ignored, stored rows on the shelf), each of which must show the failure. The end-to-end runs with forged in its real sandbox and the real rad in a throwaway HOME are ~/handoffs/open-builds/e2e-one-command.sh <tree> and e2e-tool-<head8>.sh <tree>. The gate also checks the project page of a stored project (the developer section, the bringer's key as the page shows it verifying brought.sig and the page's check command run as written, a hostile hub-key line escaped, with a mutant that drops that escape) and the empty Unfinished: label left out on the card and the page. No outcome depends on timing: a POST answered 429 by forged's write limits waits (Retry-After, else to the next minute) and is sent again, except in the case that tests the limit. FORGED_CPUS names the cores (or off for no taskset); UP_TEST_PORT and UP_TEST_LISTEN_PORT move the two ports, and the gate stops when either is already in use.

Gate: ./run.sh check-open (open/tests/run.sh) ends with RESULT pass=287 fail=0. Part 1 runs the intake against a stand-in rad in a throwaway HOME; part 2 runs the page in a test copy of forged with a throwaway key; thirty mutants (no sweep for the remove file, no remove check on a bring, a held project deleted on removal, a .json name that is ignored, no origin check for a part, an unpublished draft listed as a verified part, no control-byte pass in the snapshot, a snapshot kept after withdraw, no escape on the project page, no shelf check for the page, no allow check, a held row treated as fetched, no delegate check for a held row, no end-of-key check in the delegate match, no start-of-line check in the delegate match, the old 8-a-key cap put back, no first-column check in the policy match, no end-of-rid check in the policy match, no visibility check, no policy check for a held row, list read from the published copy, no owner check on withdraw, no policy check, no leftover rule, refusals that replace the failed-fetch row, no UTF-8 pass, a list read cut at the former 262,143 bytes (in the intake and in forged), no queue rotation, no HTML escape) must each show the failure.