From 0c2aab1ab5847a5b8fc0a1169648ebade908a2bc Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 14:41:22 +0000 Subject: [PATCH] ABI choice 1: artifacts come from a host tool, checked cell for cell against the ROM's assembly Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm --- docs/v4.0.0/ABI.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/v4.0.0/ABI.md b/docs/v4.0.0/ABI.md index 7963597b..05abd3aa 100644 --- a/docs/v4.0.0/ABI.md +++ b/docs/v4.0.0/ABI.md @@ -63,7 +63,7 @@ All of it is in cells, so an F18 node can read it. | Record | Holds | |---|---| | **Header** | a magic number; the ABI version; the cell width (32 or 64); the record counts | -| **Provenance** (ADR §3.1) | the source capsule's hash; the compiler's identity (the ROM's hash, which assembled it); the build configuration's hash (the knobs, `V4_NODE_WORDS`, the rings); the target | +| **Provenance** (ADR §3.1) | the source capsule's hash; the compiler's identity (the host tool's hash, choice 1); the build configuration's hash (the knobs, `V4_NODE_WORDS`, the rings); the target | | **Exports** | for each word: its name, its entry's offset in the code, its flags, its declared stack effect, its capabilities | | **Imports** | for each word used from another capsule: (that capsule's hash, the name), and the stack effect it is expected to have | | **Relocations** | every cell of the code whose branch field holds an address, with how to fix it: internal (add the base), or import *k* | @@ -126,8 +126,10 @@ is verified (ADR §5); compatibility is checked against the old artifact's recor ## 9. Open, for ruling one at a time -1. **Where artifacts come from:** the ROM assembling the source as now, its output kept (the compiler - identity is then the ROM's hash), or a host tool? +1. ~~Where artifacts come from~~ **Ruled 2026-11-19: "A host tool".** A C tool beside `mkcapsule` compiles + `.f18` to artifacts on the build machine. It is a second assembler beside the ROM's, so the two must + agree: the tool's output is checked against what the ROM assembles from the same source, cell for cell, + in the build and in CI. The compiler's identity in the provenance record is the tool's own hash. 2. **The stack-effect declaration:** written in the source as today's `( a b -- c )` comments, parsed strictly, or a new form? 3. **What a capsule carries:** an artifact alone, or the artifact and its source (provenance, ADR §3.1)?