Files
LithosAnanke/docs/v4.0.0/POST-PARITY.md
T
Claude 1f128df5df docs(v4): whole-POST authority ruled -- the standard first (#189)
Captain Bob, 2026-11-14: FORTH-79 where it defines the word, FORTH-83 for words 79 lacks, v3 (its table where
it contradicts it) only for its own extensions; each rewritten case listed with its reason. POST-PARITY.md.
Not pushed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-14 02:40:06 +00:00

7.9 KiB

v3's whole POST on v4 -- the inventory

Started 2026-11-13, Task 0 of plans/2026-11-13-engine-step4-phase7-the-loops-and-parity.md (#189). Captain Bob, 2026-11-13: Phase 7 is accepted on "v3's whole POST". This counts every case of v3's POST against v4 as it is on e8e7ec8b (377 live words), with v4/tools/mkpost.py's own reader of v3/src/test_runner/modules/. It proposes; it decides nothing.

1. The 17 modules mkpost.py reads today

v4's POST keeps only their cases for the FORTH-79 Required Word Set (550 read, 539 after what mkpost.py leaves out: the keyboard, words that forget or damage the system, lines too long).

Module Cases Required (on v4's POST) Other words v4 has Words v4 lacks
stack_words_test.c 55 50 5 0
return_stack_words_test.c 11 11 0 0
memory_words_test.c 53 38 15 0
arithmetic_words_test.c 104 92 12 0
logical_words_test.c 103 64 39 0
mixed_arithmetic_words_test.c 40 18 22 0
double_words_test.c 125 21 104 0
format_words_test.c 31 25 6 0
string_words_test.c 49 15 34 0
io_words_test.c 73 61 3 9 (BASE_OUTPUT, FORMAT_COMBO: groups, not words)
block_words_test.c 51 30 21 0
dictionary_words_test.c 49 22 15 12 (SP!, SP@; COMPILATION, STACK_MGMT: groups)
dictionary_manipulation_words_test.c 29 16 13 0
vocabulary_words_test.c 22 19 3 0
system_words_test.c 7 4 3 0
defining_words_tests.c 32 22 10 0
control_words_test.c 54 42 12 0
Total 888 550 317 21

The 317 test words v4 already has; they are left out only because mkpost.py keeps the Required set.

2. The nine modules mkpost.py does not read

Module Cases Words v4 lacks Kind
q48_words_test.c 28 none FORTH lines; every word is on v4
starforth_words_test.c 29 ENTROPY! ENTROPY@ RESET-ENTROPY TOP-WORDS WORD-ENTROPY (- FORTH lines; the entropy and top-words words read the physics
physics_freeze_words_test.c 7 FREEZE-WORD UNFREEZE-WORD FROZEN? HEAT@ HEAT! DECAY-RATE@ FORTH lines; the loops' words
inference_words_test.c 9 INFER-RUN INFER-DECAY-SLOPE INFER-DECAY@ INFER-EARLY-EXIT@ INFER-FIT@ INFER-VARIANCE@ INFER-WINDOW-WIDTH INFER-WINDOW@ Q.VARIANCE FORTH lines; the inference engine's words
stress_tests.c 45 none (14 group names) FORTH lines
integration_tests.c 8 none (3 group names) FORTH lines
mama_forth_words_test.c 20 CAPSULE-BIRTH CAPSULE-RUN CAPSULE-TEST CAPSULE-COUNT CAPSULE@ CAPSULE-FLAGS@ CAPSULE-HASH@ CAPSULE-LEN@ MAMA-VM-ID VM-COUNT FORTH lines about v3's VMs and capsule directory
acl_words_test.c 11 -- C, against v3's VM's fields (vm->...), not FORTH lines
break_me_tests.c 1 -- C, one routine against v3's VM

3. For ruling

  1. Mama (20 cases): the words are v3's: a VM ID, a VM count, v3's capsule directory. v4 has nodes, births (BIRTH, NODE-ME) and its own capsules. Written as v4 words with v3's names and meaning, mapped to v4's equivalents, or out of parity?
  2. The C modules (ACL, break_me): they read v3's VM's fields directly. Rewritten as tests of the same behaviour against v4 (FORTH lines where they can be, host tests in C where they cannot), or out?
  3. The group names (STACK_BOUNDARY, COMPILATION, ...): v3 files cases under a group, not a word. They are cases like any other, run as they are; nothing to rule unless a case fails.

Ruled (Captain Bob, 2026-11-13):

  1. Mama: v4 words with v3's names and meaning, mapped to v4's equivalents -- "but do not compose words in C99, use F18 and StarForth". The words are written in the system's F18 or in StarForth; where only the kernel can answer (the registry, the capsules it holds), the word asks it by a request on port 0, as KERNEL-WORD words do. The 20 cases run as they are.
  2. The C modules: rewritten for v4, the same behaviour shown case by case -- as FORTH lines in POST where they can be, as host tests in C where they need internals.

4. What parity needs, in count

About 1,050 cases: 888 in section 1, 146 FORTH-line cases in section 2's modules, and the C modules' 12 tests -- 1,046. v4 has 539 today. The loops' own words (physics freeze, inference, entropy, top words) are 22 cases; the ACL and Mama modules wait on section 3.

5. Measured (2026-11-14, Task 8)

v4/tools/mkpost.py --all --out FILE writes every case of v3's whole POST -- v3's 22 POST modules in test_runner.c's order, Q48, the stress and integration tests -- as a table, v3 the reference, leaving system/post_cases.c as it is. Run on Hera in the kernel's fabric (the mesh boot, with the kernel's capsules) on the tree after Task 4: 1020 cases, 849 pass, 171 fail.

Failures by word: C, 8, TOP-WORDS 7, CASE 5, M/MOD 5, U/MOD 5, (- 4, BASE_OUTPUT 4, COMPARE 4, LATEST 4, M+ 4, SEARCH 4, WORD 4, -! 3, 2! 3, COMPLETE_PROGRAMS 3, FENCE 3, MEMORY_STRESS 3, ORDER 3, SCAN 3, SKIP 3, SP@ 3, STACK_DEPTH 3, WORD-ENTROPY 3, 2, 2, 2>R 2, 2R> 2, 2R@ 2, >BODY 2, AGAIN 2, BEGIN 2, CMOVE> 2, DEEP_NESTING 2, EXIT 2, FROZEN? 2, MIXED_COMPLEX 2, NUMERIC_BOUNDARY 2, RETURN_STACK 2, S" 2, STACK_BOUNDARY 2, STACK_MGMT 2, STRING_EDGE 2, THRU 2, WHILE 2, +LOOP 1, ." 1, ? 1, ALGORITHMS 1, BL 1, COMPILATION 1, COMPILE 1, CONTROL_EDGE 1, CONVERT 1, DABS 1, DECAY-RATE@ 1, DMIN 1, ENTROPY@ 1, ERROR_RECOVERY 1, EXECUTE 1, FLUSH 1, FREEZE-WORD 1, HEAT! 1, HEAT@ 1, HIDDEN 1, INFER-DECAY-SLOPE 1, INFER-EARLY-EXIT@ 1, INFER-VARIANCE@ 1, IS 1, LITERAL 1, Q./ 1, Q.0 1, Q.1 1, Q.SCALE 1, Q.VARIANCE 1, REPEAT 1, RESET-ENTROPY 1, SMUDGE 1, SP! 1, SPAN 1, STATE 1, UNFREEZE-WORD 1, UNTIL 1, ['] 1, [COMPILE] 1.

What they are:

  1. Address units. v3's cases do byte-address arithmetic in 8-byte cells (C,, 2!, SEARCH, COMPARE, CMOVE>, -! ...); v4's address unit is a cell (D-1). The case wants v4's units, as post79_rules.ADDRESS already gives 20.
  2. What v4 lacks or does otherwise. SP@ SP!; CASE (its cases define TC with it); U/MOD and M/MOD in v3's shape; SKIP SCAN SEARCH COMPARE; ORDER THRU FLUSH; the vocabulary and compile-time edges. To be built, or the difference shown to be the standard's.
  3. v3's output naming v3's own words. TOP-WORDS expects v3's hottest -- EXIT, DROP, LIT, ." -- and WORD-ENTROPY v3's word count: v4's system is not v3's.
  4. v3 not doing what its own table says (29 cases; e.g. 2!.basic): the expectation recorded is v3's error, and a v4 that does what the table says fails it.
  5. The rest -- formatting, the stress and integration groups -- case by case.

Ruled (Captain Bob, 2026-11-14): "v3's table, not v3's bugs". Where v3 does not do what its own table says (kind 4: 29 cases), v4 is held to the table -- what v3 meant -- and each such case is listed. Where a case's output names v3's internals (kind 3), v4 is held to the same form with its own words: the case's shape, v4's values; listed too. Everything else: v3's recorded behaviour, exactly.

Ruled (Captain Bob, 2026-11-14): "The standard first". Read with their descriptions, v3's cases are not a reliable authority: 16 BASE ! 255 . -- v3 prints 597, its description says FF, FORTH (and v4) print 255; M+ -- v3 300 0, its description 200 100, FORTH and v4 100 200. So, for each case: FORTH-79 where it defines the word (as post79_rules.py already does for the Required set); FORTH-83 for words 79 lacks (M+, 2>R ...); v3's behaviour -- or its table, where v3 contradicts it -- only for v3's own extensions no standard defines (COMPARE's form, ENTROPY@, TOP-WORDS ...). Every case rewritten is listed with its reason.