You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(074): honor per-server discovery cadence + hot-reload global intervals
Addresses the two Codex review findings (MCP-1186) on PR #609.
Finding 1 — per-server tool_discovery_interval was inert at runtime. The
periodic background sweep listed every connected server every global cycle
regardless of per-server overrides. The sweep now resolves each server's
tool_discovery_interval and skips servers that are disabled (<=0) or not yet
due (Manager.DiscoverToolsDue + per-server lastSweptAt tracking), and the
indexing loop ticks at the smallest enabled per-server cadence so a short
override is re-listed on time (Manager.ResolveToolDiscoverySweepTick).
Event-driven callers keep using the full DiscoverTools sweep.
Finding 2 — a global health_check_interval edit did not reach running clients.
ApplyConfig now propagates the new global config to the upstream manager and
every managed client (Manager/Client.SetGlobalConfig), whose health loop
re-resolves the interval each cycle; health_check_interval and
tool_discovery_interval are added to hot-reload change detection. globalConfig
on the manager and managed client is now an atomic pointer (mirrors the cfg
pattern) so the swap is lock-free and race-free.
The sweep tick is computed from the manager's thread-safe per-client config
snapshots, never by iterating the shared (copy-on-write) config snapshot's
Servers slice, which raced in-place config mutation in the background loop.
Tests: per-server cadence gate, tick resolution, swept-state tracking, manager
+ client SetGlobalConfig propagation, health-interval hot-reload, and the two
new change-detection fields. Full internal suite green under -race (0 races);
both editions build.
Related #608
0 commit comments