fix(v4.0.0): step 6e final review -- texts begun in order; a word no one will read lets its writer go; a cut wire wakes a wait for room; a full console wire is a refusal, not a fault

The final review of step 6e, by a fresh reviewer told to break it, and
what was ruled: fix them all, test first.  Each has a test that failed
before the mend.

- Two texts from one node could be begun in the wrong order when room
  for their answers came between the node's look at the first and at the
  second.  Texts whose answers go by the same port are begun in the order
  they came: (D-MASK), quit.v4.  102 of 700 timings were wrong before.
- A word written with PORT! to a node that speaks whole messages, or to
  a console's port, blocked its writer for ever and cut off every node
  beyond it.  It is error 18 now, whether that node is asleep, running
  or stuck: fabric.c, node.c.
- A node asleep for room on one wire is woken when another of its wires
  is cut.
- A line there was no room for on the lone node's wire was reported as a
  fault and ended the hosted program.  It is Message refused, and the
  prompt comes back: V4_BOOT_LINE_REFUSED.  hosted-check has the case;
  no bare-metal boot has typed it.
- Ruled: text behind held output for the same port is refused though it
  would fit.  MESH.md 7d.4 said otherwise and is corrected.
- The removal test also cuts and re-makes a wire, and has an exchange in
  which output is held at a full wire: 26,814 disturbances in all.
- MESH.md and v4/README.md no longer say that a stuck node holds up no
  other node, that only printing waits, or that no node is left waiting
  on one that is gone; 7d.6 lists the limits and what the products do
  that they did not before.

make -C v4 test and sanitize at both widths, hosted-check, lint.  Three
bare-metal boots: logs/20261013-194827 (amd64), -195131 (aarch64),
-195518 (riscv64).  POST 538 of 538, word_count=317,
dict_hash=0xe5a57f3eb72ff94a on all six; the three sessions are the same
character for character.  The boots were built with the working tree's
uncommitted change to kernel/Makefile that adds the ISA to the kernel's
version line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-13 20:02:33 -04:00
co-authored by Claude Opus 5.5
parent 06da5700bc
commit 66b26f823c
22 changed files with 1206 additions and 103 deletions
+17 -14
View File
@@ -129,9 +129,9 @@ The two products are not yet this: they become the five nodes at steps 8
and 9.
A node she births is not POSTed: POST is the kernel's, once, on Hera.
**Refusals and waits** (`MESH.md` 7b, step 6c). A node is never left
waiting on a node that is gone, and a wait on a node that is alive and
stuck is ended by Hera's killing it, or from the console. A node with no
**Refusals and waits** (`MESH.md` 7b, step 6c). A wait on a node that
never answers -- stuck, or gone -- is ended by Hera's killing it, which
tells the others it is gone, or from the console. A node with no
room for a message, or no way to pass it on, or that would be the
sixteenth to pass it on, sends a NACK to whoever waits on it; `(REFUSED)`
counts them. `AWAIT` ends in an error if the answer is not going to come:
@@ -140,17 +140,20 @@ the console. `n KILL` on Hera removes node n and tells every other node it
is gone; a node believes that only from its centre.
**Messages on the wire** (`MESH.md` 7d, step 6e). A node that is stuck
holds up no other node. The fabric keeps a queue of whole messages each
way on every wire (`v4/src/wire.c`, 1,024 cells), and a node asks it,
through six addresses after its ports, to look at, take, move, drop or
put a whole message: each is one engine step, all of it or none. A node
holds nothing in transit. `SEND`, an answer, a NACK and a GONE go at once
or are refused at once; only what a text prints waits for room, so that
output is not lost. A node with nothing to do sleeps until a message
comes. A node removed at any step of an exchange leaves the others at
rest and answering (`v4/tests/test_host_mesh.c`). What it costs is in
`MESH.md` 7d.6: a burst beyond what a wire holds is refused, and text for
a node that is stuck fills its wire and is refused from then on.
no longer stops its neighbours passing on, taking text or being typed
to. The fabric keeps a queue of whole messages each way on every wire
(`v4/src/wire.c`, 1,024 cells), and a node asks it, through six addresses
after its ports, to look at, take, move, drop or put a whole message:
each is one engine step, all of it or none. A node holds nothing in
transit. `SEND`, a NACK and a GONE go at once or are refused at once.
What a text prints, and its word of how the text ended, wait for room, so
that output is not lost. A node with nothing to do sleeps until a message
comes. A node removed, or a wire cut, at any step of an exchange leaves
the others at rest and answering (`v4/tests/test_host_mesh.c`). What it
costs is in `MESH.md` 7d.6: a burst beyond what a wire holds is refused;
text for a node that is stuck fills its wire and is refused from then on;
and a text whose printing must go by a stuck node waits, and cannot be
typed to, until that node is killed.
**Blocks** (`MESH.md` step 6). The block words are the kernel's, as they
are for a v3 VM: `BLOCK`, `BUFFER`, `UPDATE`, `SAVE-BUFFERS` and