Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/interplane-mv/blob/main/docs/FORGE.md # interplane-mv INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers 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. Object Written by Form Carries Patch proposal an 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 commit the proposed change and its exact head sha Review verdict an independent reviewer the desk verdict file, line 1 `VERDICT MERGE\|MERGE_AFTER_FIX\|REJECT head=<40 hex>`, one `reviewer=` line a judgement about exactly one head Gate receipt `forge gate`, from two fresh clones of the exact head `forge-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 ` is the merge decision. It prints `MERGE OK` and exits 0 only when every invariant below holds; otherwise it prints `HOLD ` 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`. - 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= 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. - MERGE only. `MERGE_AFTER_FIX` and `REJECT` HOLD. A verdict asking for fixes is not a merge, however small the fixes. - 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). - A named reviewer. The verdict has exactly one `reviewer=` line, and its value holds at least one printable ASCII byte (33..126). - The gate ran on that head. The receipt's `clone` equals the patch head. - 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). - The gate passed. `gate_rc` is 0. - 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. - 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: - Identities are asserted text. The verdict's `reviewer=` and the receipt's `author=` are not signed, so the self-review check compares normalized text (item 9: also `_` and `-` as spaces, ASCII punctuation stripped at both ends), not identities; it does not fold Unicode case or punctuation, or catch an alias. Signed verdicts (the desk's `rad patch review` or sigcheck route) and signed receipts are planned. - `forge status` decides at most 512 patches of a repository; when rad lists more it prints `TRUNCATED patches=N examined=512` and exits 2. - `forge gate` runs the gate and the negative control each in its own process group with a timeout (`--timeout S`, 1 to 86400, default 1800 s): at the timeout the whole group and the direct child by its pid get `SIGKILL`, the rc is recorded as 124 and a timeout line is appended to the hashed log; forge waits at most 10 s more for the reap. A grandchild that leaves the group (`setsid`, `setpgid`) escapes the kill, a direct child in uninterruptible sleep is left unreaped to init, background processes left after a command exits are not killed, and the gate command runs with the rights of the user who runs it. The receipt records `gate_cmd` joined with spaces, not shell-quoted. `decide` checks the form of `rid`, `tree`, `omc`, times and log hashes but compares none of them with anything. - `decide` trusts the paths it is given; `status` finds files by name (section 5). ## 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. Crossveil Forge `capability_request` from the model the patch proposal (and its exact head) from an agent runtime adapter `decide(request, context) -> decision` `forge decide head verdict receipt -> MERGE \| HOLD` `authorized` `MERGE OK` `denied` `HOLD` with a reason (`VERDICT_REJECT`, `GATE_FAIL`, `SELF_REVIEW`, …) `requires_approval`, continued only by the host with the minted `approval_id` `HOLD 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_request` verdict and receipt bound to the exact 40-hex head unknown decision value is `denied` unknown verdict kind, malformed or unreadable files are `HOLD` adapter fault in `decide` becomes `denied` the forge failing to read or parse anything is `HOLD` `execute` runs only after `authorized` the delegate pushes `main` only after `MERGE OK` a stale catalog is `stale_capability` a new patch revision changes the head, so the old verdict gives `HEAD_MISMATCH` ## 5. `forge status` `forge status [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 `*-.verdict.txt` in the reviews directory and exactly one receipt named `*-.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): - Radicle hosting and replication of the AIEN repositories (Radicle's software; my node and seeds), with the desk protocol: READY file, independent exact-head verdict, delegate merge. - `forge decide` (text and `--json`), replaying real desk decisions: omega-mv `215ea39a` and CUDApp `9714eba8` give MERGE, aien-architecture-mv `6daec174` gives HOLD (MERGE_AFTER_FIX), plus head mismatch, missing negative control and the other invariants; all mutants caught. - `forge gate` writing receipts from fresh clones out of Radicle storage, checked against `git`, `sha256sum` and `date -u` in the test suite, with a per-run timeout that kills the run's process group and holds as `GATE_TIMEOUT`. - `forge status` against live Radicle storage. Planned (not built): - Signed verdicts and receipts, checked by the forge. - A native Omega reader of Radicle patch COBs and git objects, replacing the `rad` and `git` CLI calls; an HTTP read path through radicle-httpd. - A web UI for patches, verdicts and decisions. - Issues. - CI runners on more than one host. - Federation of reviews: verdicts from reviewers on other Radicle nodes.