Start again on removal what the mesh's own declaration stopped (hq ADR 0269)
mesh/merge-gate pass: builds mesh-host → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery superseded: a newer head of the same pull request

A unit found running and enabled that a declaration held stopped and disabled stayed stopped and
disabled when the declaration went: ADR 0118 never starts a unit on the way out. Unassigning the zfs
module would so have left the home server's pool with no scrub schedule at all, said nowhere.

The host now records what it declared for a service (Declared, beside Found). On removal, a unit found
running and declared stopped is started again, and one found enabled and declared disabled is enabled
again, each read back; the report says restored, and the plan says it first. A record from before the
field starts nothing.
This commit is contained in:
jochen
2026-10-09 01:35:27 +02:00
parent a2c2c35e85
commit 9d48b8baf9
4 changed files with 196 additions and 4 deletions
+6
View File
@@ -99,6 +99,12 @@ type Applied struct {
// when its declaration goes; one the mesh started is stopped again. Absent on a record written
// before the host kept it, and then the unit is left exactly as it is.
Found *FoundUnit `json:"found,omitempty"`
// Declared is, for a service with a state, what the mesh last held its unit to: running or stopped,
// and enabled or disabled where the declaration said. With Found, it tells a unit the mesh's own
// declaration stopped and disabled from one somebody stopped since, so removal gives back running
// and enabled only the first (novox/hq ADR 0269). Absent on a record from before the host kept it,
// and then nothing is started on the way out.
Declared *FoundUnit `json:"declared,omitempty"`
// Into is set for a file written into rather than over (novox/hq ADR 0102): the format, what
// each of the mesh's keys held before it set them, which of them were absent, and whether the