From eb94b2aae6369a9024e6216715d289f86cff2c35 Mon Sep 17 00:00:00 2001 From: atlas Date: Mon, 13 Jul 2026 11:05:58 +0200 Subject: [PATCH] docs(#2363): fix stale 'remap' comments in hive-gateway.nix The DHCP pool exclusion is now by construction (agent_slots = usable - dhcpPoolSize), not a secondary-hash remap. Update two comment blocks that still referenced the old approach. --- nix/modules/hive-gateway.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nix/modules/hive-gateway.nix b/nix/modules/hive-gateway.nix index dab02e3d..4793d5ae 100644 --- a/nix/modules/hive-gateway.nix +++ b/nix/modules/hive-gateway.nix @@ -13,9 +13,11 @@ let # DHCP pool for bridge-attached service containers (hive-ci, etc.). # Occupies the last dhcpPoolSize usable addresses of the subnet - # (e.g. .241-.254 on a /24). Agent containers use deterministic static + # (e.g. .241-.254 on a /24). Agent containers use hash-derived static # IPs (lifecycle::agent_network_ip) and are excluded from this range - # by a remap in the Rust code. + # by subtracting dhcpPoolSize from the usable count before hashing + # (agent_slots = usable - dhcpPoolSize), so agents only ever land in + # [.2, .(usable-dhcpPoolSize+1)] by construction. # # Single source of truth: `nix/dhcp-pool-size` (one integer). # Rust reads it at compile time via `include_bytes!` in lifecycle/mod.rs. @@ -1035,7 +1037,8 @@ in # DHCP pool for bridge-attached service containers (hive-ci, etc.). # Range is computed from the bridgeIp/bridgePrefixLength at eval # time; the last dhcpPoolSize usable host addresses are reserved. - # Agent containers are excluded by agent_network_ip's DHCP remap. + # Agent containers hash into agent_slots = usable - dhcpPoolSize + # so they never land here (excluded by construction, not remapping). dhcp-range = "${dhcpStart},${dhcpEnd},1h"; dhcp-leasefile = "/var/lib/dnsmasq/dnsmasq.leases"; };