docs(v4.0.0): step 6d as mended after its review; the boots on that code

MESH.md 4.1, 7a, 7c.2, 7c.3, 7c.4 and step 6d say what the code now does,
what the review found and how each was mended, and what is small and not
mended.  The README no longer says the aim is unmet; it says the mended
code has not been reviewed again.

Three bare-metal boots on 2cf37aab, typing 29 values on a line: POST 538
of 538, word_count=317, dict_hash=0xd41a6ac9448fff60 on all six.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-08 06:44:12 -04:00
co-authored by Claude Opus 5.5
parent 2cf37aab4f
commit 10f5ffd00b
5 changed files with 606 additions and 47 deletions
+74 -43
View File
@@ -107,6 +107,7 @@ word address `base`:
| `base + V4_PORTS + 2`, `+ 3` | Who is waiting to write to this node, and who to read from it: section 7a |
| `base + V4_PORTS + 4 + k` | The offer on port *k*: section 7c |
| `base + 2 * V4_PORTS + 4` | The wait: section 7c |
| `base + 2 * V4_PORTS + 5` | The wait for an offer only: section 7c |
- **A write to a port blocks the node until the neighbour has read it.**
Built 2026-10-05 for one port; the opcode after the write runs when the
@@ -294,8 +295,10 @@ part of wiring them. Put to Captain Bob after it was built, and ruled:
**What it costs.** A node that is flooded loses messages, of every kind:
text for it, answers to text it sent, and messages it was only passing
on. In the test three nodes send each other 800 messages at once; 287
arrive and 714 messages are let go (the count includes answers and text
on. In the test three nodes send each other 800 messages at once; 278
arrive (287 as first built, before step 6d) and the nodes count some
1,400 let go (the count is of every kind of message, and since step 6d
counts some more than once; it includes answers and text
that was to start a node sending). Six from each to each, at once, all
arrive. Nothing here makes a sender slow down or send again; that is
kernel-Hermes's work in v3 and is not decided for the mesh.
@@ -511,6 +514,16 @@ a node may offer a word on each of its ports at once.)*
the fabric has its offer taken, and the other gets the word (case 2
for the one, case 1 for the other).
- Whichever it is, every offer the node had is withdrawn.
- **A store to the wait withdraws every offer** and waits for nothing.
*(Added after the review, 2026-10-08: a node that goes round without
sleeping must not leave an old offer standing for its next wait to
find.)*
- **The wait for an offer only**, `base + 2 * V4_PORTS + 5`: as the wait,
but a word that comes for the node does not end it, and a writer to the
node is not served. It ends when the offer is taken, or when there
turns out to be nothing on the port. *(Added after the review: it is
how the words of a message after the first are written where no error
must come.)*
- A node in the wait that is handed a word by case 2 of another node gets
it by its own case 1.
- A node in the wait executes nothing and spends no heat. It shows to its
@@ -551,15 +564,26 @@ stuck node left Hera deaf. So what is passed on waits, offered.)*
sleeps in the wait. What is taken is written and done with; the rest
stays with the messages waiting, in the order it came. A message for a
stuck node waits there and holds up nothing.
- *What a node sends other than from text* goes the same way: how text
ended (type 3), and a GONE. Each is put with the messages waiting and
goes when it can. So a node that did text for a sender that then stuck
- *What a node sends other than from text* goes the same way: what a
finished text printed (type 2), how it ended (type 3), and a GONE. Each
is put with the messages waiting and goes when it can; with no room for
it, it is let go and counted. So a node that did text for a sender that then stuck
is not held by it, and `KILL` is not held by one stuck node from telling
the next.
- *Order.* How text ended is put before the other messages waiting, and a
node does not begin another text from a sender while its answer to that
sender is still with it: what one sender is told comes in the order its
texts were done.
- *Order.* A node's own messages keep the order they were made in. A node
does not begin another text from a sender while what it owes that
sender from an earlier one -- what that text printed, how it ended -- is
still with it: so what one sender is told comes in the order its texts
were done. A GONE it is sending holds nothing back. It can note eight
senders so; past that, nothing more is held.
- *No error in the middle.* The words of a message after the first are
written, when a message is passed on or a NACK paid, through the wait
for an offer only. If the reader has been removed the rest is let go
and counted; no error is raised, for an error there would leave the
messages waiting in pieces. For the same reason a text may leave no
more than 28 values on the stack: one that leaves more ends "Stack
overflow". And a message half taken in when its writer is removed is
let go, not kept.
- *A node waiting for an answer* (`AWAIT`) does all of this but begin
text: it looks through the messages waiting for what would end its
wait, offers what is to be passed on and what it owes, and sleeps in
@@ -575,9 +599,13 @@ stuck node left Hera deaf. So what is passed on waits, offered.)*
on until its text ends.
- A line typed at Hera while her text is waiting to begin a message ends
that text, whether the node it waits on is stuck or only busy.
- What a finished text printed is still begun as a message from text is,
toward the console's node: if that node is stuck, nothing could be seen
in any case.
- While what a node owes a sender -- or the console -- cannot go, because
the way there is through a stuck node, it begins no more text from that
sender. It goes on passing on, paying, and doing text from others, and
when the stuck node is killed it lets go what could not go and does
what it kept back, in order.
- What text prints while it is still running, when the output buffer
fills, is begun as a message from text is, and waits as that does.
- An answer that reaches a waiting node whose messages waiting are full
is refused, and the wait ends "Message refused".
- A message once begun is written to its end. A node that takes a first
@@ -1256,37 +1284,40 @@ Each is tested, committed and pushed before the next.
`hosted-check`, lint; three bare-metal boots, `logs/20261008-011558`
(amd64), `-011833` (aarch64), `-012159` (riscv64). On all six: POST
538 of 538, `word_count=317`, `dict_hash=0x6a39c0bb9d183418`.
- **The review (2026-10-08) found the step not sound as built.** One
finding is mended, the rest are open and the claims of 7b and 7c that
"a stuck node holds up no other" are not yet true in the cases below.
- *Mended.* A line that left 29 values on the stack hung the node for
ever, on the products too: the passes over the messages waiting
that now follow every text need four cells, and a stack fault in
the middle of one left the messages in pieces. Such a text now
ends "Stack overflow", as it did before step 6d
(`test_host_quit.c`; `hosted-check`). The boots above were made
before this and do not show it.
- *Open: a node removed while a message is being passed on to it*
leaves the node passing it on going round for ever: the error
comes in the middle of writing the message out of the messages
waiting, and leaves them in pieces.
- *Open: offers left standing.* When a node lets a message go and
then begins text without having slept, what it had offered is
still offered, and the text's own message can go to the wrong
port. The review saw text meant for one node done by another.
- *Open: what a finished text printed* is still begun as a message
from text is, and if the way to the console is through a stuck
node the node is held and cannot be typed to.
- *Open: with more than eight messages of its own waiting* (answers,
or the GONEs of `KILL`) a node begins no text at all; on Hera that
cannot be undone from the console.
- *Open, smaller:* an error while a refusal is being written leaves
a value on the stack; with no room at all, how text ended is
begun as a message and can be held by a stuck sender; a line that
was itself refused for want of room can still end a waiting text
"Interrupted"; a message a node makes itself may be passed on by
15 nodes, not 16; the flood's figures in 7a are stale (278 arrive
now) and `(LOST)` counts some messages more than once.
- **The review (2026-10-08) found the step not sound as built**, and
Captain Bob ruled the mends (A, B, C, D and the guard: 7c.2, 7c.3).
Each has a scene in `test_host_mesh.c`, on a row of three begun
again, that failed first:
- *A line that left 29 values on the stack hung the node for ever*,
on the products too. It ends "Stack overflow"
(`test_host_quit.c`, `hosted-check`, and typed in the boots).
- *A node removed while a message was being passed on to it* left the
node passing it on going round for ever. The rest is let go.
- *Offers left standing:* text meant for one node was done by
another. A store to the wait withdraws them.
- *What a finished text printed* held the whole node when the way to
the console was through a stuck node. It is queued.
- *More than eight of a node's own messages waiting* locked out all
text, Hera's `KILL` included. Only what a sender is owed holds that
sender's text back.
- *A message half taken in when its writer was removed* was kept as
if whole. It is let go.
- Smaller: no value is left on the stack when a port goes in
mid-refusal; a refused line no longer ends a waiting text
"Interrupted"; a node's own messages may be passed on by 16 nodes.
- *Not mended, small:* with no console told of, a second text from
whoever sent the one being done interrupts it, as since step 6c;
refusals to one node go newest first; `(LOST)` counts some messages
more than once, so the flood's check is "it comes to rest", not an
exact count; the ring of three is tested in the engine only; the
five-node test is not run at 32 bits.
- *Verified, on the code as mended.* `test_fabric.c` 112 checks,
`test_host_mesh.c` 154, `test_host_unit.c` 84. `make -C v4 test` and
`sanitize` at both widths, `hosted-check`, lint; three bare-metal
boots, `logs/20261008-063450` (amd64), `-063738` (aarch64),
`-064120` (riscv64). On all six: POST 538 of 538, `word_count=317`,
`dict_hash=0xd41a6ac9448fff60`. This code has not been reviewed
again.
7. **A second unit; scaling while running; sleep, wake and kill by
command.**