docs(v4): Phase 7's plan -- the loops on the word records, and v3's whole POST; the inventory (#189)
Rulings, Captain Bob 2026-11-13: the per-call loops "Every call, as v3"; the loops "Rewrite for v4"; Phase 7
accepted on "v3's whole POST", which brings Phase 3's words and Phase 4's ACL in as tasks of it; Mama's
20 cases as v4 words with v3's names -- "do not compose words in C99, use F18 and StarForth"; the C
modules (ACL, break_me) rewritten for v4.
docs/v4.0.0/POST-PARITY.md (Task 0): v3's POST by module against v4 on e8e7ec8b -- 888 cases in the 17
modules mkpost.py reads (550 Required, 317 for words v4 already has, 21 for words it lacks), 146 in the
nine it does not, 12 C tests; about 1,050 in all, 539 on v4 today.
Not pushed: no protocol run covers it yet (rules: batch docs with the next protocol).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
# ENGINE Step 4, Phase 7: the physics loops on the word records, and v3's whole POST -- Plan
|
||||
|
||||
> **For agentic workers:** steps use checkbox (`- [ ]`) syntax. One QEMU at a time, in the foreground,
|
||||
> every boot under `timeout 570` (`.claude/CLAUDE.md`, `.claude/memory/rules.md`); every log and CSV
|
||||
> is committed. Test first: each change starts with a failing test.
|
||||
|
||||
**Goal (#189):** every loop v3 runs before its prompt runs on v4, on the kernel's word records
|
||||
(Phase 2), on every node; and v3's whole POST passes on v4.
|
||||
|
||||
**Parent plan:** `2026-10-20-engine-step4-node-in-the-vms-place.md`, Phase 7; after Phase 2
|
||||
(`2026-11-13-engine-step4-phase2-word-accounts.md`, protocol PASS on e8e7ec8b).
|
||||
|
||||
## Rulings (Captain Bob, 2026-11-13)
|
||||
|
||||
1. **Every call, as v3.** The per-call loops (decay on touch, the rolling window, pipelining) run at
|
||||
every `call`, from the hook, as v3's run at every execution -- not replayed from a trace each tick.
|
||||
Measured, kept or reverted on the numbers (as HEAT-OP was).
|
||||
2. **Rewrite for v4.** The loops are written afresh for v4's records, with v3's code
|
||||
(`v3/src/rolling_window_of_truth.c`, `physics_pipelining_metrics.c`, `inference_engine.c`,
|
||||
`physics_metadata.c`, `physics_execution_hooks.c`, `compudynamics.c`, `ssm_jacquard.c`, and the
|
||||
kernel's `vm_runtime.c` tick) and v3's POST as the specification.
|
||||
3. **Accepted on v3's whole POST.** Not the loops' own modules alone: every module of v3's POST passes
|
||||
on v4.
|
||||
|
||||
4. **Words in F18 and StarForth, not C** (2026-11-13, on the Mama module: "do not compose words in
|
||||
C99, use F18 and StarForth"). Every word this phase adds -- the loops' (`FREEZE-WORD`, `HEAT@`,
|
||||
the inference words, the entropy words), Mama's, the StarForth words -- is written in the system's
|
||||
F18 or in StarForth. What only the kernel holds (a word's record, the window, the registry) is asked
|
||||
for by a request on port 0, as `KERNEL-WORD` words do. The loops themselves run in the kernel, on its
|
||||
records (Q4).
|
||||
5. **Mama's 20 cases** run as they are, on v4 words with v3's names mapped to v4's equivalents; **the
|
||||
C modules** (ACL, break_me) are rewritten for v4. Inventory and rulings: `docs/v4.0.0/POST-PARITY.md`.
|
||||
|
||||
## What ruling 3 brings in
|
||||
|
||||
v3's POST is 26 modules (`v3/src/test_runner/modules/`, about 1,050 cases; v3's bare-metal boot says
|
||||
1050). v4's POST is v3's cases for the FORTH-79 Required Word Set, 539 (`v4/tools/mkpost.py`). The rest
|
||||
need words v4 does not have yet, which the parent plan put in other phases:
|
||||
|
||||
| v3's modules | Needs | Parent plan's phase |
|
||||
|---|---|---|
|
||||
| physics_freeze, inference | the loops, and the words that read and set them (`FREEZE-WORD`, ...) | 7 |
|
||||
| starforth, q48, format, double (beyond the Required set), string, system, vocabulary, ... | the StarForth words: `init.4th`, `starforth.4th` | 3 |
|
||||
| acl | `ACL.4th` on v4; the word card (the four ACL fields) on the record; the countdown at `call` | 4 |
|
||||
| block | the blocks the kernel serves; writes | 5 (in part) |
|
||||
| mama_forth, integration, break_me, stress | to be read case by case (Task 0): some name v3's VMs and fleet | -- |
|
||||
|
||||
So, by ruling 3, Phase 7 is accepted only when Phases 3 and 4 (and the block cases of 5) are in. The
|
||||
ruled order (Part A, Phase 1, Phase 2, Phase 7) stands for the loops; the words of 3 and 4 come in
|
||||
under this plan, as tasks of it.
|
||||
|
||||
## The design
|
||||
|
||||
**The records grow v3's physics.** A word's record (`v4_mesh_account`, Phase 2) gains what a
|
||||
`DictEntry` carries for the loops: temperature, the last decay tick, mass, the state flags (frozen,
|
||||
pinned), and its transition metrics (by next word ID). Per node: one rolling window, one pipelining
|
||||
context, one L8 mode, one inference state.
|
||||
|
||||
**At every `call`** (the hook; ruling 1), in v3's order (`V3-PARITY.md` 2.1): decay the word by the
|
||||
ticks since it was touched (Loop #3, unless frozen or L8 has it off); its heat +1 (Loop #1, done); the
|
||||
Stadium (Phase 2 charges per tick: kept); the rolling window records its ID (Loop #2); the transition
|
||||
from the word before is recorded and the likely next worked out (Loop #4); the ACL countdown (with
|
||||
Phase 4).
|
||||
|
||||
**At every heartbeat tick**, for every node: the window tuner (Loop #5), the slope validator
|
||||
(Loop #6), background decay, L8's mode update, the inference engine, the snapshot -- as
|
||||
`vm_runtime.c` does for v3's VM.
|
||||
|
||||
## Tasks
|
||||
|
||||
### Task 0: the inventory
|
||||
- [x] Every case of v3's POST, by module, in v3's own order: kept as it is, kept with v4's address
|
||||
units (D-1), needs a word of Phase 3, 4, 5 or 7, or names v3's VMs (Mama, the fleet) -- the last
|
||||
listed for Captain Bob's ruling, case by case, before anything is written for them.
|
||||
- [x] `docs/v4.0.0/POST-PARITY.md`: the table, and the count v4 must reach (about 1,050; 539 today).
|
||||
Mama and the C modules ruled (above).
|
||||
|
||||
### Task 1: the records' physics fields, and the per-node state
|
||||
### Task 2: the per-call loops at `call` (decay on touch, window, transitions) -- measured
|
||||
### Task 3: the per-tick loops (tuner, slope, background decay, L8, inference, snapshot)
|
||||
### Task 4: the words that read and set them (`FREEZE-WORD`, the inference words, ...), and their POST
|
||||
### Task 5: the StarForth words (Phase 3's: `init.4th`, `starforth.4th`), and their POST
|
||||
### Task 6: the ACL (Phase 4's: `ACL.4th`, the word card, the countdown), and its POST
|
||||
### Task 7: the block cases (Phase 5's part)
|
||||
### Task 8: `mkpost.py` beyond the Required set: v3's whole POST as v4's; the floor raised
|
||||
### Task 9: acceptance -- the full protocol; ENGINE.md, V3-PARITY.md, FABRIC-3
|
||||
|
||||
Each task gets its steps when the one before it is accepted, test first, as Phase 2's did.
|
||||
|
||||
## Review focus
|
||||
|
||||
1. **Cost at `call`** (ruling 1): the boot's time under TCG before and after each per-call loop.
|
||||
2. **Order:** the window and the transitions see calls in the order they happen, across nodes kept
|
||||
apart.
|
||||
3. **Recycled IDs:** a word ID FORGET gave back starts with no physics (decay, window, transitions).
|
||||
4. **The 32-bit build:** the same results at 32-bit cells.
|
||||
5. **What names v3's VMs** (Task 0): ruled, not guessed.
|
||||
Reference in New Issue
Block a user