interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / ipl / CONTRACT.md

227 lines · 16669 bytes Raw Blame History Source

Interplane native store: the contract for consumers (version 0, trial)

Status: IMPLEMENTED and EXERCISED on the Spark host (the gate in tests/run.sh, and a trial import). Not installed, not serving anything, not the publishing route. Under the standing rule the route "exists" only after its gates on a fresh clone, an other-provider MERGE and a receipt. Consumers may build against this contract; they may not publish through it yet.

Operator intent (Drake, 2026-11-13): "take everything radicle did and replicate it into interplane and leave out all the bullshit ... designed around agent workflows and agent coding", and to the HardenOS lane: "take radicle out and build this directly on to of git".

Where things are

One store root. Where a trial store stands, and with which trial key, is named in the receipt of the head that made it.

ROOT/catalog.tsv              generated, never typed
ROOT/projects/NAME/repo.git   ordinary bare Git repository
ROOT/projects/NAME/chain.tsv  the record chain
ROOT/projects/NAME/records/N  the exact payload bytes record N commits to
ROOT/projects/NAME/owner.pub  the owner's public key
ROOT/projects/NAME/staging/   landings in progress. A finished request removes its own files; an abandoned one leaves its files here until that same request is finished

catalog.tsv has one line per project, five tab-separated fields: name id default-branch head visibility (head is none before the first recorded head). It is rewritten on every change the store commits (init, import, land), from each project's own line, so it follows a landing without anyone running anything. ipl catalog re-derives every line from full verification, drops a project that does not verify, and then exits 3. Readers take the catalog as the list of projects; they do not scan the folder. A project folder or repo.git that is a link is not a project.

Identity

Records

The chain is the forge's chain/chain.om format: one line per record, seven tab-separated fields seq utc kind actor subject payload prev; payload is the SHA-256 of the bytes in records/SEQ; prev commits to the line before. actor is the fingerprint of the owner key that was current when the record was written (the key in record 1, until a SUCCESSOR is signed, and the successor key after that).

KindSubjectPayload (records/N)
PROJECTthe nameinterplane-project 1, then project, branch, visibility, owner, alias, nonce lines. Always record 1.
IMPORTthe brancha land payload whose old is 40 zeros: a head taken over from the old store, not gated or reviewed here. Once per branch, before any landing on it.
LANDthe branchinterplane-land 1, then project, branch, old, new, receipt, verdict, request lines. old is the head the chain recorded for that branch before (40 zeros for a new branch).
SUCCESSORthe new key's fingerprintinterplane-successor 1, then project, old, new, pub, reason lines. old is the then-current owner's fingerprint, new is the successor's, pub is the 68-character ssh-ed25519 blob of that successor (no comment), and reason is - or the same bytes a request id may use. The successor must differ from every key that has already been an owner of the project (the key in record 1, and every earlier SUCCESSOR new).
SIGthe seq it signsan SSH signature, namespace interplane, by the owner key that was current when the signed record was written

A name or branch longer than 128 bytes is written in the subject field as sha256: and the digest of its bytes; the payload always holds it in full.

Every PROJECT, IMPORT, LAND and SUCCESSOR record is immediately followed by its SIG record. The signed message is six lines: interplane-sig 1, then kind, actor, subject, payload, prev, each followed by that field of the record it signs. So a signature fixes what the record says, who wrote it, and, through prev, every record before it. It does not cover the record's seq and utc fields or the SIG line itself; those are fixed by the next signed record's prev, and for the last record of a chain by nothing. So the times in a chain are not signed facts: do not rely on the time of the last record, and treat the others as fixed only by what was signed after them.

receipt and verdict are the SHA-256 of the receipt file and of the review verdict file. Version 0 commits to those files; it does not read them. Checking that the verdict comes from a different key and provider than the author is step 3.

Field rules and the canonical bytes are decided in one place, om/landrec.om (seeded Omega). No field can hold a space, a tab or a line feed. No field has a length chosen by this store. The chain format's subject field holds 128 bytes, which is why longer names and branches go there as a digest. What is refused for length is only what the machine cannot hold: a name longer than a file name on the store's file system, a branch part longer than that less the five bytes of git's .lock, a branch path past the file system's path limit, and an argument longer than Linux passes to a program (131071 bytes). The numbers are read from the file system when the call is made.

Actions

ipl init      ROOT NAME BRANCH VISIBILITY ALIAS KEY          record 1 for an existing repo.git
ipl import    ROOT NAME BRANCH EVIDENCE_FILE NOTE_FILE REQUEST KEY
ipl land      ROOT NAME BRANCH NEW SOURCE RECEIPT_FILE VERDICT_FILE REQUEST KEY [--expect-owner FP]
ipl handover  ROOT NAME|--all OLD_KEY NEW_PUBKEY [REASON]    signed succession to a new owner key
ipl verify    ROOT NAME [--expect-owner FP]                  prints: OK NAME ID BRANCH HEAD VISIBILITY CURRENT SEQ CHAINHEAD
ipl catalog   ROOT [--expect-owner FP]

SOURCE is the absolute path of a local repository that holds NEW, or - when the store already has it. Nothing else is accepted there.

The OK line from verify, land, import, init and handover is OK NAME ID BRANCH HEAD VISIBILITY CURRENT SEQ CHAINHEAD. CURRENT is the current owner fingerprint, SEQ is the last record number, and CHAINHEAD is the SHA-256 of the last chain line with no line feed (the prev a next record would commit to). catalog.tsv stays five fields (name, id, default-branch, head, visibility) and does not include these extra columns.

The current owner is pinned outside the store, in ${IPL_OWNER_PINS:-$HOME/.config/interplane/owner-pins}. Each line is NAME SHA256:<43> or * SHA256:<43> (every project). Blank lines and # comments are allowed. The file must exist, be mode 0600 (no group or world bits), and resolve outside ROOT. verify, land, import, handover and catalog load it automatically and fail closed, exit 3, if it is missing, has bad permissions, is inside ROOT, or names a different key than the walk ends on. catalog leaves a mismatching project out and exits 3. --expect-owner FP may also be passed to those commands; if it disagrees with the file, that is exit 3.

The pin is the out-of-band channel the leaked key cannot sign for. Its value is written by hand, from the current owner key's .pub on the machine that holds that key — never copied from a store. After ipl handover appends a signed SUCCESSOR, it updates the local pin file (only then, never on a no-op). A single-project handover rewrites or appends that project's NAME line and prints ipl: pin: NAME SHA256:.... handover --all rewrites the NAME line of every project rotated in that run, rewrites * only if it named the old key (and appends * NEW if there was no * line), and prints ipl: pin: * SHA256:.... Install a * SHA256:... line by hand on the forge serving host, on the machine that runs tools/receipt.sh, and on each mirror. receipt.sh points IPL_OWNER_PINS at a pin file outside the trial ROOT. If handover records the SUCCESSOR but then exits 5 because the pin file could not be updated, write the printed line into the pin file by hand; a rerun will not repair a stale pin, because the current key has already switched.

Do not install the pin on the live forge host from this change alone. When it is time, on the machine that holds the current owner key:

install -d -m 0700 ~/.config/interplane
printf '* %s\n' "$(ssh-keygen -lf /path/to/current-owner.pub | awk '{print $2}')" > ~/.config/interplane/owner-pins
chmod 600 ~/.config/interplane/owner-pins

Use the same path (or set IPL_OWNER_PINS) on the forge, receipt, and mirror hosts, with the fingerprint taken from that key's .pub, not from any store. After a rotation, replace the file with the ipl: pin: * SHA256:... line the handover printed.

ipl handover --all prechecks every project before writing any record. If any project cannot be handed over (including one whose current owner is not the given old key, or whose successor was already an owner), nothing is recorded and the run exits 2, naming every project that failed.

ExitMeaningState afterwards
0donerecorded, signed, branch in place
1usageunchanged
2an argument, file or key was refused (stderr says which)unchanged
3the project does not verify, or has an unfinished request that is not this oneunchanged
4not a fast-forward, the head is already there, not a commit the store can find, the branch name collides with an existing one, or the request id was already used for something elseunchanged
5a tool failed part-waypossibly unfinished: run the same request again; it finishes or refuses

"Unchanged" means the chain, the records and the branches, with two exceptions that are said here rather than hidden. A refused landing may already have copied Git objects from SOURCE into repo.git; no branch points at them. And on a call by the owner, leftovers of an interruption are put right before the request is looked at, and that repair stays even if the request is then refused; ipl says so on stderr (ipl: repaired: ...).

What verify proves, and what it does not

It proves: the chain is intact from record 1; every payload file is the one its record commits to and is in canonical form; record 1 is this project's PROJECT record under this folder's name; owner.pub is the Ed25519 key record 1 names; every record was written by the owner key that was current at that point in the chain, and every PROJECT, IMPORT, LAND and SUCCESSOR record carries a valid signature by that same key; a SUCCESSOR names a new Ed25519 key, different from every key that has already been an owner, whose fingerprint matches the pub blob, and after that record's signature the current key is only the successor (a later record signed by a retired key does not verify, and a successor that returns to a prior owner does not verify); every landing starts from the head the chain recorded before it and is a fast-forward of it, and its head is a commit the store holds; no request id appears twice; and every branch the chain has a head for is, in repo.git, exactly at that head. Sequential handovers are followed in order. A store with no SUCCESSOR records verifies as it did before this rule existed. Anything ambiguous about which key is current, or a handover not signed by the then-current key, fails closed.

It does not prove: that a receipt or verdict is any good; anything about branches and tags the chain has no record of; that a copy of the store is the newest one (an older or forked pre-handover copy also verifies if the operator pin still names that copy's current key; with the pin file, or --expect-owner, naming the successor, it does not); or that Git objects are intact beyond what Git itself checks on use.

Outside this version's trust boundary: anyone who can write files in the store directly, and the git and ssh-keygen programs on the host. ipl runs git with no user or system configuration, no hooks, no replace objects and only the local file transport.

Not in version 0

Agent grants and their withdrawal, the HTTP form of these actions, proposals and issues, mirrors and freshness, serving, private-project access rules beyond "not served", events. ipl itself is shell around the Omega record rules, the Omega chain, git and ssh-keygen; its decisions move into Omega before the route is offered for publishing.