module-eval: drop 18 redundant cases and merge assertion-only hosts
Refs #5379
This commit is contained in:
parent
e9f313e75d
commit
2ff253e520
15 changed files with 122 additions and 359 deletions
|
|
@ -6,7 +6,6 @@
|
|||
lib,
|
||||
self,
|
||||
nixosSystem,
|
||||
shared,
|
||||
}:
|
||||
let
|
||||
inherit
|
||||
|
|
@ -24,16 +23,9 @@ let
|
|||
|
||||
# `claudePlugins`'s additive-merge shape: a plain per-agent
|
||||
# definition must ADD to the module's own base-set definition rather than
|
||||
# replacing it, while `lib.mkForce` must still replace the whole list
|
||||
# outright — the two arms below plus the unset default (read directly off
|
||||
# `bare`-shaped `agent { }`, no fixture of its own needed) are the three
|
||||
# cases that shape has to hold.
|
||||
agentPluginsDefault = shared.agentBare;
|
||||
|
||||
# replacing it.
|
||||
agentPluginsAdded = agent { claudePlugins = [ "foo@bar" ]; };
|
||||
|
||||
agentPluginsForced = agent { claudePlugins = lib.mkForce [ "foo@bar" ]; };
|
||||
|
||||
# The de-dup arm: an agent that names a base-set entry explicitly must not
|
||||
# get it installed twice.
|
||||
agentPluginsDuplicate = agent { claudePlugins = [ "base@hyperhive" ]; };
|
||||
|
|
@ -41,17 +33,7 @@ let
|
|||
agentPlugins = machine: machine.services.hyperhive.agent.claudePlugins;
|
||||
cases = [
|
||||
{
|
||||
# Case 1 of the additive-merge shape: an agent that declares
|
||||
# nothing gets exactly the module's base set, no more and no less.
|
||||
name = "an agent with no claudePlugins definition gets exactly the base set";
|
||||
ok =
|
||||
agentPlugins agentPluginsDefault == [
|
||||
"skill-creator@claude-plugins-official"
|
||||
"base@hyperhive"
|
||||
];
|
||||
}
|
||||
{
|
||||
# Case 2: a plain per-agent definition ADDS to the base set (list-typed
|
||||
# A plain per-agent definition ADDS to the base set (list-typed
|
||||
# options at equal priority concatenate) rather than replacing it —
|
||||
# the property the operator ruling asked for instead of `mkDefault`.
|
||||
# Sorted before comparing: concatenation order between two same-
|
||||
|
|
@ -65,12 +47,6 @@ let
|
|||
"skill-creator@claude-plugins-official"
|
||||
];
|
||||
}
|
||||
{
|
||||
# Case 3: `lib.mkForce` is still the escape hatch — an operator who
|
||||
# wants the base set gone, not extended, can still say so outright.
|
||||
name = "an agent's mkForce claudePlugins replaces the base set outright";
|
||||
ok = agentPlugins agentPluginsForced == [ "foo@bar" ];
|
||||
}
|
||||
{
|
||||
# De-dup arm: an agent that names a base-set entry itself must not get
|
||||
# it installed twice — `lib.unique` at the JSON-render site, not the
|
||||
|
|
|
|||
Loading…
Reference in a new issue