diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index f181b183..868fd2e2 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -201,9 +201,10 @@ removed as an active target.) **Current status: M7.1** — capsule birth protocol, Mama FORTH vocabulary, Tripod multi-VM fleet (Hera/Artemis/Hestia — Hermes moved into the kernel as kernel-Hermes, FABRIC-3.6.md Phase 4, 2026-09-22), and word-level ACL (Phases 1–7) are live; POST at boot verifies parity -hash across amd64/aarch64/riscv64 with a 526-word Mama capsule dictionary (word count as of -2026-10-14, `FABRIC-3.md` §XXXVIII, hash `0x82f4ae7cb2e2d424`; verify against a live `PARITY:M7.1a word_count=` line before citing, it -changes with any new C word registration). +hash across amd64/aarch64/riscv64 with a 318-word Mama capsule dictionary (word count as of +2026-11-10, hash `0x8c92508f748f99cf`; corrected 2026-11-10 — this file said 526 words, +hash `0x82f4ae7cb2e2d424` (2026-10-14, `FABRIC-3.md` §XXXVIII); verify against a live +`PARITY:V4_SYSTEM word_count=` line before citing, it changes with any new C word registration). --- @@ -231,12 +232,11 @@ Output: `build//kernel/starkernel_loader.efi` + `build//kernel/stark Two independently tracked version strings flow into the generated `include/version.h`: `VERSION` (`kernel/Makefile` — the embedded StarForth engine version, currently `3.2.0`; note this does **not** auto-sync with the standalone StarForth repo's own version) and -`LITHOS_VERSION` (`kernel/Makefile` — the kernel version, currently **`2.1.0`**, bumped at -the `v2.1.0` tag that closed FABRIC-3.6; corrected 2026-10-14 -- this file said `3.1.0` / -`2.0.0`. History: it said `2.0.1` until 2026-09-19, but `FABRIC-3.md` §I.2 had rolled that -back to `2.0.0` on 2026-09-04 because `2.0.1` names the SER5 hardware-track line and claims -hardware progress not yet verified. The versioning policy is **semantic, not sequential** — see the -roadmap table in `kernel/Makefile` before choosing any version). +`LITHOS_VERSION` (`kernel/Makefile` — the kernel version, currently **`4.0.0-alpha.4`**; corrected 2026-11-10 — this file said `2.1.0` (bumped at +the `v2.1.0` tag that closed FABRIC-3.6; corrected 2026-10-14 from `3.1.0` / `2.0.0`, which +replaced `2.0.1` on 2026-09-19 per `FABRIC-3.md` §I.2 — `2.0.1` named the SER5 +hardware-track line and claimed unverified progress). The versioning policy is +**semantic, not sequential** — see the roadmap table in `kernel/Makefile` before choosing any version). ### Build configuration (Kconfig — real, wired, not vestigial) @@ -355,11 +355,21 @@ present in `logs/`: ### CI -`.gitea/workflows/build.yml` runs three parallel jobs, each building a real bootable -artifact (not just compiling): `build-amd64-iso` (kernel build + El Torito ISO), -`build-aarch64-iso` (same, ARM boot file naming), `build-riscv64-img` (kernel build + raw -GPT/FAT32 disk image — riscv64 virt doesn't support El Torito ISO or `-bios` QEMU mode, so -it ships a raw disk image instead). No QEMU boot step in CI — artifact packaging only. +**Corrected 2026-11-10** — this file previously named stale job IDs (`build-amd64-iso`, +`build-aarch64-iso`, `build-riscv64-img`) and said "No QEMU boot step in CI." + +Six workflows in `.gitea/workflows/`; all share a single `qemu` concurrency group +(`cancel-in-progress: false`) so at most one run executes at a time: +- **`acceptance.yml`** — PR gate into `master`: 3 QEMU boots (amd64/aarch64/riscv64) + + PC stick loaded high + `make -C v4 test-32`, all via `scripts/nightly.sh`; branch + protection requires this check to pass before the merge button unlocks. +- **`build.yml`** — push to working branch: 3 board image jobs (`make boot_image TARGET=`, + matrix: PC/amd64, RASPI/aarch64, MILKV/riscv64) + `v4-tests` job (`make -C v4 test`). +- **`nightly.yml`** — QEMU acceptance boots, 32-bit build, Isabelle/HOL proofs, images → Nexus. +- **`nightly-docs.yml`** — doxygen + asciidoctor-latex + texlive → Nexus. +- **`release.yml`** — triggers on `v*` tag push; full acceptance + versioned release artifacts + published to Nexus and a Gitea release created. +- **`runner-image.yml`** — builds the custom Docker runner image published to the Gitea registry. --- @@ -387,12 +397,11 @@ ID is its XXHash64 content hash — any mutation is detectable. execute IDENTITY (capsule code) → execute PERSONALITY (block 1 from ramdrive) → log parity record (VM ID + capsule hash + dict hash). -**Capsule files:** `capsules/` has 23 `.4th` files (the `mkcapsule` build tool reports "26 -capsule(s)" registered — some files apparently register more than one capsule entry; not -further investigated). Includes `init.4th`, `workload-0.4th`–`workload-9.4th`, -`init-l8-{stable,volatile,diverse,temporal,transition,omni}.4th`, plus `doe.4th`, -`doe-campaign.4th`, `lib.4th`, `process.4th`, `ACL.4th`, `zuse.4th` — more than the 17 older -docs claimed. +**Capsule files:** `capsules/` has **39** `.4th` files — corrected 2026-11-10; this file said +23 (then "more than the 17 older docs claimed"). 33 live at `capsules/*.4th`; 6 in +subdirectories: `capsules/artemis/init.4th`, `capsules/hestia/init.4th`, +`capsules/v4/centre.4th`, `capsules/v4/forth79.4th`, `capsules/v4/hera.4th`, +`capsules/v4/starshipos.4th`. Tool `tools/mkcapsule.c` assembles `.4th` files into the binary capsule directory format (`capsule_generated.c`) baked into the kernel image; it also regenerates @@ -438,12 +447,11 @@ status for kernel work. `TestCase.contract`/`WordTestSuite.suite_contract` trailing field, ~3,010 instances). Fixed in place across all 20 files (mechanical: added the missing `{0}` initializer, semantically a no-op since C99 already zero-fills unlisted trailing fields — the fix only silences the - diagnostic). Verified clean on all three architectures. Remaining, still-open warnings as - of the same audit: 26 `-Wunused-parameter` (scattered, several files, not yet fixed), 2 - `-Wsign-compare` (`control_words_test.c:127`), and 2 `-Wstringop-truncation` in - `tools/mkcapsule.c` — that last one is a separate host build tool compiled via plain `cc - -Wall -Wextra -O2` (no `-Werror` at all), never actually gated by this policy in the first - place, genuinely unfixed rather than exempted. + diagnostic). Verified clean on all three architectures. Remaining, still-open warnings as of 2026-11-10: **5 `-Wformat-truncation`** in + `tools/mkcapsule.c` — corrected 2026-11-10; this file said 26 `-Wunused-parameter`, + 2 `-Wsign-compare`, and 2 `-Wstringop-truncation` (the -Wunused-parameter and + -Wsign-compare diagnostics were resolved since that audit). `tools/mkcapsule.c` is a + host build tool compiled via plain `cc -Wall -Wextra -O2` (no `-Werror`). - **No hidden state** — All VM state is explicit in the `VM` struct - **Platform-agnostic** — Kernel code gated by `__STARKERNEL__` and `STARFORTH_ENABLE_VM` - **Content-addressed immutability** — Capsule ID = content hash; any mutation is detectable