Repository navigation
Description
Found during the review of #1901.
resolve_security_into (crates/common/src/config/mod.rs) emits its operator warnings with eprintln! rather than tracing::warn!, on the documented grounds that no subscriber exists at config-resolve time. That rationale holds for resolve_config at startup. It does not hold for the function's second caller: runtime::reload::SecuritySection::resolve (crates/node/src/runtime/reload.rs:524), which runs on SIGHUP against a daemon whose subscriber has been up for hours.
Concrete case: an operator running log_format = "json" and shipping only the structured stream to their log backend sets security.max_tracked_sources = 0 and SIGHUPs. The warning —
warning: security.max_tracked_sources = 0: rate-limit bookkeeping map is unbounded; an attacker churning sources can grow it without limit
— goes to raw stderr and never reaches the pipeline. infallible_swap does emit a tracing::info! carrying the new value, but at info level and without the word "unbounded", so nothing alerts on it.
The other five annotated resolvers (resolve_dht_into, resolve_probe_into, resolve_network_into, validate_port_layout_into, warn_retired_env_vars_with) have no reload-path caller, so their reasons are accurate as written.
resolve_network_into has the same shape at startup only, and its warning is worth the same treatment: a stale DECDN_RELAY_URL collapsing a multi-entry network.relay_urls failover list to one is a silent redundancy loss that will read as an unexplained outage months later.
Suggested fix
The mechanism already half exists and is thrown away: crates/common/src/config/mod.rs:562 reads let _retired = warn_retired_env_vars(); — the function returns the names it warned about specifically so a caller can propagate them, and resolve_config discards the value.
Thread warnings out of the resolvers into an out-param the caller drains, then have commands::run re-emit them as tracing::warn! immediately after init_tracing, and have the reload path emit them directly. Nothing needs to become a hard error — 0 = unbounded is a documented escape hatch and an inherited orchestrator env var must not refuse boot. The problem is reachability, not severity.
The #[expect(clippy::print_stderr, ...)] on resolve_security_into carries a comment pointing here.
Activity
fix(docs,lints): correct wrong doc comments and narrow two lint escap…
chore(cargo): adopt resolver 3 and tighten the workspace lint posture (…
fix(common,node,cli): emit config notices only past every reload abor…