From 23795039009cb3ead4daaccc6326ce026f390c24 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Nov 2026 22:21:39 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm --- v4/include/v4/mesh.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/v4/include/v4/mesh.h b/v4/include/v4/mesh.h index 9843c048..d81f1da9 100644 --- a/v4/include/v4/mesh.h +++ b/v4/include/v4/mesh.h @@ -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 */