Watch
0
0
Fork
You've already forked hyperhive
0

review classifier: a nix option sits in the tree that fits it

A negative rule for options added or moved under services.hyperhive: swarm.*
holds swarm-wide facts that are the same on every host, deploy.* holds this
host's own deployment decisions grouped under the deployed component, and a
per-host setting that lands under swarm.* or under another module's namespace
while configuring a component deploy.* names is in the wrong tree. Read-only
outputs, internal options and a rename into the right tree are exempt. The
rules-file test lists the new name.
This commit is contained in:
argus 2026-11-15 01:41:50 +01:00 • committed by mara
commit c9c2e75091
2 changed files with 22 additions and 0 deletions

View file

@ -111,3 +111,24 @@ classifications:
docs/5-project/ and the options reference.
polarity: negative
threshold: 70
- name: option-in-the-wrong-namespace
description: >-
A nix option the diff adds or moves under `services.hyperhive.` sits in
the wrong tree for what it is. `swarm.*` holds swarm-wide facts that
are the same on every host: the swarm's name and domain, its hives, and
where each service lives. `deploy.*` holds this host's own deployment
decisions, which differ from host to host: whether a component runs
here, and its ports, modes, schedules, packages and file paths, grouped
under the component that is deployed, as in
`deploy.hive-controller.egress.forward`. A setting an operator chooses
per host that lands under `swarm.*`, or under another module's
namespace such as `network.*` while it configures a component that
`deploy.*` already names, such as a service or the hive controller, is
in the wrong tree. So is a per-agent setting placed outside the agent
options. A read-only output or derived value (a rendered ruleset, a
script path), an option declared `internal = true` or `visible =
false`, and a rename that moves an option into the right tree are not
wrong. A diff that adds or moves no nix option makes the question not
applicable.
polarity: negative
threshold: 70

View file

@ -1419,6 +1419,7 @@ classifications:
"one-purpose",
"message-claims-match-diff",
"no-code-units-in-operator-docs",
"option-in-the-wrong-namespace",
]
);
}