interplane.Get Omega
Read in your language

interplane-mv

INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.

Brought by drakestapleton

branch main Branches Tags History

interplane-mv / docs / FORGE.md

152 lines · 10375 bytes Raw Blame History Source

INTERPLANE Forge: the authority boundary for code

Agents express intent. The forge retains authority.

INTERPLANE Forge is a module of INTERPLANE. It applies the protocol's own rule (Crossveil: "Nothing crosses the veil as authority merely because a model requested it") to code hosting. It is a GitHub replacement I am building on Radicle (radicle.xyz; the Heartwood protocol and its rad CLI). Radicle stores and replicates repositories and patches peer to peer; that part is Radicle's work, not mine. The forge adds the merge decision on top: agents open patches, and only gates, exact-head review verdicts and people decide what merges.

The forge is one program, forge (seeded Omega, forge/forge.om), with three commands: forge decide makes the merge decision from three intent objects, forge gate runs a repository's gate and its negative control in fresh clones of an exact head and writes the gate receipt, and forge status reads a repository's live Radicle patches and decides each one that has a verdict. Section 6 lists what runs today and what is planned; nothing in this document claims feature parity with GitHub.

1. Intent objects

An intent object asks for something. None of them is authority by itself.

ObjectWritten byFormCarries
Patch proposalan agent (through the desk; today RadPublish opens the Radicle patch from the agent's READY file)a Radicle patch (COB xyz.radicle.patch) whose current revision has one head committhe proposed change and its exact head sha
Review verdictan independent reviewerthe desk verdict file, line 1 VERDICT MERGE\|MERGE_AFTER_FIX\|REJECT head=<40 hex>, one reviewer= linea judgement about exactly one head
Gate receiptforge gate, from two fresh clones of the exact headforge-receipt v1 (forge/README.md)the repository, clone head and tree, omc sha256, the gate and negative-control commands and exit codes, the patch author, UTC start and finish, SHA-256 of both logs

The verdict format is the desk format already in use (~/handoffs/hive/manager/reviews/); the forge reads it as is. The receipt format is defined in forge/README.md. forge gate writes evidence, not a decision: its exit code says whether decide could merge, but only decide decides.

2. Authority: the merge decision

forge decide <patch-head> <verdict-file> <gate-receipt> is the merge decision. It prints MERGE OK and exits 0 only when every invariant below holds; otherwise it prints HOLD <CODE> and exits 1, with the first invariant that failed as the code. There is no third outcome and no override flag. A HOLD is not an error to work around: the patch waits for a new verdict, a new receipt or a person.

The decision is a pure function of the three inputs. decide reads two files and its arguments, writes one line, and starts no process. It does not merge: performing the merge (pushing main as the repository's delegate) stays with the delegate, today RadPublish following ~/handoffs/radicle/PROTOCOL.md section 4. forge decide is the check that the delegate runs before that push.

3. Fail-closed invariants

Each is checked in this order; reason codes are in forge/README.md.

  1. Well-formed inputs. The patch head is 40 lowercase hex. The verdict has one VERDICT line, first, in the exact form, ended by a newline or the end of the file; a second VERDICT line, a short or uppercase head, a trailing byte or space, a second word (`VERDICT MERGE head=<sha> REJECT) or CRLF is malformed, and so is a control byte in the reviewer=` value. The receipt has the exact header, known keys only, each at most once. Missing, empty or oversized files are unreadable. Malformed and unreadable both HOLD.
  2. MERGE only. MERGE_AFTER_FIX and REJECT HOLD. A verdict asking for fixes is not a merge, however small the fixes.
  3. Exact head. The verdict's head equals the patch head on all 40 hex digits. A prefix match is not a match. A new revision of the patch has a new head, so it voids the verdict (as the desk protocol says).
  4. A named reviewer. The verdict has exactly one reviewer= line, and its value holds at least one printable ASCII byte (33..126).
  5. The gate ran on that head. The receipt's clone equals the patch head.
  6. The runs finished. Neither gate_rc nor negctl_rc is 124, the code forge gate records when it killed a run at its timeout (HOLD GATE_TIMEOUT). This comes before the results (items 7 and 8) because a killed run's exit code says nothing about the patch: the evidence is incomplete before it is a failure, and a timed-out negative control must not count as a control that failed. A command that exits 124 by itself is read the same way (fail closed).
  7. The gate passed. gate_rc is 0.
  8. The negative control failed. The receipt has negctl_rc, and it is not 0. A gate whose negative control passes cannot tell a broken patch from a good one, so its PASS proves nothing.
  9. No self-review. The normalized reviewer text does not contain the normalized author: both are folded to ASCII lower case, with runs of spaces, tabs, _ and - collapsed to one space, and ASCII punctuation and spaces stripped at both ends. Identities are unsigned text until signed receipts land. Nobody merges their own work.

Anything the forge cannot prove is a HOLD. Every invariant has a test case that breaks only it and a mutant of forge.om that removes or weakens it; forge/tests/run.sh requires every case to give its expected line and exit code and every mutant to be caught.

Limits, stated plainly:

4. Mapping onto Crossveil

Crossveil (spec/CROSSVEIL.md) splits an effect into decide and execute and keeps authority on the runtime side. The forge uses the same split for a merge.

CrossveilForge
capability_request from the modelthe patch proposal (and its exact head) from an agent
runtime adapter decide(request, context) -> decisionforge decide head verdict receipt -> MERGE \| HOLD
authorizedMERGE OK
deniedHOLD with a reason (VERDICT_REJECT, GATE_FAIL, SELF_REVIEW, …)
requires_approval, continued only by the host with the minted approval_idHOLD VERDICT_MERGE_AFTER_FIX or a missing verdict: only a new reviewer verdict for the exact head continues it; nothing in the patch is read as approval
approval correlated to the digest of the exact capability_requestverdict and receipt bound to the exact 40-hex head
unknown decision value is deniedunknown verdict kind, malformed or unreadable files are HOLD
adapter fault in decide becomes deniedthe forge failing to read or parse anything is HOLD
execute runs only after authorizedthe delegate pushes main only after MERGE OK
a stale catalog is stale_capabilitya new patch revision changes the head, so the old verdict gives HEAD_MISMATCH

5. forge status

forge status <RID> [reviews-dir [receipts-dir]] asks the local Radicle node's storage, through rad patch list --all and rad patch show, for every patch of the repository, its status and its current head. For a head H it looks for exactly one verdict named *-<H[0..8]>.verdict.txt in the reviews directory and exactly one receipt named *-<H[0..8]>.receipt.txt (the name forge gate writes) in the receipts directory (names are followed through symlinks; two or more are VERDICT_AMBIGUOUS / RECEIPT_AMBIGUOUS), and prints the decision or NOT_RUN no verdict file. It is read-only: it never merges, comments or pushes.

6. Today and planned

Runs today (HOST_TESTED on spark, aarch64; evidence in the forge READY files):

Planned (not built):