feat(v4): v3's whole POST is v4's POST -- 990 cases, all passed on Hera (#189)

Phase 7, Task 8: PARITY:V4_POST tests=990 pass=990 fail=0 on Hera (mesh-boot); the hosted
product 945 of them, all passed -- the 45 cases of physics.4th's words need the kernel.

- Enlarged, as ruled ("Enlarge v4 to fit"): a node is 32768 words, its data stack 1024
  deep (v3's), host and kernel alike; the dictionary's end moves with them.
- POST's runner compares every value a case leaves (v3's leave 101); V4_POST_KERNEL marks
  a case of the kernel's words, and a host without a kernel does not run it.
- mkpost.py --all is POST's table (make -C v4 post79), with docs/v4.0.0/POST.md; it reads a
  module's #defines (v3's Mama cases are MAMA_IMPLEMENTED, 0: v3's own POST skips all 20);
  it cuts no line between a word and the name it takes.
- Rules for the last of the table: the min/max and array-sum programs written as meant,
  CREATE's 26-character name (FORTH-79: 31), many_defs.
- POST_FLOOR 990.
- Tests sized for a 32-deep stack and a 16384-word node made deep-stack-ready
  (test_host_depth, test_host_quit, test_host_node, hosted-check, depthsweep.py).

make -C v4 test: all v4 tests passed. make -C kernel/tests test: all passed.
depthsweep at 1024: 230 runs, 0 failures. v4-checks running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-14 08:12:23 +00:00
parent 1aa33f31bf
commit 37469f6c54
23 changed files with 2701 additions and 1299 deletions
+8
View File
@@ -19,6 +19,10 @@
#define V4_POST_ERROR 3 /* it must end in an error; nothing else is compared */
#define V4_POST_HEAD 4 /* how many values it leaves, and how what it prints begins: the form of a
printout whose values are the run's own (TOP-WORDS; #189, 2026-11-14) */
#define V4_POST_KIND 7 /* the kind is expect's low bits; */
#define V4_POST_KERNEL 8 /* or'd in: the case needs the kernel's words (capsules/v4/physics.4th, its
requests on port 0) and is not run on a node with no kernel -- the hosted
product (#189 Phase 7: v3's whole POST) */
typedef struct {
const char *name;
@@ -64,6 +68,7 @@ typedef struct {
* (message.h); or a negative number if the line did not come back. */
int (*line)(void *self, const char *text, unsigned text_len, char *out, unsigned cap, unsigned *len);
void (*say)(void *self, const char *text, unsigned len); /* the console */
int kernel; /* 1: the node has the kernel's words, so V4_POST_KERNEL cases are run */
} v4_post_host;
typedef struct { unsigned tests, pass, fail; } v4_post_tally;
@@ -73,4 +78,7 @@ typedef struct { unsigned tests, pass, fail; } v4_post_tally;
* is how many were run. Returns 1 if every case was run and none failed. */
int v4_post_run(const v4_post_host *h, const v4_post_case *cases, unsigned count, v4_post_tally *tally);
/* How many of the cases are run on a node with the kernel's words (kernel 1) or without (0). */
unsigned v4_post_runs(const v4_post_case *cases, unsigned count, int kernel);
#endif /* V4_POST_H */
+2 -2
View File
@@ -25,8 +25,8 @@
* first (manage.c, blocks.c) -- but no opcode reaches the wrap.
*
* 2. Nesting is shallow: a mesh node's stacks are the F18's 10 and 9; the
* host node's are 32 and 32 (D-17: V4_DATA_RING and V4_RET_RING, set in
* v4/Makefile). One value or one call past either depth is a stack fault
* host node's are 1024 and 32 (D-17, revised 2026-11-14 for v3's whole
* POST: V4_DATA_RING and V4_RET_RING, set in v4/Makefile and kernel/Makefile). One value or one call past either depth is a stack fault
* with its message, where under D-2 it corrupted silently.
*
* (Points 1 and 2 corrected 2026-11-12, #181: they said there was no overflow