v4 mkf18a: import nucleus NAME -- hash 0, the effect from the nucleus (task 4, part 1)

mkf18a takes nucleus=SYSDIR, assembles the nucleus as the ROM does and
looks NAME up by its dictionary name; a word in line there, or one with
no fixed effect, is refused (plan section 12, rulings 3 and 4).
test_mkf18a: 5 new checks failed first, 93 pass at both widths. Its
build now has the host node's size, as the tool's has: the nucleus did
not fit a mesh node's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-20 03:53:57 +00:00
parent 7cfcbf2b68
commit 0684cd8362
8 changed files with 128 additions and 6 deletions
+4 -1
View File
@@ -9,7 +9,9 @@
* written after its name;
* - every `import TRAIN NAME` is an import of TRAIN's export NAME: TRAIN is given as an artifact, whose
* capsule ID (the XXHash64 of its bytes, as mkcapsule gives it) names it, and whose export gives the
* effects expected;
* effects expected. TRAIN `nucleus` is the nucleus (plan section 12): hash 0, NAME looked up by its
* dictionary name in the nucleus as the tool assembles it from its source, and its effect derived there;
* a word in line there, or one with no fixed effect, is refused. It declares no capabilities;
* - every address text.c records is a relocation;
* - the provenance's four SHA-512 hashes, each over files framed as: the file's name, a NUL, its length
* in 8 bytes low first, its bytes. The source: the train's .f18, in name order. The tool: its own
@@ -38,6 +40,7 @@ typedef struct {
const f18a_train *trains; /* the trains it may import from */
unsigned ntrains;
const char *tool_root; /* the v4 directory, for the tool's hash */
const char *nucleus; /* the nucleus's source directory, for `import nucleus NAME`, or NULL */
} f18a_args;
/* 1 and the artifact in *out (malloc'd, *len bytes), or 0 and why in err. */