feat(v4): the heartbeat cycle's 256 is Kconfig's HEARTBEAT_CHECK_FREQUENCY (#189)

Captain Bob, 2026-11-13: "The 256 should probably be either a kconfig knob or a feedback loop for RWOT".
It is already Kconfig.heartbeat's HEARTBEAT_CHECK_FREQUENCY (default 256, v3's); the mesh now reads it.
Set in the config or on make's line, the kernel passes it to every object (checked: 128 reaches the
compile). A feedback loop from the window would be a design change, not v3's: not made. Not pushed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-13 22:21:39 +00:00
parent 7c33b99ebe
commit 2379503900
+7 -1
View File
@@ -104,7 +104,13 @@ typedef struct {
#define V4_MESH_SHRINK_RATE 50u /* v3's ADAPTIVE_SHRINK_RATE, percent */
#define V4_MESH_GROWTH_THRESHOLD 5u /* v3's ADAPTIVE_GROWTH_THRESHOLD, percent */
#define V4_MESH_DECAY_BATCH 64u /* v3's HEARTBEAT_DECAY_BATCH: words decayed in the background a cycle */
#define V4_MESH_CHECK_FREQUENCY 256u /* v3's HEARTBEAT_CHECK_FREQUENCY: word calls a heartbeat cycle */
/* word calls a heartbeat cycle: Kconfig.heartbeat's HEARTBEAT_CHECK_FREQUENCY (default 256), which the kernel's
* build passes to every object, as v3's (Captain Bob, 2026-11-13: "should probably be either a kconfig knob or a
* feedback loop for RWOT" -- the knob; a feedback loop from the window is a design change, not v3's) */
#ifndef HEARTBEAT_CHECK_FREQUENCY
#define HEARTBEAT_CHECK_FREQUENCY 256
#endif
#define V4_MESH_CHECK_FREQUENCY ((uint32_t)HEARTBEAT_CHECK_FREQUENCY)
typedef struct {
uint64_t tick; /* the node's heartbeat cycles (v3's tick_count): by execution, as v3 */
uint32_t check_counter; /* word calls since the last cycle */