ADR 0262: one listing of every preference, and research 037 surveying the literals to convert

The operator asked for one place that lists every module's preferences and each machine's value, and
for a list of the values the catalogues hard-code that should become preferences.
This commit is contained in:
jochen
2026-10-08 17:55:04 +02:00
parent 0e5a5e2085
commit de7aca4fa6
3 changed files with 164 additions and 0 deletions
@@ -87,6 +87,13 @@ reads before replacing them ([ADR 0217](0217-no-change-to-a-machine-takes-effect
each key the module gives a default or that is set, its effective value, and its source: `default`,
the mesh, or the node. Where the mesh or the node overrides a default, the default is shown beside it.
**One listing of every preference, in the controller's `settings` verb.** Asked with `list:
"preferences"`, or with no module, `settings` lists every module that declares a preference: each key,
its default and why, and, for every machine the module is assigned to, the value there and where it
comes from (the default, the mesh, or the node). A module and a node narrow it. No module builds a
settings tool of its own; this verb is the interface for all of them, so a person or an agent finds every
preference in one place.
**A default must be read by something.** A declared key that no file, contribution or served fact asks
for is refused, because a default that reaches nothing is the same mistake as a stray setting.
@@ -139,6 +146,7 @@ rolled back. The same holds for every field a later record adds.
| A default is read by the installation check | `TestTheInstallationCheckReadsADefault`, including a setting called `description` |
| A default fills a contribution and a served fact, and never replaces a contribution's own value | `TestADefaultFillsAContributionAndAServedFactButNotALiteral` |
| A node called `default` is a node | `TestANodeCalledDefaultIsANodesLayer` |
| One listing of every preference, per machine with its source | `TestSettingsListPreferences` (the verb's arguments, a listing other than preferences refused) and `TestPreferencesSayEachMachinesValueAndItsSource`; live, `mesh-controller.settings {list: "preferences"}` lists the notifier on both machines |
| A stored manifest with an unknown key is read, and registration refuses it | `TestAStoredManifestWithAnUnknownKeyIsReadAndRegistrationRefusesIt` |
| Nothing changes where no machine sets a value | The notifier's manifest test fills the file with the defaults and finds today's lines; live, `mesh-controller.plan` for the workstation shows no change to the notifier's file after the catalogue change is sent |
@@ -154,4 +162,6 @@ rolled back. The same holds for every field a later record adds.
before replacing them
- [Design 27](../03-DESIGN/01-to-be/27-a-module-requires-the-mesh-resolves.md): the operator as a
provider
- [Research 037](../01-RESEARCH/037-the-catalogues-hard-coded-preferences/00-overview.md): the literals in
both catalogues that would become preferences
- mesh-controller `internal/catalogue/setting_defaults.go`; mesh-catalog `modules/dunst`