refactor(registry): simplify stable uid validation message

This commit is contained in:
2026-08-25 21:26:42 -04:00
parent 498540967b
commit ca3a6ba62a

View File

@@ -1,7 +1,6 @@
{ lib, ... }:
let
inherit (lib)
concatStringsSep
foldl'
groupBy
unique
@@ -25,8 +24,6 @@ let
acc
) [ ] (builtins.attrNames byUid);
renderUidConflict = conflict:
"${toString conflict.uid} is assigned to ${concatStringsSep ", " conflict.serviceNames}";
in
{
# Next stable UID: 20003
@@ -41,9 +38,7 @@ in
[
{
assertion = uidConflicts == [ ];
message = ''
Duplicate stable UID allocation(s): ${concatStringsSep "\n" (map renderUidConflict uidConflicts)}
'';
message = "Stable UID allocations must be unique.";
}
];
}