v4: the host placer and a train placed (ADR step 3 task 4); fe25519's undefined shift; acceptance asserts the loops (#189 Task 9) #200

Merged
rajames merged 20 commits from StarForth-v4.0.0 into master 2026-11-24 07:52:53 +00:00
Owner

What and why

The work on StarForth-v4.0.0 since #198:

  • ADR step 3, task 4: the small train placed. v4/src/place.c is the host placer (ABI.md §5). It splits the code at each export, with the export's entry before its code. mkf18a takes import nucleus NAME, with hash 0 and the effect looked up by its dictionary name, and refuses a word that runs on into an export. test_mesh_boot places tests/train-place, built by mkf18a, on Hera at her HERE: its words run by name, the nucleus's ABS is reached, the kernel records each export, and six refusals leave Hera unchanged. Plan 2026-11-19-f18-artifact-build.md §12 (ruled) and §13 (built).
  • fe25519: the carry is taken out by multiplying, not by a left shift of a negative value, which is undefined in C99. This is the nightly's sanitizer failure of 2026-11-20 (run 333), reproduced without the signing key (logs/20261120-fe25519/). v4/tests/test_fe25519.c has 16 checks: values that send a limb negative, and RFC 8032 tests 1 and 2, signed and verified. It runs plainly and under ASan+UBSan, and failed first.
  • #189, Phase 7 Task 9: acceptance asserts the loops. Every v4 boot checks L1 heat, L3 decay, L2 with L5 (L8 held on card 18), and L8's changes at the prompt. The new words are L8-CARD@ and L8-HOLD, each with a POST case, so POST is now 992 cases. WORD_PHYSICS (Kconfig.physics) turns the word loops off: a boot with it off fails acceptance at POST. V3-PARITY.md §2.2 is corrected. Plan 2026-11-13-engine-step4-phase7-the-loops-and-parity.md, Task 9 (ruled).
  • Smaller changes:
    • capsules/BLOCK_MAP.md refreshed (#145, #183);
    • .claude/CLAUDE.md: "while a PR is open, commit locally and push once" (#152);
    • evidence for #190 and #199.

Each was test first, seen to fail. The rulings are in the plans.

Acceptance

  • logs/20261120-192820/PROTOCOL.md for the head: PASS, all eight stages, on 65737e28. The head is that tree plus its evidence; scripts/check_protocol.sh accepts it. logs/20261120-192820/README.md is the record.
    • The loops gave the same values on all four boots (amd64, aarch64, riscv64, the stick): heat 6, 1000 cooled to 0, variance not 0 and width 455, 66 changes ending on card 11.
    • dict_hash=0x7c5a2f0c02145e63 on all three architectures, and POST 992/992 on every boot.
  • Logs from other runs made by hand are committed in logs/:
    • the protocol on a9a8687f, FAILED at documents for want of the two new words' dictionary entries (logs/20261120-184418/), then fixed;
    • the WORD_PHYSICS=0 boot (logs/20261120-task9/);
    • each task's gates.
  • Hardware this was tried on: none. Board bring-up is deferred until the lost hardware is replaced (Captain Bob, 2026-11-20).

The record

  • docs/fabric/FABRIC-3.md: not in this PR. The rulings and what was built are in the two plans above.
  • CHANGELOG.md: not a milestone.
  • Nothing in this PR is a fix nobody asked for. The fe25519 fix was ruled ("Fix it, test first").

🤖 Generated with Claude Code

https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm

## What and why The work on `StarForth-v4.0.0` since #198: - **ADR step 3, task 4: the small train placed.** `v4/src/place.c` is the host placer (`ABI.md` §5). It splits the code at each export, with the export's entry before its code. `mkf18a` takes `import nucleus NAME`, with hash 0 and the effect looked up by its dictionary name, and refuses a word that runs on into an export. `test_mesh_boot` places `tests/train-place`, built by `mkf18a`, on Hera at her HERE: its words run by name, the nucleus's `ABS` is reached, the kernel records each export, and six refusals leave Hera unchanged. Plan `2026-11-19-f18-artifact-build.md` §12 (ruled) and §13 (built). - **fe25519:** the carry is taken out by multiplying, not by a left shift of a negative value, which is undefined in C99. This is the nightly's sanitizer failure of 2026-11-20 (run 333), reproduced without the signing key (`logs/20261120-fe25519/`). `v4/tests/test_fe25519.c` has 16 checks: values that send a limb negative, and RFC 8032 tests 1 and 2, signed and verified. It runs plainly and under ASan+UBSan, and failed first. - **#189, Phase 7 Task 9: acceptance asserts the loops.** Every v4 boot checks L1 heat, L3 decay, L2 with L5 (L8 held on card 18), and L8's changes at the prompt. The new words are `L8-CARD@` and `L8-HOLD`, each with a POST case, so POST is now 992 cases. `WORD_PHYSICS` (Kconfig.physics) turns the word loops off: a boot with it off fails acceptance at POST. `V3-PARITY.md` §2.2 is corrected. Plan `2026-11-13-engine-step4-phase7-the-loops-and-parity.md`, Task 9 (ruled). - **Smaller changes:** - `capsules/BLOCK_MAP.md` refreshed (#145, #183); - `.claude/CLAUDE.md`: "while a PR is open, commit locally and push once" (#152); - evidence for #190 and #199. Each was test first, seen to fail. The rulings are in the plans. ## Acceptance - [x] `logs/20261120-192820/PROTOCOL.md` for the head: PASS, all eight stages, on 65737e28. The head is that tree plus its evidence; `scripts/check_protocol.sh` accepts it. `logs/20261120-192820/README.md` is the record. - The loops gave the same values on all four boots (amd64, aarch64, riscv64, the stick): heat 6, 1000 cooled to 0, variance not 0 and width 455, 66 changes ending on card 11. - `dict_hash=0x7c5a2f0c02145e63` on all three architectures, and POST 992/992 on every boot. - [x] Logs from other runs made by hand are committed in `logs/`: - the protocol on a9a8687f, FAILED at documents for want of the two new words' dictionary entries (`logs/20261120-184418/`), then fixed; - the `WORD_PHYSICS=0` boot (`logs/20261120-task9/`); - each task's gates. - [ ] Hardware this was tried on: none. Board bring-up is deferred until the lost hardware is replaced (Captain Bob, 2026-11-20). ## The record - [ ] `docs/fabric/FABRIC-3.md`: not in this PR. The rulings and what was built are in the two plans above. - [ ] `CHANGELOG.md`: not a milestone. - [x] Nothing in this PR is a fix nobody asked for. The fe25519 fix was ruled ("Fix it, test first"). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
rajames added 19 commits 2026-11-20 20:21:05 +00:00
The hash framing and what each provenance hash covers (choices 1, 2,
now in ARTIFACT.md section 4), the pool's unit 0, a literal store to
(PORT) as a request, capabilities through calls, and the import
placeholders at the node's top. Held locally until #198 merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
mkf18a takes nucleus=SYSDIR, assembles the nucleus as the ROM does and
looks NAME up by its dictionary name; a word in line there, or one with
no fixed effect, is refused (plan section 12, rulings 3 and 4).
test_mkf18a: 5 new checks failed first, 93 pass at both widths. Its
build now has the host node's size, as the tool's has: the nucleus did
not fit a mesh node's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
place.c places a train's artifact as ABI.md section 5 has it, the
code split at each export with its entry before it. test_mesh_boot
places tests/train-place, built by mkf18a with an import from the
nucleus: its words run by name, the nucleus's ABS is reached, the
kernel records each export, and six refusals leave Hera unchanged.
mkf18a refuses a word that runs on into an export. Failed first;
gates pass, POST 990/990. Plan section 13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
fe25519_carry shifts a negative carry left (fe25519.c:31, and :35),
undefined in C99; CI's signed capsules reach it in san-mesh-boot.
Reported, not fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
fe25519_carry's c << 51, with c negative after fe25519_sub, is
undefined in C99; the nightly's sanitized mesh boot stopped on it
(2026-11-20, run 333), reaching it through CI's signed capsules.
c * 2^51 is the same value. test_fe25519 (16 checks: values that
send a limb negative, and RFC 8032 tests 1 and 2 signed and verified)
runs in make -C v4 test and under ASan+UBSan in sanitize; it failed
first under UBSan at fe25519.c:31:26. Gates pass, POST 990/990.
The acceptance protocol runs before it reaches a PR (ruled: the next
PR, not #198).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Stale since those capsules changed on this branch: the build rewrites
it, but each boot's restore (nightly.sh, qemu_session.py) put the
committed copy back. make -f kernel/Makefile manifest (#145, ruled).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
Request -41, served by the kernel from the node's L8 state; the word
in physics.4th. test_mesh_boot checks it against the kernel's own
values, changes more than 0: failed first (UNKNOWN WORD), now 142
checks pass. POST.md takes only the new case and the counts: the two
cells that differ run to run are #199's. POST_FLOOR 990 -> 991.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
v4: acceptance asserts the loops -- L1, L3, L2 with L5, L8 -- and WORD_PHYSICS (#189, Phase 7 Task 9)
Build / Image RASPI (push) Successful in 6m16s
Build / Image PC (push) Successful in 6m19s
Build / Image MILKV (push) Successful in 8m30s
Build / v4 tests (32- and 64-bit cells) (push) Successful in 16m7s
a9a8687fa5
The acceptance session's loops(), at every v4 boot's prompt: a word's
heat (L1), its decay from a set heat (L3), INFER-RUN's variance and
width with L8 held on card 18 (L2, L5), and L8's changes. L8-HOLD
( card -- ), request -42, beside L8-CARD@, with its POST case: POST 992.
WORD_PHYSICS (Kconfig.physics, default y) turns the word loops off: a
boot with it off fails acceptance at POST (ruled 3a). Measured on amd64:
heat 6, 1000 cooled to 0 in 40 s, width 455, 66 changes. L8 unheld
settles on card 11, with the window off, so L2/L5 hold a card (ruled).
test_mesh_boot: L8-HOLD failed first, 144 checks now. V3-PARITY.md 2.2
corrected, dated. Gates pass, POST 992/992.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
The protocol's docs stage refused the two Task 9 words without
dictionary entries (my omission); every other stage passed, the loops
the same on the four boots: H=6, D=0, V=-1 455, L=66 11. Its report,
FAIL, is kept. The entries added, in the file's order; make dictionary
passes. The protocol runs again from accept-amd64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
logs: the protocol on 65737e28: PASS -- the loops the same on the four boots (#189)
Build / Image RASPI (push) Successful in 6m46s
Build / Image PC (push) Successful in 9m26s
Build / Image MILKV (push) Successful in 3m32s
Build / v4 tests (32- and 64-bit cells) (push) Successful in 14m24s
Acceptance / Acceptance (pull_request) Successful in 37m21s
6eecf0d2d7
All eight stages, a clean tree. loops() on every boot: heat 6, 1000
cooled to 0, variance not 0 and width 455 with L8 held on card 18, 66
card changes ending on card 11 -- the same on amd64, aarch64, riscv64
and the stick. dict_hash 0x7c5a2f0c02145e63, POST 992/992. The record
is logs/20261120-192820/README.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
rajames added 1 commit 2026-11-24 06:55:03 +00:00
Merge branch 'master' into StarForth-v4.0.0
Acceptance / Acceptance (pull_request) Successful in 55m29s
0825a4348f
rajames merged commit a4f0beaac8 into master 2026-11-24 07:52:53 +00:00
Sign in to join this conversation.