All eight stages, a clean tree. loops() on every boot: heat 6, 1000
cooled to 0, variance not 0 and width 455 with L8 held on card 18, 66
card changes ending on card 11 -- the same on amd64, aarch64, riscv64
and the stick. dict_hash 0x7c5a2f0c02145e63, POST 992/992. The record
is logs/20261120-192820/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
The protocol's docs stage refused the two Task 9 words without
dictionary entries (my omission); every other stage passed, the loops
the same on the four boots: H=6, D=0, V=-1 455, L=66 11. Its report,
FAIL, is kept. The entries added, in the file's order; make dictionary
passes. The protocol runs again from accept-amd64.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
The acceptance session's loops(), at every v4 boot's prompt: a word's
heat (L1), its decay from a set heat (L3), INFER-RUN's variance and
width with L8 held on card 18 (L2, L5), and L8's changes. L8-HOLD
( card -- ), request -42, beside L8-CARD@, with its POST case: POST 992.
WORD_PHYSICS (Kconfig.physics, default y) turns the word loops off: a
boot with it off fails acceptance at POST (ruled 3a). Measured on amd64:
heat 6, 1000 cooled to 0 in 40 s, width 455, 66 changes. L8 unheld
settles on card 11, with the window off, so L2/L5 hold a card (ruled).
test_mesh_boot: L8-HOLD failed first, 144 checks now. V3-PARITY.md 2.2
corrected, dated. Gates pass, POST 992/992.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Request -41, served by the kernel from the node's L8 state; the word
in physics.4th. test_mesh_boot checks it against the kernel's own
values, changes more than 0: failed first (UNKNOWN WORD), now 142
checks pass. POST.md takes only the new case and the counts: the two
cells that differ run to run are #199's. POST_FLOOR 990 -> 991.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Stale since those capsules changed on this branch: the build rewrites
it, but each boot's restore (nightly.sh, qemu_session.py) put the
committed copy back. make -f kernel/Makefile manifest (#145, ruled).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
fe25519_carry's c << 51, with c negative after fe25519_sub, is
undefined in C99; the nightly's sanitized mesh boot stopped on it
(2026-11-20, run 333), reaching it through CI's signed capsules.
c * 2^51 is the same value. test_fe25519 (16 checks: values that
send a limb negative, and RFC 8032 tests 1 and 2 signed and verified)
runs in make -C v4 test and under ASan+UBSan in sanitize; it failed
first under UBSan at fe25519.c:31:26. Gates pass, POST 990/990.
The acceptance protocol runs before it reaches a PR (ruled: the next
PR, not #198).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
place.c places a train's artifact as ABI.md section 5 has it, the
code split at each export with its entry before it. test_mesh_boot
places tests/train-place, built by mkf18a with an import from the
nucleus: its words run by name, the nucleus's ABS is reached, the
kernel records each export, and six refusals leave Hera unchanged.
mkf18a refuses a word that runs on into an export. Failed first;
gates pass, POST 990/990. Plan section 13.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
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
The hash framing and what each provenance hash covers (choices 1, 2,
now in ARTIFACT.md section 4), the pool's unit 0, a literal store to
(PORT) as a request, capabilities through calls, and the import
placeholders at the node's top. Held locally until #198 merges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Every stage passes: the four boots at POST 990/990, dict_hash
0x0ffb1d31c4aa7857 on all three (405 words), test-32 (42 programs, 0
failures), the proofs, the images and the documents.
logs/20261119-230627/PROTOCOL.md. test-32 ran twice: a container
restart lost the first run, with no result.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
accept-amd64, accept-aarch64, accept-riscv64 and accept-stick-high
pass, POST 990/990, dict_hash 0x0ffb1d31c4aa7857 on all three (405
words); test-32, 42 programs, 0 failures. Two aarch64 runs stopped at
the 570 s foreground cap, not failed (212934 after the heartbeat,
213939 at node 11's SEND), are kept; the third ran in the background,
alone (rules, 2026-11-18), and passed. Proofs, images and docs to come.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
The artifact's layout and its check (artifact.h, artifact.c), the tool
(tools/f18a.c, mkf18a.c) and make -C v4 artifacts. test_mkf18a, 83
checks at both widths, failed against a stub first. Gates: test,
test-32 and sanitize pass, POST 990/990. Plan section 11.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
As ruled (plans §10.2, §10.3, §10.5): ': NAME inline pinned mode N
ports request N' records the word's attributes and lays nothing down;
'import TRAIN NAME' declares another train's word, its calls, jumps and
&NAME recorded as that import. test_text: 11 checks failed before; 274
pass at both widths. The check that ': T immediate ;' is refused is
replaced, as ruled. Full gates run at the end of task 3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Walks a word's code, opcode by opcode with the engine's own counts, and
gives what it takes and leaves on both stacks, or why it has none.
Called and in-line words; recursion, computed jumps, paths that meet at
different depths and loops that leave a count have none. Test first:
23 checks failed against a stub. SWAP', UM/MOD, C@, C! and ROUNDTRIP
agree with their stack comments. On the nucleus: 214 of 315 headers
fixed. v4 test, test-32 and ASan+UBSan pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Every cell laid down that holds an address of the assembly is recorded,
with its branch slot or 7 for the whole cell, as ARTIFACT.md's
relocations need. Test first: test_text 13 checks failed before.
test_host_rom_nucleus runs with the record on: 1825 branches, 664 whole
cells, the ROM still equal word for word. v4 test, test-32 and
ASan+UBSan pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Captain Bob ruled "As v3: add at call", "Engine: call redirects" and
"Build it".
- The engine's call hook returns where P goes.
- The kernel checks every call from code defined at run time. A TTL is
counted down at the call. At a TTL of 0, or a denied word, the call is
sent to (ACL-CALL), with the target on the data stack, which rechecks
or refuses it by the word's own name, then goes on to it.
- A word being compiled is no longer checked, as in v3.
Two things were added while building, both from v3:
- (ACL-BUSY) turns the check off while the policy rechecks. Without it
the recheck recursed.
- (ACL-CALL) does its own refusal and leaves WORD's buffer alone. A first
version broke POST's CONVERT.digits.
Test first: test_mesh_boot's five new checks failed before; now 120 pass
and POST is 990/990. test_exec tests the redirect. test_host_quit's two
v4-only expectations now follow v3: a denied word compiles.
All 52 tests, test-32 and ASan/UBSan pass. An amd64 session passes 18/18.
Five alternating host boots: +1.4% median, inside the noise.
DECOMPOSITION.md 5.20 is updated, and the FPGA's call opcode is recorded
as owing the same redirect.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Captain Bob ruled: "Also pin the kernel words". After the policy loads,
init.4th pins 11 words: BIRTH, BIRTH-AS, UNIT, KILL, UNIT-KILL, PAUSE,
RESUME, NODE-BORN, NODE-KILL, NODE-SLEEP and NODE-WAKE. Their fields
cannot be changed, so no policy can deny them. v4 has no CAPSULE-BIRTH.
The wiring words, NODE-WIRE and NODE-UNWIRE, are not pinned; they
neither create nor end a node.
Test first in test_mesh_boot: each of the 11 is pinned. The before-run
had all 11 unpinned. After: 114 checks pass, POST 990/990.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Captain Bob ruled "ACL at boot", loaded "From init.4th", the include
"Compose[d] in FORTH".
- capsules/v4/init.4th, at block 3980: S" v4:ACL.4th" CAPSULE-INCLUDE,
then STARSHIPOS.
- capsules/v4/ACL.4th is the policy, git mv'ed from v4/capsule/ACL.fth
and reflowed into chained 64x16 blocks, its text unchanged.
- CAPSULE-INCLUDE in centre.4th places a capsule and LOADs its lowest
block. It is composed from CAPSULE-OPEN and CAPSULE-LINE, with no new
C word.
- The mesh loads v4:init.4th after POST and COLD, its one fixed step
there.
Test first in test_mesh_boot: the parity line, DOE without naming
STARSHIPOS, and ACL-BOOT pinned. The before-run failed.
After: 113 checks pass and POST is 990/990. All 52 tests, test-32 and
ASan/UBSan pass. The dictionary has 405 words. One amd64 session passes
18/18 with "ACL: active".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Every stage passes. accept-aarch64 passes BIRTH and every later check,
in 459 s. POST is 990/990 on all four boots, with one dict_hash
(0x847bd8ef42f53e14). test-32, the proofs, the images and the docs pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
The heartbeat's one input walked all 335,544 Stadium cells every tick,
about 15 ms on aarch64 TCG, longer than a tick. At fast pacing it took
the CPU, and a birth missed the session's 300 s on CI. That was my
11-17 change.
Captain Bob ruled: sample less often, scaled by the cells, measured
first, as a slice each tick; the slope inference later.
- stadium_heat_walk_step() walks STADIUM_HEAT_SLICE_CELLS cells per
tick (Kconfig, 5500, about 0.25 ms on aarch64 TCG).
- A completed walk is one sample.
- The heartbeat's load takes a sample only when a walk is done.
Test first: test_stadium_node (21 checks) and test_heartbeat (13). Both
failed to build before. All kernel host tests pass. Four aarch64 boots
in a row pass 18/18 each, BIRTH included.
The evidence is in logs/20261119-heat-slice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Eight words at the PC, by its address, name the function offline. The
image loads where the firmware puts it, and the boot does not print
that address. aarch64's monitor has no $pc, so the address is taken
from the register line; checked on a real, paused QEMU.
Test first: the snapshot test, 6 checks; the new one failed before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
accept-aarch64 failed at BIRTH. The new CPU snapshot showed the kernel
looping, not hung. The other stages passed, including riscv64, the
stick, test-32, the proofs and the images. I ran them before reading
aarch64's result, which was the wrong order.
The repro boot (logs/20261119-012050) gave the code at each PC. Matched
in the loader EFI's map, they name bitmap_get inside
stadium_resident_heat_total, then background_decay and isqrt64. That is
the heartbeat's load, which walked all 335,544 Stadium cells every tick.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
CI's Acceptance fails on aarch64 at BIRTH on every head since 58d0e887.
The birth takes more than 300 s there and does not reproduce here: about
11 s, unsigned. The heartbeat spiral was ruled out by an instrumented
scratch kernel.
Captain Bob ruled "Diagnose on CI". On a failed check, the session script
asks QEMU's monitor for the registers three times, a second apart, and
prints the program counters, so CI's next failure shows where the kernel
is and whether it moves. A monitor that does not answer does not stop
the run.
Test first: scripts/test_qemu_session_snapshot.sh, 5 checks; 3 failed
before. The register text was checked on real, paused QEMU for aarch64,
riscv64 and x86.
The evidence and the measurements are in logs/20261119-ci-snapshot. The
local aarch64 timing run is in logs/20261118-235613.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Every stage passes. POST is 990/990 on all four boots, with one
dict_hash (0x847bd8ef42f53e14). test-32, the proofs, the images and the
docs pass. accept-aarch64 (411 s) and docs ran in the background, each
alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Captain Bob ruled: the line for new work is drawn with a merge, then a
tag, v4.0.0-alpha.5. This sets LITHOS_VERSION in kernel/Makefile and
updates README, CHANGELOG and CLAUDE.md to match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Every stage passes. POST is 990/990 on all four boots, with one
dict_hash (0x847bd8ef42f53e14). test-32, the proofs, the images and the
docs pass. accept-aarch64 (416 s) and docs ran in the background, each
alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This covers capsule blocks steps 1-4 for v4. Every stage passes.
- POST is 990/990 on all four boots.
- One dict_hash on the three ISAs: 0x847bd8ef42f53e14 (new, from
loading capsules through blocks).
- test-32, the proofs, the images and the docs pass.
- accept-aarch64 (435 s) and docs ran in the background, each alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Captain Bob ruled: Block n lands at n-R; the lowest block is
interpreted; chaining is the developer's; together, v4 first.
- v4_blocks_place_capsule copies each Block n into RAM block n - R as 16
lines of 64, space-padded, in any file order. A later block of the
same number overwrites. It refuses a block below R.
- The mesh's load(), its capsule reader (CAPSULE-OPEN/(LINES), so a
child's forth79.4th via BIRTH too), boot.c and test_host_unit's model
each place a capsule, then interpret "<lowest> LOAD".
- mkdictionary.py skips --> when it types capsules at the hosted prompt.
- The v4 capsules are renumbered into R..2R-1, landing at RAM 1900 and
up, away from POST's blocks 0-5. Each is chained with -->, and
centre.4th's gap at 8103 is closed.
Test first:
- test_host_blocks.c gained 6 placement checks; it failed to build
before.
- test_mesh_boot.c checks forth79's lowest block in RAM block 1900; it
failed before.
After: POST is 990/990; all 52 tests at 64 bits, test-32, hosted-check
and ASan/UBSan pass; the amd64 kernel builds; the dictionary has 404
words.
Logs are in logs/20261118-capsule-place.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Captain Bob ruled "Overwrite. That's it. Deterministic and final", within
a capsule and across capsules, "consistent with VOCABULARY FORGET & FENCE
philosophy, not implementation". Of what only prevented collisions:
"All of it goes".
- The cross-capsule collision gate is gone.
- tools/capsule-reserved.txt and its check are gone.
- The interactive resolver and its claim registry are gone.
- BLOCK_MAP.md says "Blocks used", and marks a shared number "the later
write overwrites". It is a convenience, not a gate.
- An unknown option is refused with the usage. A removed mode was
otherwise taken for the capsules directory, with its next argument as
the output file.
Test first: scripts/test_mkcapsule_overwrite.sh, 9 checks.
- The before-run failed 7. A repeat within one capsule already built,
since there was never a check for it.
- After: all 9 pass.
step 1's test still passes, the amd64 build is clean, all 40 capsules
lint, and the mesh boot passes 109 checks with POST 990/990.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Captain Bob ruled that the offset is the RAM block count, not a literal
2048.
- v3/include/blk_layout.h defines it, 2048 by default. block_subsystem.h
derives BLK_RAM_BLOCKS (2080) and BLK_DISK_START from it.
- Kconfig.kernel has the symbol. kernel/Makefile passes it to the
kernel's C code and builds mkcapsule and mkartemis with it.
- mkcapsule's two literal 2048s are now the knob.
The default value is unchanged, so the layout and the media are as before.
Test first: scripts/test_capsule_ram_blocks.sh, 8 checks.
- The before-run failed 4: the knob did not exist and mkcapsule ignored
it. Its three Makefile checks also hit a SIGPIPE flaw in the test,
fixed before the after-run.
- After: all 8 pass.
The amd64 build and mkartemis build clean. All 40 capsules lint. The
mesh boot passes 109 checks with POST 990/990. test_host_blocks,
test_host_quit, test_host_unit and test-32 pass.
Logs are in logs/20261118-ram-blocks-knob.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Every stage passes. On all four boots POST is 990/990, with one
dict_hash (0xf4e9fdc94f6bfc77). test-32, the proofs, the images and
the docs pass. accept-aarch64 (397 s) and docs ran in the background,
each alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Every stage passes. On all four boots POST is 990/990, with one
dict_hash (0xf4e9fdc94f6bfc77, word_count=404). test-32, the proofs,
the images and the docs pass. accept-aarch64 (401 s) and docs ran in
the background, alone, at Captain Bob's rulings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
All seven other stages passed: POST 990/990 on all four boots, one
dict_hash (0xf4e9fdc94f6bfc77, word_count=404), test-32, the proofs and
the images.
aarch64 went past 590 s twice in the foreground, killed at the BIRTH
step. One background run, at Captain Bob's ruling, passed in 429 s with
the birth's parity recorded.
The docs stage failed because the dictionary gate found no entry for
STARSHIPOS. The entry comes next, then the protocol again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
COLD set VOC-LINK to 0, assuming the sealed system has one vocabulary.
With starshipos.4th sealed in, STARSHIPOS fell out of the chain after
COLD. A word defined in it then forgotten, or COLDed away, hung the
node. ACL-INIT-PRIMITIVES would also have skipped its words.
FORGET's loop is now (PRUNE-ALL). It drops the vocabularies above (Q)
and prunes the lists of those that stay. FORGET calls it as before, and
COLD calls it with the sealed DP. No new cell and no new word.
Test first in test_mesh_boot.c: FORGET and COLD of a word in
STARSHIPOS, and STARSHIPOS's own words staying. The before-run hung and
was stopped at 500 s. After: 109 checks pass, POST is 990/990, all 52
64-bit tests and test-32 pass, ASan/UBSan are clean, and the amd64
build is clean.
Found by Captain Bob's "make sure we're not applying incorrect logic".
Ruled: fix first, then the protocol. Logs are in
logs/20261118-cold-vocabularies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Every boot passed: POST 990/990 on all four, dict_hash
0x3172c04e863199f4 on the three ISAs. test-32, the proofs and the
images passed.
The docs stage was stopped. The protocol is superseded because a latent
fault was found: COLD drops STARSHIPOS from the vocabulary chain
(VOC-LINK 0). Captain Bob ruled: fix first, then the protocol.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Captain Bob ruled that MACHINE.md stands. The kernel's system capsules
are now starshipos.4th, centre.4th, hera.4th and physics.4th, after
forth79.4th.
COLD, after POST, leaves FORTH alone in the search order, so the
prompt reaches STARSHIPOS's words by naming the vocabulary. The ruling
is that init.4th will set the search order; the capsule's header now
says so.
Test first in test_mesh_boot.c: its parity line, and `STARSHIPOS S" ok"
DOE`. It failed before the change. 105 checks now pass, POST is
990/990, and ASan/UBSan and the amd64 build are clean.
Logs are in logs/20261118-starshipos.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Every stage passes. On all four boots POST is 990/990, with one
dict_hash (0x627f392ccbaa96f1). test-32, the proofs, the images and the
docs pass. The docs stage ran in the background at Captain Bob's ruling.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
The kernel boots the fabric with Hera at place 0. Nodes are born and
killed through her. The fabric is lockstep. Each step walks only the
places that hold a node, and every node ticks on the one adaptive
heartbeat.
Ruled by Captain Bob.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
fleet (Hera/Artemis/Hestia — Hermes moved into the kernel as kernel-Hermes, FABRIC-3.6.md
Phase 4, 2026-09-22), and word-level ACL (Phases 1–7) are live; POST at boot verifies parity
hash across amd64/aarch64/riscv64 with a 318-word Mama capsule dictionary (word count as of
2026-11-10, hash `0x8c92508f748f99cf`; corrected 2026-11-10 — this file said 526 words,
hash across amd64/aarch64/riscv64 with a 404-word dictionary (word count as of 2026-11-18, hash
`0x847bd8ef42f53e14`, POST 990/990, `logs/20261118-204012/PROTOCOL.md`, capsules loaded through blocks; before that
`0xf4e9fdc94f6bfc77`, `logs/20261118-151921/PROTOCOL.md`; corrected 2026-11-18 — this file said
403 words, hash `0x627f392ccbaa96f1` (2026-11-17, before `starshipos.4th` loaded); it said 318 words, hash `0x8c92508f748f99cf` (2026-11-10); corrected 2026-11-10 — it said 526 words,
hash `0x82f4ae7cb2e2d424` (2026-10-14, `FABRIC-3.md` §XXXVIII); verify against a live
`PARITY:V4_SYSTEM word_count=` line before citing, it changes with any new C word registration).
Two independently tracked version strings flow into the generated `include/version.h`:
`VERSION` (`kernel/Makefile` — the embedded StarForth engine version, currently `3.2.0`;
note this does **not** auto-sync with the standalone StarForth repo's own version) and
`LITHOS_VERSION` (`kernel/Makefile` — the kernel version, currently **`4.0.0-alpha.4`**; corrected 2026-11-10 — this file said `2.1.0` (bumped at
`LITHOS_VERSION` (`kernel/Makefile` — the kernel version, currently **`4.0.0-alpha.5`**; corrected 2026-11-18 — this file said `4.0.0-alpha.4`; corrected 2026-11-10 — it said `2.1.0` (bumped at
the `v2.1.0` tag that closed FABRIC-3.6; corrected 2026-10-14 from `3.1.0` / `2.0.0`, which
replaced `2.0.1` on 2026-09-19 per `FABRIC-3.md` §I.2 — `2.0.1` named the SER5
hardware-track line and claimed unverified progress). The versioning policy is
@@ -313,7 +315,10 @@ for its tree -- any change outside the evidence after the run is stale, and the
again. **One stage per foreground command is also a protocol**, and is how an agent runs it (the
QEMU rule: never in the background): `scripts/nightly.sh protocol accept-amd64`, then
`dict_hash` is `0x847bd8ef42f53e14`. `docs/fabric/FABRIC-3.md` XLVIII.25–28.
## 2026-11-10 — LithosAnanke v4.0.0-alpha.4: the plug-and-play stick
The plug-and-play stick (#92), the BAM flush (#155), the Book of Fabric (#138), the Dictionary of v4 (#157), and the .com’s Downloads and Documents pages (#126, #161).
the kernel `4.0.0-alpha.5` with the StarForth engine `3.2.0`.
---
@@ -45,13 +45,13 @@ milestone, #156): what v4 needs of it, the block layer, moves into v4 and the re
| Bare metal | a generic PC (amd64; first on the bench: a Beelink SER5), Raspberry Pi 5 (aarch64), Milk-V Mars (riscv64); Zynq-7020 (ARMv7) not yet ported | Images build; first boots on the bench — `boards/BRINGUP.md` |
**v4 is the default build, and v3 is being retired**: every kernel boots v4 unless its boot
arguments say `system=v3`. POST at boot, on all three ISAs: v4 — **538 tests**,
@@ -6760,3 +6760,90 @@ Pushed at Captain Bob's word (8660ab77).
**Next:** mechanism A, test first, measured by five alternating runs, then the protocol.
### 26. Mechanism A: the fabric step walks only the places that hold a node (2026-11-17)
Captain Bob: "Go". The design and its evidence are in `docs/v4.0.0/plans/2026-11-17-the-fabric-step-cost.md`
section 7.
**The change** (edbb79e2):
- The fabric keeps its occupied places in a list, in ascending order. The step's nine passes walk that
list, in the same order as before.
- A node removed while a pass is at it keeps its link, so the walk goes on to the next node.
**Test first:** `test_fabric_walk.c`, 13 checks. Every existing test passes with the same checks.
**The cost:** the host mesh boot's median fell from 11.695 s to 7.999 s, 32% less, over five alternating
runs (`logs/20261117-mechanism-a/timing.txt`).
**The protocol on edbb79e2** (`logs/20261117-222402/PROTOCOL.md`): **PASS**.
- All four boots run POST 990 of 990 with one `dict_hash`, `0x627f392ccbaa96f1`.
- aarch64 is inside its 570 s. It had stopped in POST since 37469f6c.
- test-32, the proofs, the images and the docs pass.
- The docs stage runs longer than one foreground command; it ran in the background at Captain Bob's ruling.
### 27. starshipos.4th loaded; COLD keeps the vocabularies as sealed (2026-11-18)
**The audit of Phase 7 Tasks 5–7.** Task 8's 990 already covers their POST modules (ticked, b789d18a).
What the record asks beyond POST, each gap put to Captain Bob one at a time:
- **`starshipos.4th` loads before POST, after `forth79.4th`** (4137f1b7). MACHINE.md §3 step 3 says so
(ruled 2026-10-15). A first answer, "leave it unloaded", was given before that ruling had been shown,
and was reverted once it had.
- **`init.4th`: designed and held** (`docs/v4.0.0/plans/2026-11-18-v4-init.md`). Captain Bob: "Capsules
are ephemeral. We need to talk later." The loaders already keep no capsule's blocks: v4 drops the
`Block <n>` number and sends the lines, and v3 copies the blocks from block 1. Only the build tooling
(`mkcapsule`'s collision check, `BLOCK_MAP.md`) and the documents still treat ranges as claims.
- **Still open:**
- the ACL policy is not loaded by the kernel's boot;
- `BIRTH` is not pinned;
- the countdown "at call";
- Artemis's writes.
**A fault found by checking the logic** (Captain Bob: "make sure we're not applying incorrect logic";
295cd518).
- **The fault:**`COLD` set `VOC-LINK` to 0, on the assumption that the sealed system has one
vocabulary. With `STARSHIPOS` sealed in, a word defined in it and then forgotten, or COLDed away, hung
the node.
- **The fix:**`FORGET`'s prune is now `(PRUNE-ALL)`, and `COLD` uses it with the sealed `DP`. It adds no
cell and no word.
- **Test first:** the before-run hung and was stopped at 500 s; after, 109 checks pass.
- **The docs gate refused the build** until `STARSHIPOS` had its dictionary entry (573d386b).
**The protocol on 573d386b** (`logs/20261118-151921/PROTOCOL.md`): **PASS**.
- POST is 990/990 on all four boots.
- One `dict_hash` on the three ISAs: `0xf4e9fdc94f6bfc77`, `word_count=404`.
- `accept-aarch64`, the boot plus its session, now takes longer than one foreground command (401 to
429 s, and over 595 s three times in the foreground).
- **Ruled:** a long stage runs in the background, but only alone: "as long as there is no other
background process running including docs. In fact that might generalize too" (`.claude/memory/rules.md`).
### 28. Capsule blocks: no claims, placed in RAM, the lowest loaded (2026-11-18)
**The talk** (Captain Bob): "Capsules are ephemeral." Its rulings, one at a time, are in
`docs/v4.0.0/plans/2026-11-18-capsule-blocks.md`:
- `Block n` is copied down by R, the RAM block count; the fixed 2048 was "THE BUG".
- A later write overwrites: "Deterministic and final", within a capsule too.
- Where a block lands, and any chaining, is the developer's responsibility.
- The block map is "a convenience", and the range tables go.
**Built, test first, each step verified:**
| Step | Commit | What |
|---|---|---|
| 1 | 6f9900f8 | `BLK_RAM_USER_BLOCKS` is a Kconfig knob (default 2048). The kernel's block layout, `mkcapsule` and `mkartemis` follow it. |
| 2 | f30005e1 | `mkcapsule` makes no claims. The collision gate, `capsule-reserved.txt` and the resolver go ("All of it goes"). |
| 3 + 4, v4 | 6dcfbe67 | Every v4 loader places a capsule's blocks in RAM at `n - R`, then interprets `<lowest> LOAD`. The v4 capsules are renumbered to land at 1900 and up, and chained with `-->`. |
**Kept as is:**
- v3's `INIT` ("Yeah, keep").
- The hosted product, only kept green for the gates that run it: "Nobody cares about hosted anymore".
**`(-` as a build marker per block:** an open stub, until the SDK.
**The protocol on 53b1e98e** (`logs/20261118-204012/PROTOCOL.md`): **PASS**.
- POST is 990/990 on all four boots.
- `dict_hash` is `0x847bd8ef42f53e14` on all three ISAs; it changed with the block path.
**The line drawn here** (Captain Bob: "I want to make a delineation for new work"; ruled "Merge, then a
tag"): PR #197 merges once its Acceptance passes, and a tag on `master` marks the line. New work starts
@@ -208,6 +208,8 @@ IS ( xt -- ) IS xxx: make the deferred word xxx run xt; compiled when compiling.
J ( -- n ) Compile-only: the index of the next outer DO loop.
KERNEL-WORD ( n -- ) KERNEL-WORD xxx: define xxx, a word that asks the kernel to do request n (as BYE, BLOCK).
KEY ( -- c ) Wait for a key and leave its character.
L8-CARD@ ( -- card changes ) L8's current card on this node, 0 to 63, and how many times it has changed: more than 0 once L8 has run.
L8-HOLD ( card -- ) Holds L8 on the card given, 0 to 63, its gates applied; -1 lets L8 choose again.
LATEST ( -- xt ) The newest entry of the CURRENT vocabulary.
LEAVE ( -- ) Compile-only: leave the innermost DO loop at its next LOOP or +LOOP.
LFA ( xt -- addr ) The link field of the entry (>LINK).
@@ -336,6 +338,7 @@ VARIABLE ( -- ) VARIABLE xxx: define xxx, which leaves the address of one cell.
VERSION ( -- ) Print which system this is, and its cell width.
VLIST ( -- ) List the names in the CONTEXT vocabulary (WORDS).
VOCABULARY ( -- ) VOCABULARY xxx: define a vocabulary xxx; running it makes it the CONTEXT vocabulary.
STARSHIPOS ( -- ) Make STARSHIPOS, the vocabulary of the StarshipOS words (starshipos.4th, loaded before POST), the CONTEXT vocabulary; a search of it that finds nothing searches FORTH.
WARM ( -- ) Print the system's message and ABORT: both stacks emptied, the prompt.
WHILE ( flag -- ) Compile-only: in BEGIN ... WHILE ... REPEAT, leave the loop if flag is zero.
WITHIN ( n low high -- flag ) True if low <= n < high.
@@ -388,6 +391,7 @@ BIRTH-AS ( number port childport baddr u -- place ) BIRTH, and given the capsule
CAPSULE-CELL ( -- w flag ) The next cell of the capsule of F18 code this node has open, and true; 0 0 at its end. A kernel request.
CAPSULE-LINE ( baddr -- u | -1 ) The next line of the capsule of FORTH blocks this node has open, copied to baddr: its length, or -1 at its end. A kernel request.
CAPSULE-OPEN ( baddr u -- flag ) Find the named capsule, check its hash and signature, and open it to be read from its start by this node. A kernel request.
CAPSULE-INCLUDE ( baddr u -- ) Load the named capsule of FORTH blocks into this node: CAPSULE-OPEN places its blocks in RAM, block n at n - R, and its lowest block is LOADed; what runs after it is the capsule's own (-->, LOAD, THRU). init.4th loads the ACL policy so. centre.4th.
CENTRE ( n -- ) Hera only: a second centre, node n, from its port 6 to Hera's port 6, given centre.4th; it births its own unit, n+1 to n+4.
KILL ( n -- ) Hera only: node n is removed, whatever it was doing; every node is told it is gone, and Hera forgets the way to it.
NODE-BORN ( number -- place | -1 ) A node is born, empty, and entered in the registry with this node as its parent: its place, or -1 if there is no room. A kernel request.
Can't render this file because it contains an unexpected character in line 11 and column 3.
Written 2026-11-19. Step 1 of `ADR-2026-11-19-F18-ARTIFACTS.md` §7: "Define and document the minimal ABI
contract". It builds on the rulings in `plans/2026-11-19-f18-artifacts.md`:
1. compiled artifacts are allowed beside the ROM;
2. Hermes is the messaging role;
3. Artemis owns persistent memory;
4. a word's identity is its capsule plus its name.
**Nothing here is built.** The choices left open are numbered in §9, and each will be put to Captain Bob on
its own.
## 1. Terms
| Term | Meaning |
|---|---|
| **Word** | The unit of interface and access control (ADR §1). It has a name, an entry point, a stack effect and its ACL fields. |
| **Capsule: a train** | The unit of packaging, distribution and deployment (ADR §1). It is content-addressed, so its ID is its hash, and it is signed, as now (`kernel/include/starkernel/capsule.h`). **Ruled 2026-11-19, "One train per capsule":** each capsule is a train. Its *engine* is its `.f18` code, assembled by the host tool into one artifact. Its *rolling stock* is the named blobs coupled behind the engine: `.4th` source, data, and whatever else it carries, each with its own identity and provenance. A system is many trains; the nucleus is one of them. |
| **Artifact: the engine** | A train's compiled F18 unit: code cells, and the records of §4 that make them placeable and checkable. It is assembled from all of that capsule's `.f18` files. |
| **Rolling stock** | The named blobs behind an engine (MACHINE.md §1's trailer). The engine's code is what acts on them: the ROM's types, `.f18` assembled and `.4th` handed a line at a time, now carried by each train. |
| **Identity** | Ruling 4: a word's identity is (the hash of the capsule that defines it, the word's name). Addresses, word IDs and places are local resolution only. |
| **Loader** | Whoever places an artifact in a node. As today, that is the node itself, through words like `CAPSULE-INCLUDE`, or the kernel at boot. No central linker (ADR §6). |
## 2. The hardware contract (unchanged; kept apart, ADR §3.2)
The engine's contract is what it is today, and the ABI does not change it:
- **Instruction words** of six slots (`v4/include/v4/iword.h`). A branch (`jump`, `call`, `next`, `if`,
`-if`) carries its target in the bits to the right of its slot, page-relative, with a reach of 27, 22, 17
or 12 bits.
- **The return stack and the data stack** are rings, with their depths set by the build (`V4_DATA_RING`,
`V4_RET_RING`). A call pushes its return address.
- **Ports and messages** between nodes, as MESH.md has them. The ABI adds nothing between nodes: "inter-core
communication shall continue to use the established message architecture" (ADR §3.2).
- **The call hook** (2026-11-19, `exec.h`) may redirect a call. The ACL uses it now; §6 may use it.
**What this means for artifacts:** compiled code holds addresses in its branch fields. An artifact placed
anywhere but where it was compiled needs those fields fixed (§5).
## 3. The word contract
**The entry** is as `dict.f18` has it today:
| Cell | Holds |
|---|---|
| `xt - 4` | the word ID, local |
| `xt - 3` | the flags: 1 immediate, 2 hidden, 4 data, 8 in-line, 16 compile-only, 128 deferred, plus the ACL fields (bit 5 denied, bit 6 pinned, bits 8–15 the mode, bits 16–31 the TTL) |
| `xt - 2` | the name |
| `xt - 1` | the link |
| `xt` | the code |
**What the ABI adds is recorded, not run.** Each exported word has:
- **its stack effect:** how many cells it takes and leaves on each stack. This is the "stack effects" of
ADR §3.2. It is derived by the host tool from the compiled code (choice 2), checked when the artifact is
placed and in the proofs, never at run time.
- **its capabilities:** the kernel requests it may make (`KERNEL-WORD` numbers) and whether it touches ports.
- **its ACL defaults:** pinned or not, and its mode. They are applied at placement, through the same fields.
**The calling convention:** a call with a return address on the return stack, as now. A word returns with
`;`. Arguments and results travel on the data stack only, in the declared counts. There is nothing else.
## 4. The artifact
**The records are in 32-bit units, low byte first, and the code is in the build's cells** (`ARTIFACT.md`
§1, ruled 2026-11-19, "32-bit units"). A node reads the records as it reads a block, four bytes to a
cell. *Corrected 2026-11-19: this line said "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 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* |
| **Code** | the compiled cells, as if placed at address 0 |
| **Verification** | the identity of the proof that covers this exact artifact, and the assumptions it holds under (ADR §5), or none |
**Integrity and authorship** are the capsule's: its content hash and its Ed25519 signature, as now. The
artifact repeats neither, and, as ADR §5 says, a hash is not correctness.
## 5. Placement: resolution without a linker
A loader places an artifact in one pass, in order:
1. **Check:**
- the header is one this ABI version and cell width take;
- the capsule's hash and signature check, as `CAPSULE-OPEN` already does;
- every import's capsule is present in this node, and the imported word is exported by it with the
stack effect expected. **Fail closed:** if any check fails, nothing is placed.
2. **Place:** the code cells are copied to the node's dictionary space at its `HERE`, the base.
3. **Fix:** each relocation's branch field is patched, adding the base, or putting in the import's
resolved address. A field whose patched address does not fit its slot's reach is refused (fail
closed). Patching happens at placement only, once, with no lazy binding and no later resolution.
4. **Enter:** an entry is made for each export, as `(HEADER)` makes one, and the kernel is told
(`(WORD-DEFINED)`). The word accounts, the ACL fields and the defaults of §3 apply from here.
This is the work FORTH's compiler already does when it compiles a reference to a word. It is done here
from records, not from source. It is not dynamic linking in the ADR's sense: there are no shared libraries,
no lazy binding, no global address space and no linker running beside the program.
## 6. Activation and retirement (ADR §4)
**A replacement** is a newer capsule exporting a word of the same name. Its identity differs, because its
capsule hash differs. Activation must make the code that calls the old word reach the new one. The call
sites compiled into other definitions hold the old address (§2). Choice 5 is how they reach it.
**A safe boundary** is a heartbeat at which no node is inside the old word: no return address into it is
on any return stack, and no message for it is waiting. Choice 6 is how that is known.
**Retirement:** the old code is freed only when nothing can reach it. Until then both versions coexist
(ADR §4).
**Rollback** is activating the old one again, as long as it is not retired. Artemis keeps the staged and
recovery copies (ruling 3).
## 7. Compatibility
**A replacement is compatible** when, for every word the old artifact exported:
- the new one exports a word of the same name;
- with the same stack effect;
- needing no capability the old did not.
Anything else is incompatible, and activation is refused. A verified artifact is not compatible because it
is verified (ADR §5); compatibility is checked against the old artifact's records.
## 8. What stays as it is
- POST, the protocol, and CI's gates (ADR §7).
- Source capsules and the boot as it is: the ROM still assembles the system at boot (ruling 1).
- The ACL's check at call, and the word accounts: an artifact's words are words like any other.
- Messages between nodes.
**Captain Bob's image, 2026-11-19:** "the .f18 assembler assembles all .f18 files it finds. Now here's a
thought. That 'assembled' code can be the 'engine' for a train of named blobs as metaphorically rolling
stock." Ruled "One train per capsule" (§1).
**The rail yard: the SDK and CI's model** (Captain Bob, 2026-11-19, recorded as given; nothing built):
> "When we build the SDK, we can naturally think of a railroad yard for staging outgoing artifact capsule
> 'trains' from first order preexisting 'cars' prior to writing new ones.. That would be the model and on
> the CI side we can use messaging as semaphores in our staging yard with inbound and outbound trains and
> the artifacts are the persistent part. Signed, sealed and versioned."
Read here as:
- **The yard stages trains.** An outgoing train is made up first from cars that already exist, which are
first-order and already built. New cars are written only for what is missing.
- **In CI, messages are the semaphores.** They signal inbound and outbound trains through the yard: what
may move, and when.
- **What persists is the artifacts:** signed, sealed and versioned. The yard's moves are transient.
It ties in `(-`, the build marker that asks CI to clear a block for the next image (`plans/2026-11-18-
capsule-blocks.md` §5), and Artemis keeping what is kept (ruling 3).
## 9. Open, for ruling one at a time
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.
The cell-for-cell check was added in drafting; confirmed by Captain Bob, 2026-11-19 ("Yes").
2. ~~The stack-effect declaration~~ **Ruled 2026-11-19: "Derived by the tool".**
- A first answer, "the ( -- ) comment, strict", was withdrawn the same day. Captain Bob: "I think I may
have made a bad assumption. I had the idea of that after (- was aliased to ( is for SDK special. We're
working on something more fundamental."
- **There is no declaration in the source.** The host tool computes each exported word's stack effect
from its compiled code, by static analysis of the F18 opcodes, and records it in the artifact. The
proofs check it. Comments stay comments.
- **2c, ruled 2026-11-19: "Refused as an export".** A word whose effect depends on its data (a loop
leaving a count of values, branches that leave different depths, `EXECUTE`, a `DEFER`red word) has no
fixed count. It cannot be exported by an engine: it stays internal to its train, or is restructured.
Every export has a fixed effect, derived by the tool; a word with none stays internal, and the build
does not fail for it (`plans/2026-11-19-f18-artifact-build.md` §6.4). *Corrected 2026-11-19: this
said "which the tool derives and the build fails without".*
3. ~~What a capsule carries~~**Ruled 2026-11-19: "No, by reference".** A train's engine carries only the
hash of the `.f18` source it was assembled from, in its provenance record. The source stays in the
repository and in its own capsule. To check an engine against its source, the source is fetched by
that hash.
4. ~~Imports by capsule hash~~**Ruled 2026-11-19: "Exact hash".** An import names the exact build of
the train it imports from: (its capsule hash, the word's name). If that train is rebuilt or updated,
its hash changes, so its importers are rebuilt too, and a live update replaces the whole dependent set
of trains together. Placement refuses an import whose hash is not present.
**Ruled 2026-11-19 (step 3, `plans/2026-11-19-f18-artifact-build.md` §10.4):** a train's hash is its
`.f18a`'s capsule ID. The nucleus has none, so a word imported from it has hash 0 and is resolved by name
in the node's dictionary at placement; exact hashes hold between artifact trains only.
5. ~~How callers reach a replacement~~**Ruled 2026-11-19: "Jump at the old entry".** At activation, each
replaced word's first code cell, at its xt, is overwritten with a `jump` to the new word: one cell per
word, and every caller, compiled at run time or not, follows at once. The old code stays in place,
unreachable but for that cell, until it is retired. The new word must be within the jump's reach from
the old entry (27 bits in slot 0, which covers a node's memory), or activation is refused.
6. ~~The safe boundary~~**Ruled 2026-11-19: "Scan at a heartbeat".** At a heartbeat tick the kernel
scans every node's P and return stack for an address inside the old words' code. When none is there, it
writes all of a set's jumps in that one tick. While some are there, it tries again on later ticks. A
message waiting for an old word is not code on a stack and does not hold the set back: the word it
reaches is the new one. That last point was added in drafting; confirmed by Captain Bob, 2026-11-19
("Yes").
7. ~~Proofs first~~**Ruled 2026-11-19: "Safe activation first".** The first Isabelle/HOL property:
- the jump at each old entry is written only at a tick when no node's P or return stack holds an address
inside the old code (choice 6);
- after it, every call to an old word, from any caller, reaches the new word.
Placement's checks, compatibility and the soundness of the derived stack effects come after.
## 10. Status
All seven choices are ruled, plus 2c (no fixed effect means no export). This draft is the minimal ABI
contract, the ADR's step 1, as ruled.
The next step is the ADR's step 2, the artifact representation in detail: the exact cell layout of §4's
StarshipOS shall establish a canonical binary artifact format for compiled F18 code, supported by a minimal, formally specified Application Binary Interface (ABI) and Application Programming Interface (API).
The ABI shall operate at the word and capsule levels:
- Words are the units of interface and access control.
- Capsules are the units of packaging, distribution, and deployment.
The implementation shall preserve the existing StarshipOS architecture without introducing conventional dynamic linking, shared-library infrastructure, or unnecessary runtime machinery.
### 2. Motivation
This decision supports four primary objectives:
1. Performance: Eliminate redundant compilation, dependency resolution, and other avoidable work from build and startup paths.
2. Verification: Provide immutable binary artifacts suitable for Isabelle/HOL verification and reproducible-build validation.
3. Authenticity and provenance: Establish traceability between source, build configuration, compiler, binary artifact, and formal verification evidence.
4. Live updates: Permit verified binary components to be staged and activated within a running StarshipOS instance without requiring a complete system restart.
Performance improvements must be measured. Binary artifact creation alone does not guarantee reduced startup latency.
### 3. Architectural Contract
#### 3.1 F18 Binary Artifacts
The build system shall compile F18 source into a canonical, versioned binary artifact representation.
An artifact shall provide sufficient information to establish:
- Artifact identity and integrity.
- Source and build provenance.
- Target architecture and compatibility constraints.
- Exported and imported word identities.
- Word-level interface contracts.
- Dependencies and required capabilities.
- Verification status and associated proof identity.
The format may contain individually addressable compiled units.
Artifacts shall remain independent of final deployment decisions. A compiled unit may be incorporated into kernel ROM or distributed as a runtime-consumable capsule.
Source files, compiled binaries, and supporting documentation shall retain their individual provenance.
#### 3.2 Application Binary Interface (ABI)
The ABI shall define the minimum binary-level contract necessary for independently compiled components to interoperate.
It shall address:
- Word identity and resolution.
- Calling conventions and stack effects.
- Memory ownership and access constraints.
- Entry points and dependencies.
- Capability and ACL requirements.
- Binary compatibility.
- Activation and retirement semantics.
The F18 hardware execution contract and the StarshipOS artifact interoperability contract shall remain conceptually distinct.
Logical word identity shall not depend on physical memory addresses or processor placement.
Local execution may resolve to physical addresses. Inter-core communication shall continue to use the established message architecture.
#### 3.3 Application Programming Interface (API)
The API shall expose the minimum operations necessary for artifact discovery, verification, staging, activation, retirement, and recovery.
These operations should be implemented through existing StarshipOS facilities wherever practical.
They shall not automatically require new kernel primitives.
The API shall preserve the existing responsibilities of:
- Hera: System ownership, component creation, and coordination.
- Hermes: Messaging, routing, and communication.
<!-- Ruled 2026-11-19 ("The messaging role"): Hermes names the role, not a VM. In v4 it is the fabric's wires
and routing (MESH.md), and kernel-Hermes on v3; no Hermes node is brought back. -->
- Artemis: Memory, persistence, and recovery.
<!-- Ruled 2026-11-19 ("Persistent memory"): Artemis owns what is kept -- persistent storage, staged artifacts,
recovery copies (FABRIC-3.5 XIV.3). Run-time memory stays the kernel's: the Stadium allocates it, and the
kernel serves blocks. -->
Specific API word names and signatures remain implementation decisions.
### 4. Live Runtime Updates
StarshipOS shall support the architectural capability to introduce verified replacement artifacts into a running system.
The intended lifecycle is:
1. Build the replacement artifact.
2. Verify integrity, compatibility, and applicable formal properties.
3. Distribute and stage the artifact.
4. Establish a safe activation boundary.
5. Activate the replacement.
6. Retire the previous implementation when safe.
7. Preserve recovery or rollback capability where applicable.
Heartbeat boundaries may provide logical activation points, but safe replacement must account for outstanding execution, messages, dependencies, and persistent state.
Multiple artifact versions may coexist during transitions.
Live replacement shall not violate existing runtime invariants or word-level ACL guarantees.
### 5. Formal Verification
The ABI and artifact format shall be suitable for specification in Isabelle/HOL.
Verification objectives include:
- Artifact structural validity.
- Interface and stack-effect compatibility.
- Dependency satisfaction.
- Memory and capability constraints.
- Safe activation and retirement.
- Preservation of established invariants across compatible replacements.
Proof evidence shall be associated with the exact artifact and its applicable assumptions.
Cryptographic integrity and authenticity shall be distinguished from functional correctness. Hashes alone do not establish correctness or authorship.
A verified replacement shall not be considered universally compatible merely because its individual components have been verified.
### 6. Explicit Non-Goals
This decision does not authorize introducing:
- ELF-style dynamic linking or shared libraries.
- A conventional process loader.
- A centralized runtime linker.
- A global executable address space.
- A conventional scheduler or memory manager.
- A new execution model.
- Mandatory inclusion of all compiled artifacts in kernel ROM.
- Unnecessary kernel primitives or additional abstraction layers.
The existing asynchronous, message-driven architecture remains authoritative.
### 7. Implementation Direction
Implementation shall proceed incrementally:
1. Define and document the minimal ABI contract.
2. Establish the canonical binary artifact representation.
3. Integrate artifact production into the existing build system.
4. Add integrity, provenance, and reproducibility checks.
5. Formalize applicable ABI properties in Isabelle/HOL.
6. Implement minimal artifact API operations.
7. Validate staged and live replacement using controlled experiments.
8. Measure build time, startup latency, runtime overhead, and replacement correctness.
Existing build, POST, CI, and verification gates shall remain in force unless explicitly superseded by independently validated equivalents.
### 8. Governing Principle
Words define interfaces. Capsules define deployment. Artifacts establish identity and provenance. The ABI guarantees interoperability. The API exposes operations. Isabelle/HOL verifies the applicable contracts.
No additional machinery shall be introduced without demonstrated necessity.
The machine remains the machine.
---
Decision: ACCEPTED
Implementation: Pending incremental design and experimental validation
Architectural impact: Foundational — F18 toolchain, capsule infrastructure, formal verification, and live deployment.
| **Trailer** | Source, as named blobs. `.f18` is F18 assembler. `.4th` is FORTH. The blob's name gives its type. | The capsule directory (`capsules/`) |
The ROM is the only binary. It runs the same on the C engine and on the FPGA: one binary, the
same behaviour. Assemble FORTH from the trailer and the node is a FORTH machine. Assemble Lisp
same behaviour. **Superseded in part, 2026-11-19** (Captain Bob, "ADR supersedes";
`ADR-2026-11-19-F18-ARTIFACTS.md`): the build may also compile F18 into binary artifacts, with their
identity, provenance and interface. An artifact is a choice, not a requirement: the ROM still
assembles source at boot. Assemble FORTH from the trailer and the node is a FORTH machine. Assemble Lisp
and it would be a Lisp machine. The engine and the ROM do not change.
### 1.1 What it is for
@@ -204,7 +207,7 @@ streams the ROM instead.
| Today | Becomes |
|---|---|
| `v4/capsule/*.v4`, 14 files, 311 words, assembled on the build machine | `.f18` blobs under `capsules/v4/`, assembled by the ROM at boot |
| `v4/tools/mkimage.c` → `nucleus-64.f18`, a prebuilt dictionary | Builds the ROM only. The nucleus binary is gone. |
| `v4/tools/mkimage.c` → `nucleus-64.f18`, a prebuilt dictionary | Builds the ROM only. The nucleus binary is gone. (2026-11-19: compiled F18 artifacts are allowed beside the ROM, `ADR-2026-11-19-F18-ARTIFACTS.md`.) |
| `v4/src/text.c`, the assembler in C | The ROM's assembler is F18 code. `text.c` builds the ROM, as the first assembler builds the next. |
| `forth79.4th`: `U*`, `U/MOD` only | Every FORTH-79 word that is not an opcode, a register or the FORTH machinery (`NUCLEUS.md` 4, rule 1). It moves group by group, with POST after each (`NUCLEUS.md` 8, step 3). |
| `boot_capsules[]` in `v4/system/boot.c` | The system list (step 2, then step 3) is the loader's. Everything after POST is `init.4th`'s. |
| `L8-HOLD.basic` | `18 L8-HOLD L8-CARD@ DROP . -1 L8-HOLD CR` | stack `empty`, prints `18 \n` |
## 4. v3 cases left out (52)
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.