fix(v4.0.0): POST leaves nothing, as v3 really does; and what the review of step 6b found

Captain Bob was told that v3 leaves the words POST's cases define in the
dictionary, and ruled that v4 should.  That was false: v3's run_test_suite
puts the dictionary back after each word's cases (test_common.c:333,
:365).  Shown that, he ruled that POST leaves nothing.  The boot now
seals the system, runs POST, and has the node do COLD, whose printing is
not shown; PARITY:V4_SYSTEM is the system as sealed.

A case the node does not come back from ends POST there, named, with how
many were not run: it would have stalled the boot for hours, where the
capsule had ended it.  The runner's test of it now uses a word that
really never ends.

hosted-check also requires that RS1 and T{ are unknown after boot, and
boots a program whose POST has failing cases (tests/post_cases_fail.c):
PARITY:FAIL, POST: FAILED, no prompt, none of a case's printing shown.

Comments and documents that still named the POST capsule or its two
hooks are brought up to date; NUCLEUS.md 6.3 says what v3 does, with the
lines, and how the wrong ruling came about.

make -C v4 test, sanitize and hosted-check pass; amd64, aarch64 and
riscv64 boot, POST 538 of 538, word_count=314, dict_hash
0x220ab283a504a3b3 on all six: logs/20261007-112638, -112901, -113220.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-07 11:40:20 -04:00
co-authored by Claude Opus 5.5
parent eda6577a53
commit 18adf59091
17 changed files with 669 additions and 65 deletions
+9 -5
View File
@@ -62,7 +62,7 @@ load `v4:forth79.4th`, pass POST and reach `ok>`, with the same lines:
PARITY:V4_NUCLEUS name=v4:nucleus-64.f18 capsule_id=... capsule_hash=0x97a655081b2af559 words=298
PARITY:V4_CAPSULE name=v4:forth79.4th capsule_id=... dict_hash=...
PARITY:V4_POST tests=538 pass=538 fail=0
PARITY:V4_CAPSULE name=v4:post79.4th capsule_id=... dict_hash=...
PARITY:V4_SYSTEM word_count=314 dict_hash=...
PARITY:OK
POST: PASSED
ok>
@@ -174,10 +174,14 @@ and the v3 cases left out, are listed with reasons in
The runner, `v4/system/post.c`, feeds each case to the node a line at a
time, keeps what the node prints, reads its data stack from outside, and
judges: an error exactly if one is expected, and otherwise the stack and
every character printed. Nothing of POST is in the node's dictionary. What
the cases define stays there, as in v3, and the system is sealed after
POST. The boot then prints `PARITY:V4_SYSTEM word_count=N dict_hash=0x...`,
and passes only if no case failed (`v4/system/boot.c`).
every character printed. Nothing of POST is in the node's dictionary, and
POST leaves nothing: the system is sealed before it, and afterwards the
kernel puts the node back to the system as sealed, as v3 puts the
dictionary back after each of its suites. The boot then prints
`PARITY:V4_SYSTEM word_count=N dict_hash=0x...`, and passes only if no
case failed (`v4/system/boot.c`). A case the node does not come back from
ends POST there, named. `make -C v4 hosted-check` also boots a program
whose POST has failing cases and requires that the boot fails.
Not tested: `KEY`, `EXPECT`, `QUERY` (the keyboard) and `QUIT` (it returns
without ` ok`).