10 Commits
Author SHA1 Message Date
rajames fdf9c1946c Merge pull request 'v4 fabric to spec: the mesh boot, the one adaptive heartbeat, mechanism A (#189)' (#197) from StarForth-v4.0.0 into master
Runner image / Build and publish the runner image (push) Failing after 8m54s
Release / Release ${{ github.ref_name }} (push) Failing after 35m23s
Merge StarForth-v4.0.0: the fabric to spec (v4.0.0-alpha.5), PR #197
2026-11-19 11:19:48 +00:00
Claude b9b2bd81da logs: the protocol on 7975bab0 (the heartbeat's walk in slices): PASS
Acceptance / Acceptance (pull_request) Successful in 31m27s
Build / Image RASPI (push) Successful in 3m7s
Build / Image PC (push) Successful in 3m35s
Build / Image MILKV (push) Successful in 4m2s
Build / v4 tests (32- and 64-bit cells) (push) Successful in 14m45s
Every stage passes. accept-aarch64 passes BIRTH and every later check,
in 459 s. POST is 990/990 on all four boots, with one dict_hash
(0x847bd8ef42f53e14). test-32, the proofs, the images and the docs pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 03:11:18 +00:00
Claude 7975bab049 heartbeat: the Stadium's resident heat, walked a slice each tick -- CI's aarch64 BIRTH stall
The heartbeat's one input walked all 335,544 Stadium cells every tick,
about 15 ms on aarch64 TCG, longer than a tick. At fast pacing it took
the CPU, and a birth missed the session's 300 s on CI. That was my
11-17 change.

Captain Bob ruled: sample less often, scaled by the cells, measured
first, as a slice each tick; the slope inference later.
- stadium_heat_walk_step() walks STADIUM_HEAT_SLICE_CELLS cells per
  tick (Kconfig, 5500, about 0.25 ms on aarch64 TCG).
- A completed walk is one sample.
- The heartbeat's load takes a sample only when a walk is done.

Test first: test_stadium_node (21 checks) and test_heartbeat (13). Both
failed to build before. All kernel host tests pass. Four aarch64 boots
in a row pass 18/18 each, BIRTH included.

The evidence is in logs/20261119-heat-slice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 02:32:38 +00:00
Claude 13fae6df30 qemu_session.py: the CPU snapshot also dumps the code at each PC
Eight words at the PC, by its address, name the function offline. The
image loads where the firmware puts it, and the boot does not print
that address. aarch64's monitor has no $pc, so the address is taken
from the register line; checked on a real, paused QEMU.

Test first: the snapshot test, 6 checks; the new one failed before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 02:32:21 +00:00
Claude b6c87b3045 logs: the protocol on 36b25805 -- FAIL: aarch64 BIRTH stalled here too; the repro boot that caught it
accept-aarch64 failed at BIRTH. The new CPU snapshot showed the kernel
looping, not hung. The other stages passed, including riscv64, the
stick, test-32, the proofs and the images. I ran them before reading
aarch64's result, which was the wrong order.

The repro boot (logs/20261119-012050) gave the code at each PC. Matched
in the loader EFI's map, they name bitmap_get inside
stadium_resident_heat_total, then background_decay and isqrt64. That is
the heartbeat's load, which walked all 335,544 Stadium cells every tick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 02:32:21 +00:00
Claude 36b258054c qemu_session.py: a failed check prints where the CPUs are (cpu_snapshot)
CI's Acceptance fails on aarch64 at BIRTH on every head since 58d0e887.
The birth takes more than 300 s there and does not reproduce here: about
11 s, unsigned. The heartbeat spiral was ruled out by an instrumented
scratch kernel.

Captain Bob ruled "Diagnose on CI". On a failed check, the session script
asks QEMU's monitor for the registers three times, a second apart, and
prints the program counters, so CI's next failure shows where the kernel
is and whether it moves. A monitor that does not answer does not stop
the run.

Test first: scripts/test_qemu_session_snapshot.sh, 5 checks; 3 failed
before. The register text was checked on real, paused QEMU for aarch64,
riscv64 and x86.

The evidence and the measurements are in logs/20261119-ci-snapshot. The
local aarch64 timing run is in logs/20261118-235613.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 00:29:23 +00:00
Claude c2e42c3cba logs: the protocol on 0565a039 (release: v4.0.0-alpha.5): PASS
Build / Image RASPI (push) Successful in 4m54s
Build / Image PC (push) Successful in 3m52s
Build / Image MILKV (push) Successful in 4m41s
Build / v4 tests (32- and 64-bit cells) (push) Successful in 14m54s
Acceptance / Acceptance (pull_request) Failing after 40m41s
Every stage passes. POST is 990/990 on all four boots, with one
dict_hash (0x847bd8ef42f53e14). test-32, the proofs, the images and the
docs pass. accept-aarch64 (411 s) and docs ran in the background, each
alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-18 23:39:23 +00:00
Claude 0565a03996 release: v4.0.0-alpha.5
Captain Bob ruled: the line for new work is drawn with a merge, then a
tag, v4.0.0-alpha.5. This sets LITHOS_VERSION in kernel/Makefile and
updates README, CHANGELOG and CLAUDE.md to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-18 23:06:05 +00:00
Claude 7099f42a5a logs: the protocol on e29a00f7: PASS
Build / Image RASPI (push) Successful in 4m57s
Build / Image PC (push) Successful in 5m8s
Build / Image MILKV (push) Successful in 5m21s
Build / v4 tests (32- and 64-bit cells) (push) Successful in 14m17s
Acceptance / Acceptance (pull_request) Failing after 43m4s
Every stage passes. POST is 990/990 on all four boots, with one
dict_hash (0x847bd8ef42f53e14). test-32, the proofs, the images and the
docs pass. accept-aarch64 (416 s) and docs ran in the background, each
alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-18 22:19:53 +00:00
Claude e29a00f717 docs: dict_hash 0x847bd8ef42f53e14 in README and CLAUDE.md; FABRIC-3 XLVIII.28 closes the capsule-blocks work
Captain Bob ruled: the line for new work is drawn with a merge, then a tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-18 21:43:57 +00:00
108 changed files with 252640 additions and 15 deletions
+3 -2
View File
@@ -199,7 +199,8 @@ removed as an active target.)
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 404-word dictionary (word count as of 2026-11-18, hash
`0xf4e9fdc94f6bfc77`, POST 990/990, `logs/20261118-151921/PROTOCOL.md`; corrected 2026-11-18 — this file said
`0x847bd8ef42f53e14`, POST 990/990, `logs/20261118-204012/PROTOCOL.md`, capsules loaded through blocks; before that
`0xf4e9fdc94f6bfc77`, `logs/20261118-151921/PROTOCOL.md`; corrected 2026-11-18 — this file said
403 words, hash `0x627f392ccbaa96f1` (2026-11-17, before `starshipos.4th` loaded); it said 318 words, hash `0x8c92508f748f99cf` (2026-11-10); corrected 2026-11-10 — it 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).
@@ -230,7 +231,7 @@ Output: `build/<arch>/kernel/starkernel_loader.efi` + `build/<arch>/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 **`4.0.0-alpha.4`**; corrected 2026-11-10 — this file said `2.1.0` (bumped at
`LITHOS_VERSION` (`kernel/Makefile` — the kernel version, currently **`4.0.0-alpha.5`**; corrected 2026-11-18 — this file said `4.0.0-alpha.4`; corrected 2026-11-10 — it 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
+14
View File
@@ -1,5 +1,19 @@
# Changelog
## 2026-11-18 — LithosAnanke v4.0.0-alpha.5: the fabric to spec
The kernel boots v4's fabric as designed (#189):
- Hera is born in the fabric and runs v3's whole POST, 990 cases, as written.
- Every node ticks on the one adaptive heartbeat, in lockstep.
- Each step walks only the places that hold a node (mechanism A, which brought aarch64 back inside
its 570 s).
- A fault dump prints when a node stops, and a diagnostic build follows any failed stage.
- Capsules are ephemeral: a block lands at its number less the RAM block count, a later write
overwrites, and the loader interprets the lowest block
(`docs/v4.0.0/plans/2026-11-18-capsule-blocks.md`).
`dict_hash` is `0x847bd8ef42f53e14`. `docs/fabric/FABRIC-3.md` XLVIII.25–28.
## 2026-11-10 — LithosAnanke v4.0.0-alpha.4: the plug-and-play stick
The plug-and-play stick (#92), the BAM flush (#155), the Book of Fabric (#138), the Dictionary of v4 (#157), and the .com’s Downloads and Documents pages (#126, #161).
+9
View File
@@ -111,6 +111,15 @@ config STADIUM_CAPACITY_TICK
tuning is DoE work (item 5.1), same treatment as the other
placeholder constants in this file.
config STADIUM_HEAT_SLICE_CELLS
int "Stadium cells walked per heartbeat tick for the heartbeat's load (STADIUM_HEAT_SLICE_CELLS)"
default 5500
help
The adaptive heartbeat paces by the Stadium's resident heat, walked a
slice each tick: a whole walk is cells / this many ticks. 5500 is about
0.25 ms on aarch64 under TCG (measured 2026-11-19), a tenth of the
fastest tick.
config STADIUM_MEMORY_PERCENT
int "Percent of free physical memory the Stadium claims at boot (STADIUM_MEMORY_PERCENT)"
default 1
+4 -4
View File
@@ -1,4 +1,4 @@
# LithosAnanke v4.0.0-alpha.4
# LithosAnanke v4.0.0-alpha.5
**UEFI-bootable FORTH microkernel.** Boots from firmware, initialises memory and interrupts, then
runs StarForth as its sole userspace runtime. No libc. No OS. Just stone and necessity.
@@ -7,8 +7,8 @@ runs StarForth as its sole userspace runtime. No libc. No OS. Just stone and nec
**Try it in your browser:** [starshipos-f18.com](https://starshipos-f18.com/) — a StarshipOS
machine of your own, booted to `[zuse@Hera] ok>`, thrown away when you leave. **Releases:**
[v4.0.0-alpha.4](https://gitea.starshipos-f18.org/rajames/LithosAnanke/releases),
the kernel `4.0.0-alpha.4` with the StarForth engine `3.2.0`.
[v4.0.0-alpha.5](https://gitea.starshipos-f18.org/rajames/LithosAnanke/releases),
the kernel `4.0.0-alpha.5` with the StarForth engine `3.2.0`.
---
@@ -46,7 +46,7 @@ milestone, #156): what v4 needs of it, the block layer, moves into v4 and the re
**v4 is the default build, and v3 is being retired**: every kernel boots v4 unless its boot
arguments say `system=v3`. POST at boot, on all three ISAs: v4 — **990 tests**,
`PARITY:V4_SYSTEM word_count=404 dict_hash=0xf4e9fdc94f6bfc77` (`logs/20261118-151921/PROTOCOL.md`); v3 — **1052 tests**,
`PARITY:V4_SYSTEM word_count=404 dict_hash=0x847bd8ef42f53e14` (`logs/20261118-204012/PROTOCOL.md`); v3 — **1052 tests**,
`PARITY:M7.1a word_count=526 hash=0x82f4ae7cb2e2d424`.
**How a change gets in** (the Captain Bob method): `master` is reached only through a pull request
+31
View File
@@ -6816,3 +6816,34 @@ What the record asks beyond POST, each gap put to Captain Bob one at a time:
- **Ruled:** a long stage runs in the background, but only alone: "as long as there is no other
background process running including docs. In fact that might generalize too" (`.claude/memory/rules.md`).
### 28. Capsule blocks: no claims, placed in RAM, the lowest loaded (2026-11-18)
**The talk** (Captain Bob): "Capsules are ephemeral." Its rulings, one at a time, are in
`docs/v4.0.0/plans/2026-11-18-capsule-blocks.md`:
- `Block n` is copied down by R, the RAM block count; the fixed 2048 was "THE BUG".
- A later write overwrites: "Deterministic and final", within a capsule too.
- Where a block lands, and any chaining, is the developer's responsibility.
- The block map is "a convenience", and the range tables go.
**Built, test first, each step verified:**
| Step | Commit | What |
|---|---|---|
| 1 | 6f9900f8 | `BLK_RAM_USER_BLOCKS` is a Kconfig knob (default 2048). The kernel's block layout, `mkcapsule` and `mkartemis` follow it. |
| 2 | f30005e1 | `mkcapsule` makes no claims. The collision gate, `capsule-reserved.txt` and the resolver go ("All of it goes"). |
| 3 + 4, v4 | 6dcfbe67 | Every v4 loader places a capsule's blocks in RAM at `n - R`, then interprets `<lowest> LOAD`. The v4 capsules are renumbered to land at 1900 and up, and chained with `-->`. |
**Kept as is:**
- v3's `INIT` ("Yeah, keep").
- The hosted product, only kept green for the gates that run it: "Nobody cares about hosted anymore".
**`(-` as a build marker per block:** an open stub, until the SDK.
**The protocol on 53b1e98e** (`logs/20261118-204012/PROTOCOL.md`): **PASS**.
- POST is 990/990 on all four boots.
- `dict_hash` is `0x847bd8ef42f53e14` on all three ISAs; it changed with the block path.
**The line drawn here** (Captain Bob: "I want to make a delineation for new work"; ruled "Merge, then a
tag"): PR #197 merges once its Acceptance passes, and a tag on `master` marks the line. New work starts
after it.
+3 -2
View File
@@ -119,7 +119,7 @@ endif
# the messaging layer was replaced by kernel-Hermes, PLOT/FB-* relocated to Hestia —
# all dictionary-visible, no FORTH-79 word semantics changed.
VERSION ?= 3.2.0
LITHOS_VERSION ?= 4.0.0-alpha.4
LITHOS_VERSION ?= 4.0.0-alpha.5
# ==============================================================================
# BUILD PATHS
@@ -494,6 +494,7 @@ $(eval $(call kconfig_int,STADIUM_CONTAINS_DEPTH_MAX,5))
$(eval $(call kconfig_int,STADIUM_CAPACITY_TICK,1000))
$(eval $(call kconfig_int,STADIUM_MEMORY_PERCENT,1))
$(eval $(call kconfig_int,STADIUM_WORD_HEAT_QUANTUM,2048))
$(eval $(call kconfig_int,STADIUM_HEAT_SLICE_CELLS,5500))
$(eval $(call kconfig_int,STADIUM_WORD_COOL_RATE_Q48,21845))
$(eval $(call kconfig_int,STADIUM_BLOCK_HEAT_QUANTUM,2048))
$(eval $(call kconfig_int,STADIUM_BLOCK_COOL_RATE_Q48,21845))
@@ -543,7 +544,7 @@ VM_FEATURE_FLAG_VARS := \
HEARTBEAT_SLOPE_VALIDATION_FREQUENCY SK_PARITY_DEBUG \
EMERGENCY_CONSOLE_ENABLED STADIUM_MAX_VM_COUNT \
STADIUM_CONTAINS_DEPTH_MAX STADIUM_CAPACITY_TICK \
STADIUM_MEMORY_PERCENT \
STADIUM_MEMORY_PERCENT STADIUM_HEAT_SLICE_CELLS \
SSM_ENTROPY_HIGH_THRESHOLD SSM_CV_HIGH_THRESHOLD \
SSM_TEMPORAL_DECAY_THRESHOLD SSM_TEMPORAL_DECAY_LOW_THRESHOLD \
SSM_HYSTERESIS_TICKS \
+3 -1
View File
@@ -203,7 +203,9 @@ uint64_t heartbeat_read_counter(void);
#define HEARTBEAT_PACE_EVERY 1000u /* samples between runs: Kconfig.heartbeat's inference frequency */
#endif
#define HEARTBEAT_PACE_WINDOW 1024u /* the heartbeat's own rolling window, in samples */
typedef uint64_t (*heartbeat_load_fn)(void);
/* The source does a slice of its work each call, and gives a sample (returns 1) when a whole one is done
* (2026-11-19: the Stadium walked a slice each tick); 0 otherwise. */
typedef int (*heartbeat_load_fn)(uint64_t *sample);
void heartbeat_pace_from(heartbeat_load_fn load); /* 0: no source, no pacing */
uint64_t heartbeat_pace_samples(void);
uint64_t heartbeat_pace_runs(void);
+11
View File
@@ -397,6 +397,17 @@ uint64_t stadium_resident_sum(VMUuid vm_id);
* by (kernel/src/heartbeat.c, heartbeat_pace_from; Captain Bob, 2026-11-17). Read only. */
uint64_t stadium_resident_heat_total(void);
/* The same total, walked a slice at a time (Captain Bob, 2026-11-19: "A slice each tick"). A whole walk of the
* Stadium is ~15 ms on aarch64 under TCG (335,544 cells, ~22,000 a millisecond), more than a heartbeat tick: the
* heartbeat that took it every tick starved the system (CI's aarch64 BIRTH stall). Each step walks the next `cells`
* cells into `w`; when the walk reaches the end it gives the sum in *sample, returns 1 and starts again; otherwise 0.
* A walk's sum is stadium_resident_heat_total() as it stood over the walk. Read only. */
typedef struct { size_t cursor; uint64_t acc; } stadium_heat_walk;
int stadium_heat_walk_step(stadium_heat_walk *w, size_t cells, uint64_t *sample);
#ifndef STADIUM_HEAT_SLICE_CELLS
#define STADIUM_HEAT_SLICE_CELLS 5500u /* Kconfig: ~0.25 ms on aarch64 TCG, a tenth of the fastest tick (2.5 ms) */
#endif
/*
* stadium_conserved - Boolean analogue of vm_physics_conserved(), for the
* Stadium per-VM quota invariant rather than fleet-wide execution heat
+3 -2
View File
@@ -83,8 +83,9 @@ uint64_t heartbeat_pace_runs(void) { return g_pace_runs; }
/* one sample of the load into the window; every HEARTBEAT_PACE_EVERY of them, the slope provider and Loop #7 */
static void pace_sample(void)
{
if (!g_pace_load) return;
g_pace_window[g_pace_samples % HEARTBEAT_PACE_WINDOW] = g_pace_load();
uint64_t v;
if (!g_pace_load || !g_pace_load(&v)) return; /* a slice each tick; a sample when a walk is done */
g_pace_window[g_pace_samples % HEARTBEAT_PACE_WINDOW] = v;
g_pace_samples++;
#if STARFORTH_V4
if (g_pace_samples % HEARTBEAT_PACE_EVERY == 0) {

Some files were not shown because too many files have changed in this diff Show More