Skip to main content

spawn_registry_heartbeat

Function spawn_registry_heartbeat 

Source
fn spawn_registry_heartbeat(local_web_url: String)
Expand description

Periodic re-registration heartbeat for every LOCALLY-registered agent’s Tier 2 (per-channel) and Tier 2b (host-global shared) registry entries. Without it an entry’s updated_at is stamped once at registration and never refreshed, so should_evict_on_forward_failure (registry.rs)’s grace-period check is only ever true in the ~60s right after an agent registers, useless for any steady-state agent. The heartbeat keeps a live agent’s on-disk entries fresh indefinitely; a genuinely-dead agent simply stops appearing in the in-memory Tier-1 registry (reactive::get_global_handler().list_agents(), updated synchronously on every register/unregister), so its entries age past the grace period and become evictable again within one heartbeat interval. The interval is well under FORWARD_FAILURE_GRACE_MS so a live entry’s age never approaches the grace threshold between heartbeats. See docs/retro/retro-cross-channel-jekt-eviction-2026-08-17.md (#2640).