The header scan (Captain Bob, 2026-11-10): 788 source files -- 351 with the
SL-1.0 header, 12 with the old name (docs/working/experiments, kept by
ruling), 31 under someone else's licence (tools/kconfig, Linux's, GPL-2.0:
kept), and 394 with none. Ruled: the SPDX form; capsules (.4th, .f18) and
proofs (.thy) left for a ruling of their own (mkcapsule's 64x16 block format,
content-addressed capsules).
253 files now begin
SPDX-License-Identifier: LicenseRef-Starship-1.0
Copyright (c) 2023-2026 Robert A. James
as a /* */ block (C, headers, assembly, linker scripts) or # lines (scripts,
Makefiles, Kconfig; below a shebang or a coding line); tools/mkcapsule.c,
which had the copyright line, gets the SPDX line only.
Not touched: docs/working/ (archive and old campaign material, as the
ruling kept the experiments); v4/system/post_cases.c (generated by
v4/tools/mkpost.py, "do not edit" -- the generator has the header).
Comments only: the kernel builds on amd64, aarch64, riscv64; make -C v4
test-32: 39 programs, 0 failures; every changed script parses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
88 lines
4.0 KiB
Plaintext
88 lines
4.0 KiB
Plaintext
# SPDX-License-Identifier: LicenseRef-Starship-1.0
|
|
# Copyright (c) 2023-2026 Robert A. James
|
|
menu "Heartbeat / adaptive tick coordinator"
|
|
|
|
config HEARTBEAT_THREAD_ENABLED
|
|
bool "Run vm_tick() in a background thread (HEARTBEAT_THREAD_ENABLED)"
|
|
depends on STARFORTH_VARIANT_HOSTED
|
|
default y
|
|
help
|
|
y = OPTIMAL: vm_tick() runs in a dedicated background thread.
|
|
n = legacy inline tick, driven from the main interpreter loop.
|
|
|
|
Kernel-build resolution (Phase 4 of the Kconfig migration, the
|
|
phase's named verification target): `depends on
|
|
STARFORTH_VARIANT_HOSTED` above means this symbol is invisible for
|
|
a kernel-variant config -- CONFIG_HEARTBEAT_THREAD_ENABLED simply
|
|
never appears in a kernel .config/auto.conf, so
|
|
mk/Kconfig.mk's kconfig_bool bridge resolves it to 0 for kernel
|
|
builds without needing a special case. This is UI/model
|
|
correctness (menuconfig can't offer a choice LithosAnanke has no
|
|
way to honor -- there are no pthreads in a freestanding kernel),
|
|
not the sole enforcement mechanism: kernel/Makefile additionally
|
|
keeps its own unconditional `VM_FEATURE_OVERRIDES +=
|
|
-DHEARTBEAT_THREAD_ENABLED=0` post-override exactly as it was
|
|
before this migration. Deliberately redundant with the `depends
|
|
on` above -- the Kconfig model documents *why* the kernel can't
|
|
offer this choice, the Makefile-level override *guarantees* the
|
|
kernel never ships with a threaded heartbeat even if the Kconfig
|
|
tree, a hand-edited auto.conf, or a future refactor ever
|
|
disagrees. Belt-and-suspenders on purpose: the failure mode this
|
|
guards against (a freestanding kernel image linking against
|
|
pthreads that don't exist) is silent-until-boot and expensive to
|
|
debug on real hardware, not the kind of thing to trust to a single
|
|
layer.
|
|
|
|
config HEARTBEAT_TICK_NS
|
|
int "Heartbeat thread wake period, nanoseconds (HEARTBEAT_TICK_NS)"
|
|
depends on HEARTBEAT_THREAD_ENABLED
|
|
default 10000
|
|
help
|
|
Background heartbeat thread wake frequency (default 10000ns = 1ms).
|
|
Only meaningful when HEARTBEAT_THREAD_ENABLED is on.
|
|
|
|
config HEARTBEAT_CHECK_FREQUENCY
|
|
int "Word-execution gate for a tick, executions (HEARTBEAT_CHECK_FREQUENCY)"
|
|
default 256
|
|
help
|
|
vm_tick() is gated by executed-word count, not just wall time --
|
|
this is how many word executions must occur between heartbeat
|
|
checks. This is also, note well, the same counter that makes
|
|
vm->heartbeat.tick_count a purely execution-driven virtual clock
|
|
(see docs/working/architecture/VM-FLEET-ATTRACTOR-DESIGN-20260705.md,
|
|
rev t) -- the value Loop #3 heat decay reads instead of real
|
|
nanoseconds, to keep dict_hash architecture-invariant.
|
|
|
|
config HEARTBEAT_WINDOW_TUNING_FREQUENCY
|
|
int "Rolling window width re-tune interval, ticks (HEARTBEAT_WINDOW_TUNING_FREQUENCY)"
|
|
default 1000
|
|
help
|
|
How many heartbeat ticks between Loop #5 (window width inference)
|
|
runs.
|
|
|
|
config HEARTBEAT_SLOPE_VALIDATION_FREQUENCY
|
|
int "Decay slope re-validation interval, ticks (HEARTBEAT_SLOPE_VALIDATION_FREQUENCY)"
|
|
default 5000
|
|
help
|
|
How many heartbeat ticks between Loop #6 (decay slope inference)
|
|
revalidation runs.
|
|
|
|
config EMERGENCY_CONSOLE_ENABLED
|
|
bool "Interactive fault handler / debug-escape REPL (EMERGENCY_CONSOLE_ENABLED)"
|
|
default n
|
|
help
|
|
Decided 2026-09-05: no console for the running system unless a
|
|
thumbdrive is present -- n (the new default) is the production/
|
|
high-security posture. When n: the kernel boots headless (no
|
|
banner, no prompt, no interactive surface at all) until a real
|
|
identity logs in via an attached thumbdrive (a regular user's
|
|
WIREBIND login or Zuse's own attach/genesis-mint -- neither is
|
|
special), and a runtime error halts the VM rather than handing
|
|
control back to an interactive console (no fallthrough surface).
|
|
Set to y only for debugging/recovery builds: the kernel shows its
|
|
interactive console immediately at boot regardless of any
|
|
thumbdrive, and REPL errors recover and continue instead of
|
|
halting. Applies to both the hosted VM and the kernel build.
|
|
|
|
endmenu
|