Files
LithosAnanake/experiments/bare_metal/runs/doe-amd64-20260803-231322.csv
T
Robert Allan JamesandClaude Sonnet 5 3699be964d starkernel: converge the tick path and wire the adaptive heartbeat (item 0.8)
Introduces src/starkernel/heartbeat.c as the shared top/bottom-half
implementation of heartbeat_init/tick/service/ticks/trust/state, replacing
the per-architecture duplicates in amd64/riscv64/aarch64 timer.c. Each
arch's timer.c now contributes only heartbeat_read_counter() (rdtsc /
rdtime / CNTPCT_EL0). Per the GAP-A1 ruling the top half stays counter+
latch only; heartbeat_service() (called every REPL idle iteration,
unconditionally per FABRIC.md's fidelity note) does the window/variance/
trust work outside interrupt context. vm_tick()'s call sites are
unchanged -- the engine still runs on the virtual tick.

Per FABRIC.md §26 (ruled 2026-08-03): wires Loop #7's execution-derived
stable/volatile signal into the physical re-arm period. vm_runtime.c's
existing Loop #7 site now calls heartbeat_set_adaptive_period_ns() with
tick_target_ns ratio-rescaled onto a 10ms kernel base (not the hosted
10us HEARTBEAT_TICK_NS -- see §26.3 for the scale mismatch). Each
architecture's re-arm function (apic_timer_rearm() on amd64/aarch64,
riscv64_timer_rearm()) now converts heartbeat_next_period_ns() to its
own raw counter units instead of a fixed constant; amd64 gained a
rearm function it didn't previously need, since periodic-mode auto-reload
never required one before this item.

Verified: all three architectures build with no new warnings and boot
cleanly to ok> with dict_hash=0x3d4e1daf289da94f, unchanged from the
pre-change baseline -- no regression. Verified NOT achieved: live re-arm
period variation under load. A temporary diagnostic (added and reverted)
confirmed Loop #7 never actually fired during a live QEMU session -- a
synthetic word-execution loop drove ~6,500 executions, past the 1000-tick
inference frequency, without tripping vm_tick_inference_engine()'s
pre-existing !vm->rolling_window.is_warm gate. That gate predates this
item and was not investigated -- out of scope. FABRIC.md's Done-when is
amended to record this honestly rather than claim it.

Punch list §25 item 0.8 complete (per amended, weaker acceptance -- see
the item's own annotation).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-04 00:01:48 -04:00

4.0 KiB

1tick_numberelapsed_nstick_interval_nscache_hits_deltabucket_hits_deltaword_executions_deltahot_word_countavg_word_heat_q48window_widthactual_window_sizepredicted_label_hitsjitter_bitsapic_tickstime_trust_q48variance_q48vm_call_depth_maxhera_heat_q48hermes_heat_q48artemis_heat_q48
2110000100000018344573173100065536006553600
3220000100000017354458258200065536006553600
4330000100000018466058258200065536006553600
544000010000001748714096000065536006553600
6550000100000015097858258200065536006553600
7660000100000015911734096000065536006553600
87700001000000188157168568500065536006553600
98800001000000214168368568500065536006553600
10990000100000021619824096000065536006553600
11101000001000000222218456756700065536006553600
12111100001000000207238673173100065536006553600
1312120000100000018926834096000065536006553600
14131300001000000221288073173100065536006553600
15141400001000000204298368568500065536006553600
16151500001000000203308273173100065536006553600
17161600001000000201328356756700065536006553600
18171700001000000190348673173100065536006553600
19181800001000000170357358258200065536006553600
20191900001000000154284473173100065536006553600
21202000001000000154284156756700065536006553600
2221210000100000015332394096000065536006553600
23222200001000000167354258258200065536006553600
24232300001000000176374168568500065536006553600
25242400001000000175373973173100065536006553600
26252500001000000196383773173100065536006553600
2726260000100000019241374096000065536006553600
28272700001000000158403868568500065536006553600
2928280000100000015840354096000065536006553600
3029290000100000016441374096000065536006553600
31303000001000000154433968568500065536006553600
32313100001000000172463558258200065536006553600
33323200001000000180493456756700065536006553600
34333300001000000145513556756700065536006553600
35343400001000000203533758258200065536006553600
36353500001000000154553973173100065536006553600
3736360000100000014457374096000065536006553600
3837370000100000014457354096000065536006553600
3938380000100000013257344096000065536006553600
4039390000100000018057324096000065536006553600
4140400000100000022063294096000065536006553600
42414100001000000215642840962400065536006553600
43424200001000000208682940962400065536006553600
44434300001000000177722740962400065536006553600
45444400001000000199772840962400065536006553600
46454500001000000223822640963000065536006553600
47464600001000000202852440966700065536006553600
484747000010000002189125409619800065536006553600
494848000010000002219226409635000065536006553600
504949000010000002259726409652800065536006553600
5150500000100000021410027409669400065536006553600
5251510000100000022710228409688300065536006553600
53525200001000000208102294096104300065536006553600
54535300001000000207102304096120200065536006553600
55545400001000000200102314096131900065536006553600
56555500001000000205103324096146400065536006553600
57565600001000000211103324096162000065536006553600
58575700001000000193110334096171200065536006553600
595858000010000001905674096177500065536006553600