From 8178b0b55ce9c1e5a06497fd6be726051efe18b9 Mon Sep 17 00:00:00 2001 From: atlas Date: Mon, 24 Aug 2026 12:36:41 +0200 Subject: [PATCH] refactor(swarm-authelia): name the collector option in full at the gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are two otel options one word apart: swarm.otel is the swarm's collector, hyperhive.otel is the per-hive tier that ships upstream and never reads scrapeTargets. The gate went through a let binding declared 800 lines from its use, so which one it referred to was not visible where it mattered — mara had to ask. Gating the wrong one is not a build error. It is a target that is either always declared or never declared, and both look like working config. --- nix/host-modules/swarm-authelia.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nix/host-modules/swarm-authelia.nix b/nix/host-modules/swarm-authelia.nix index b3c9a027..7ed2e398 100644 --- a/nix/host-modules/swarm-authelia.nix +++ b/nix/host-modules/swarm-authelia.nix @@ -43,7 +43,6 @@ let swarmDomain = hyperhiveCfg.swarm.domain; uiCfg = hyperhiveCfg.swarm.ui; forgeCfg = hyperhiveCfg.swarm.forge; - otelCfg = hyperhiveCfg.swarm.otel; # Group an account must hold to reach operator-only surfaces. Named # here because this module writes the rule that enforces it and @@ -851,7 +850,13 @@ in # endpoint published under a name with a cert and an audience, which is a # different piece of work. This only stops the config asserting a # collection that is not happening. - services.hyperhive.swarm.otel.scrapeTargets = lib.mkIf otelCfg.enable { + # ⚠️ `swarm.otel` and not `hyperhive.otel` — two different collectors one + # word apart. This one is the swarm's; `hyperhive.otel` is the per-hive + # tier that ships telemetry upstream and never reads `scrapeTargets`. + # Written out in full rather than through a `let` binding so the gate and + # the option it gates are visibly the same path: gating the wrong one is + # not a build error, it is a target that is always declared or never is. + services.hyperhive.swarm.otel.scrapeTargets = lib.mkIf config.services.hyperhive.swarm.otel.enable { authelia = "127.0.0.1:${toString cfg.metricsPort}"; };