From dd816bc2198dfec96ce4e919047afd793233f4b7 Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Tue, 17 Nov 2026 11:56:25 +0400 Subject: [PATCH] comin: name its port as the security baseline sees it, fix pending The process listening on 4243 is .comin-wrapped, so the baseline flagged it as unknown. After a restart comin reports an empty status until the next commit arrives; count the head as pending only when it differs from both the evaluated and the deployed commit. Assisted-by: Claude:opus-5-5 --- nixos/modules/comin.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/comin.nix b/nixos/modules/comin.nix index a8403c1..2a5a451 100644 --- a/nixos/modules/comin.nix +++ b/nixos/modules/comin.nix @@ -53,7 +53,7 @@ in "comin_main_signed \(if ($r.selected_commit_should_be_signed | not) or $r.selected_commit_signed then 1 else 0 end)", "# HELP comin_main_pending Head of main differs from the last evaluated commit.", "# TYPE comin_main_pending gauge", - "comin_main_pending \(if $head == .builder.generation.selected_commit_id then 0 else 1 end)" + "comin_main_pending \(if ($head // "") == "" or $head == .builder.generation.selected_commit_id or $head == .deployer.deployment.generation.selected_commit_id then 0 else 1 end)" ' > ${textfile}/comin.prom.tmp mv ${textfile}/comin.prom.tmp ${textfile}/comin.prom ''; @@ -63,5 +63,5 @@ in timerConfig.OnCalendar = "*:0/2"; }; - asxpio.security.ports = [ "tcp/4243/comin" ]; + asxpio.security.ports = [ "tcp/4243/.comin-wrapped" ]; }