feat(v4.0.0): five nodes from nothing -- Hera asks for nodes, births and joins them

MESH.md step 5, in the fabric under test; the products are still one
node each until steps 8 and 9.

manage.c: what Hera asks of whoever holds the fabric, eleven requests by
KERNEL-WORD -- NODE-ME -BORN -WIRE -UNWIRE -SLEEP -WAKE -KILL -PARITY and
CAPSULE-OPEN -CELL -LINE. Nucleus: PORT!, SEND-ON, AWAIT, (SEAL).
capsules/v4/hera.4th: BIRTH and UNIT, the unit rule in FORTH and nowhere
else. The dictionary hash moves to the engine (v4_image_dict_hash).

test_host_unit.c, 34 checks, 64-bit: Hera is born empty, takes the
nucleus through her port, FORTH-79, POST and her capsule; 10 UNIT; four
nodes are born, each takes the nucleus and FORTH-79 through its port from
Hera and passes POST 538/538; four parities, one dictionary hash; they
talk, and a message between two corners not wired goes by Hera.

All v4 tests at both widths and under ASan+UBSan. hosted-check on three
ISAs. Bare metal: logs/20261006-143934 (amd64), -144204 (aarch64),
-144601 (riscv64).

Open, recorded in MESH.md: not run at 32 bits; a node that never answers
leaves Hera waiting; the capsules are read from files in the test, not
from the baked directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-06 14:48:23 -04:00
co-authored by Claude Opus 5.5
parent f9c034cadd
commit 348eed7fa1
18 changed files with 1250 additions and 40 deletions
+61 -5
View File
@@ -289,11 +289,11 @@ checked in this step.
## 9. Birth, and Hera
**Proposal.** Hera asks, through the port where her requests go
(`ENGINE.md` 3.3), for a node to be added and wired; she then sends the
newborn its capsules through the port that joins them. Putting a node to
sleep, waking it, and removing it are requests of the same kind. Only
Hera's requests are honoured.
**Proposal, built as step 5 (section 10).** Hera asks, through the port
where her requests go (`ENGINE.md` 3.3), for a node to be added and wired;
she then sends the newborn its capsules through the port that joins them.
Putting a node to sleep, waking it, and removing it are requests of the
same kind. Only Hera's requests are honoured.
The unit rule (ruling 5) is Hera's, in capsule code: it is what she does
with those requests. The engine and the host do not know it.
@@ -420,6 +420,62 @@ Each is tested, committed and pushed before the next.
`FILL` now have fewer cases; nothing stops any other text doing what
those cases did.
5. **Birth and Hera's requests (section 9); the unit of five.**
**Done 2026-10-06, in the fabric under test; the products are still one
node each until steps 8 and 9.** Section 9's proposal, as built:
- *What Hera asks* (`v4/include/v4/manage.h`, `v4/src/manage.c`). Eleven
requests, each a word on her made with `KERNEL-WORD`, written to the
port her requests go to: `NODE-ME`, `NODE-BORN`, `NODE-WIRE`,
`NODE-UNWIRE`, `NODE-SLEEP`, `NODE-WAKE`, `NODE-KILL`, `NODE-PARITY`;
and `CAPSULE-OPEN`, `CAPSULE-CELL`, `CAPSULE-LINE`, by which she reads
a capsule the host has found and checked. A node is named to the host
by its place in the fabric; its number, which messages go by, is the
nodes' own. Only the node the host has wired to this is answered.
- *What a node needs to do it* (`v4/capsule/quit.v4`): `PORT! ( w port
-- )`, a cell written to a port as it is; `SEND-ON ( baddr u node port
-- )`, text by a port named, for a neighbour with no number yet;
`AWAIT ( node -- how )`, blocked until that node's word of how text
ended comes, keeping every other message for later; `(SEAL)`, what is
in the dictionary now is the system.
- *Hera's capsule* (`capsules/v4/hera.4th`, blocks 8000 to 8004), FORTH.
`BIRTH ( number port -- place )`: a node is asked for and wired to
that port; the nucleus is sent it cell by cell; it is told its number,
its console and that Hera is on its port 2; FORTH-79 and POST are sent
it a line at a time, each waited for; it seals; its parity is
recorded. `UNIT ( n -- )`: four births, on ports 2 to 5, and the four
joined in a square, each told of the two beside it. The unit rule is
there and nowhere else.
`v4/tests/test_host_unit.c`, 34 checks, 64-bit: Hera is born empty and
takes the nucleus through her port, then FORTH-79, POST (538 of 538) and
her capsule from the console; `10 UNIT`; four nodes are born, each
passes POST, the host records four parities with one dictionary hash;
all five wait and execute nothing; text for each outer node is done
there and what it prints comes back; `COLD` on one comes back to the
nucleus and FORTH-79; one outer node sends text to the one beside it,
and to the one across from it by way of Hera. Acceptance 1 and 2, in
the fabric. All v4 tests at both widths and under ASan and UBSan. The
single-node products are unchanged but for the nucleus's new words:
`hosted-check` on three ISAs; bare metal `logs/20261006-143934`
(amd64), `-144204` (aarch64), `-144601` (riscv64).
**What stands in, in the test only:** the capsules are read from the
files the build bakes in, and the nucleus capsule is written from the
nucleus as the test assembles it, not found in the baked directory with
its hash and signature checked; that is the host's part and comes with
step 8. Each node has a disk of its own attached at birth, as the boot's
one node has; storage through the ports is step 6.
**Not done, and open:**
- The test is not run on 32-bit cells: the POST capsule's expected
results are 64-bit v3's and the nucleus capsule is `nucleus-64`. POST
has never been run at 32 bits.
- A node that never answers leaves Hera waiting for ever in `AWAIT`;
she cannot then kill it. What she does about a birth that does not
finish is not decided.
- What an outer node prints while Hera is giving birth waits in Hera's
400 cells until she is idle, and is lost if there is more than they
hold. POST prints one line.
- An outer node has no port to the kernel, so no kernel words: no
`BYE`, and nothing it asks is honoured, as ruled.
- The suite now takes about four minutes, eight under the sanitizers:
five POSTs.
6. **Storage (section 8).**
7. **A second unit; scaling while running; sleep, wake and kill by
command.**