Remove the service machine type #15

Merged
vnprc merged 1 commit from agent/drop-service-type into master 2026-09-02 04:45:18 +01:00
Member

Removes the service machine type. It has no users and will not get one: a rented host has none of this registry's facts, so it is a nixosConfigurations entry composed from the exported modules rather than a machine described here. allod/archetypes#60 carries the full reasoning and was closed unmerged; this is the data-side half of that closure.

nix flake check passes. scripts/vm-specs.json is untouched — no machine ever used the type, so nothing generated changes.

What is removed

The service branch of the schema and everything that existed only to serve it: servicePlatform, serviceGuestFields, the serviceForeignPlatform and serviceGuestSizing diagnostics, the serviceShape assertions, the serviceFixture, the service-machine-mutations check, and the two service fixtures inside runtime-fact-mutations. runtimeFreeTypes goes back to [ "hypervisor" ].

The lib.runtimeFreeTypes and lib.isGuestMachine exports go with it. They were added so archetypes could stop keeping its own copy of the guest/non-guest split; with the service type gone that split is "is it a hypervisor", which archetypes has always answered locally, and an exported function with no consumers is the dead weight principle 8 warns about.

What is deliberately kept

The shape diagnostics that arrived in the same merge stay: missingType, nonStringType, missingPlatform and invalidPlatform, their assertions in mkVmSpecs, their fixtures, and the derived diagnosticFields.

They are not service-specific and they closed a real hole. Platform validation used to hang off lib.supportedPlatforms, which the machines/lib.machines surface never forces — so a machine with no platform reached consumers unvalidated, and archetypes reads exactly that surface. type was also read by the classifier before being checked, so a machine without one aborted with a raw attribute 'type' missing that builtins.tryEval cannot catch, which meant no fixture could pin it.

The builtins.seq chain in mkVmSpecs stays for the same reason: it is what makes the stated order real rather than a property of which binding happens to be forced first.

runtimeFreeTypes remains a list with one member rather than collapsing to a string. The diagnostic message reads from it, so a second member later needs no other edit, and the comment records why the last attempt at one was reverted.

Risk

R1. Removing a schema branch no machine uses, plus two exports with no consumers. Every remaining rule keeps its fixture, and the mutation check still proves each one fails on sabotaged input. Rollback is a straight revert.

Refs allod/archetypes#60, allod/inventory#13

Removes the `service` machine type. It has no users and will not get one: a rented host has none of this registry's facts, so it is a `nixosConfigurations` entry composed from the exported modules rather than a machine described here. `allod/archetypes#60` carries the full reasoning and was closed unmerged; this is the data-side half of that closure. `nix flake check` passes. `scripts/vm-specs.json` is untouched — no machine ever used the type, so nothing generated changes. ## What is removed The `service` branch of the schema and everything that existed only to serve it: `servicePlatform`, `serviceGuestFields`, the `serviceForeignPlatform` and `serviceGuestSizing` diagnostics, the `serviceShape` assertions, the `serviceFixture`, the `service-machine-mutations` check, and the two service fixtures inside `runtime-fact-mutations`. `runtimeFreeTypes` goes back to `[ "hypervisor" ]`. The `lib.runtimeFreeTypes` and `lib.isGuestMachine` exports go with it. They were added so `archetypes` could stop keeping its own copy of the guest/non-guest split; with the service type gone that split is "is it a hypervisor", which `archetypes` has always answered locally, and an exported function with no consumers is the dead weight principle 8 warns about. ## What is deliberately kept The shape diagnostics that arrived in the same merge stay: `missingType`, `nonStringType`, `missingPlatform` and `invalidPlatform`, their assertions in `mkVmSpecs`, their fixtures, and the derived `diagnosticFields`. They are not service-specific and they closed a real hole. Platform validation used to hang off `lib.supportedPlatforms`, which the `machines`/`lib.machines` surface never forces — so a machine with no `platform` reached consumers unvalidated, and `archetypes` reads exactly that surface. `type` was also read by the classifier before being checked, so a machine without one aborted with a raw `attribute 'type' missing` that `builtins.tryEval` cannot catch, which meant no fixture could pin it. The `builtins.seq` chain in `mkVmSpecs` stays for the same reason: it is what makes the stated order real rather than a property of which binding happens to be forced first. `runtimeFreeTypes` remains a list with one member rather than collapsing to a string. The diagnostic message reads from it, so a second member later needs no other edit, and the comment records why the last attempt at one was reverted. ## Risk R1. Removing a schema branch no machine uses, plus two exports with no consumers. Every remaining rule keeps its fixture, and the mutation check still proves each one fails on sabotaged input. Rollback is a straight revert. Refs allod/archetypes#60, allod/inventory#13
vnprc approved these changes 2026-09-02 04:45:03 +01:00
vnprc merged commit b58b8f064c into master 2026-09-02 04:45:18 +01:00
vnprc deleted branch agent/drop-service-type 2026-09-02 04:45:18 +01:00
Sign in to join this conversation.
No description provided.