Expand description
Split out of the single-file bootstrap module unchanged (SPEC_LARGE_FILE_MODULE_ANALYSIS_2026_09_30.md §4.3).
Structs§
- Network
Bundle - Output of
bind_listeners_and_network.
Functions§
- bind_
listeners_ and_ network - Step 5: Bind 2 TCP listeners (web + ws — separate ports matching Go), then bring up LAN discovery (mDNS), the LSP supervisor, stale registry cleanup, and the process tracker/broker.
- bind_
startup_ 🔒listeners - The web and ws listeners.
- spawn_
registry_ 🔒heartbeat - 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_atis stamped once at registration and never refreshed, soshould_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 underFORWARD_FAILURE_GRACE_MSso 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). - start_
lan_ 🔒services - LAN discovery (mDNS) and the LAN listener supervisor; returns the host name, resolved once because discovery needs it for its mDNS TXT records.
- start_
process_ 🔒services - The agent process tracker and the process broker, both also set as process globals.
- sweep_
stale_ 🔒registry_ entries - Clean up stale cross-instance agent registry entries (older than 4h), and the same for the host-global shared registry (Tier 2b, #1916), which additionally drops entries whose owning PID no longer exists on this host: a channel that crashed without a clean unregister can leave an entry behind indefinitely otherwise, since no other channel’s startup would revisit it.