Hold the removal order a module may rely on, and say what a killed stop leaves (hq ADR 0263) #62

Merged
mesh-admin merged 1 commits from fix/shares-review-followups into main 2026-10-08 20:57:41 +00:00
Contributor

A follow-up to the review of mesh-catalog #136 (nfs-server and mounts, hq ADR 0263). No engine behaviour changes: a test and two contract comments.

Why

nfs-server's exports process removes its export file when it is stopped and finds its configuration gone, which is how it tells unassignment from a restart. That relies on the node-engine removing a module's resources newest record first, so the process (declared before its config) is stopped after the config file is removed. Nothing held that order as a contract.

What

  • internal/apply/removal_order_test.go:
    • TestAnUnassignedModulesProcessIsStoppedAfterTheConfigurationItReads: the nfs-server shape (process with restart-on its config, declared before the config directory and file). Asserts the record keeps the declared order (a process is not moved by afterWhatTheyRead, only a service is), that the order survives a second apply, and that on removal the config is already gone when systemctl disable --now stops the process; removals are config, config-dir, process.
    • TestAProcessRecordedAfterItsConfigurationIsStoppedFirst: what the contract does not promise. A process first recorded after its config (added in a later module version, or whose first apply failed) is appended and stopped first.
  • A contract comment on store.State.Orphans naming both, and nfs-server as the module relying on it.
  • A comment at removeProcess: --now waits for the stop; the host's unit sets no stop timeout or kill mode, so systemd's defaults hold (SIGTERM, then SIGKILL to the group after 90 s by default). A process killed there cleans nothing up, and an unassigned module never starts again to do it later; so a process that cleans up on stop does that first and keeps it short.

Checks run

go vet ./..., go test -race ./..., sh merge-check.sh: pass.

Not to be merged before review.

A follow-up to the review of mesh-catalog #136 (nfs-server and mounts, hq ADR 0263). No engine behaviour changes: a test and two contract comments. ## Why nfs-server's `exports` process removes its export file when it is stopped and finds its configuration gone, which is how it tells unassignment from a restart. That relies on the node-engine removing a module's resources newest record first, so the process (declared before its config) is stopped after the config file is removed. Nothing held that order as a contract. ## What - `internal/apply/removal_order_test.go`: - `TestAnUnassignedModulesProcessIsStoppedAfterTheConfigurationItReads`: the nfs-server shape (process with `restart-on` its config, declared before the config directory and file). Asserts the record keeps the declared order (a process is not moved by `afterWhatTheyRead`, only a service is), that the order survives a second apply, and that on removal the config is already gone when `systemctl disable --now` stops the process; removals are config, config-dir, process. - `TestAProcessRecordedAfterItsConfigurationIsStoppedFirst`: what the contract does not promise. A process first recorded after its config (added in a later module version, or whose first apply failed) is appended and stopped first. - A contract comment on `store.State.Orphans` naming both, and nfs-server as the module relying on it. - A comment at `removeProcess`: `--now` waits for the stop; the host's unit sets no stop timeout or kill mode, so systemd's defaults hold (SIGTERM, then SIGKILL to the group after 90 s by default). A process killed there cleans nothing up, and an unassigned module never starts again to do it later; so a process that cleans up on stop does that first and keeps it short. ## Checks run `go vet ./...`, `go test -race ./...`, `sh merge-check.sh`: pass. Not to be merged before review.
mesh-admin added 1 commit 2026-10-08 19:16:14 +00:00
Hold the removal order a module may rely on, and say what a killed stop leaves (hq ADR 0263)
mesh/delivery delivered
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-group group fix/shares-review-followups merged: every member is merged
fedd9dcf35
Author
Contributor

Delivery novox/mesh-host@fedd9dcf350e — delivered since 2026-10-08T21:01:39Z

Delivery plan — builds mesh-host → ace, g14, novox, shanks; no bus step

  • tier 0: mesh-host
  • ace: receives mesh-host
  • g14: receives mesh-host
  • novox: receives mesh-host
  • shanks: receives mesh-host

Group fix/shares-review-followups, in order: novox/hq@4dd52cace6 → novox/mesh-controller@5d7d8ee2d6 → novox/mesh-catalog@68b158d523 → novox/mesh-host@fedd9dcf35

Machines

  • mesh-host on ace: passed — healthy 3 times over 2m44s
  • mesh-host on the rest running it: sent

Transitions

  • 2026-10-08 19:16 (new) → proposed (announced): novox/mesh-host#62's head announced
  • 2026-10-08 19:20 proposed → checked (checked): the verdict names this commit
  • 2026-10-08 19:20 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-08 20:58 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
  • 2026-10-08 20:58 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path
  • 2026-10-08 21:01 delivering → delivered (done): its walk is done: every machine of its deploy plan passed, or was left as its policy says

The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-host@fedd9dcf350e` — **delivered** since 2026-10-08T21:01:39Z **Delivery plan** — builds mesh-host → ace, g14, novox, shanks; no bus step - tier 0: mesh-host - ace: receives mesh-host - g14: receives mesh-host - novox: receives mesh-host - shanks: receives mesh-host **Group** `fix/shares-review-followups`, in order: novox/hq@4dd52cace6fb → novox/mesh-controller@5d7d8ee2d64c → novox/mesh-catalog@68b158d5238f → novox/mesh-host@fedd9dcf350e - novox/mesh-controller@5d7d8ee2d64c before novox/mesh-catalog@68b158d5238f: built by - novox/mesh-controller@5d7d8ee2d64c before novox/mesh-host@fedd9dcf350e: built by, over engine before controller - composed together: pass — every machine composes with the change as it did without (4 of 4 compose) **Machines** - mesh-host on ace: passed — healthy 3 times over 2m44s - mesh-host on the rest running it: sent **Transitions** - 2026-10-08 19:16 (new) → proposed (announced): novox/mesh-host#62's head announced - 2026-10-08 19:20 proposed → checked (checked): the verdict names this commit - 2026-10-08 19:20 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-08 20:58 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move - 2026-10-08 20:58 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path - 2026-10-08 21:01 delivering → delivered (done): its walk is done: every machine of its deploy plan passed, or was left as its policy says The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
Author
Contributor

Merge check at fedd9dcf

  • mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: mesh-host)
  • mesh/repo-check: PASS — its merge-check.sh passed

Delivery plan — builds mesh-host → ace, g14, novox, shanks; no bus step

  • tier 0: mesh-host
  • ace: receives mesh-host
  • g14: receives mesh-host
  • novox: receives mesh-host
  • shanks: receives mesh-host

Run by the build seat on g14 as build-1791486988312659539 (builds --log build-1791486988312659539).

--- the gate: mesh-host
mesh-host: ok
long-running resources without health: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 0 module(s) changed against 4 machine(s), as the snapshot of 2026-10-08T19:09:42Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-08T19:09:42Z

machines:
  - a machine (f35): composes
  - holds mesh-dns-resolver (idt): composes
  - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
  - a machine (yvbpsm): composes

a merge would rebuild 1 module(s) in 1 tier(s): mesh-host
--- its merge-check.sh (go toolchain)
ok  	github.com/novox/mesh-host/cmd/mesh-bootstrap	1.013s
ok  	github.com/novox/mesh-host/cmd/mesh-host	5.281s
ok  	github.com/novox/mesh-host/examples	1.021s
ok  	github.com/novox/mesh-host/internal/accounts	1.015s
ok  	github.com/novox/mesh-host/internal/apply	2.084s
ok  	github.com/novox/mesh-host/internal/bootstrap	1.311s
ok  	github.com/novox/mesh-host/internal/bundle	1.017s
ok  	github.com/novox/mesh-host/internal/declaration	1.046s
ok  	github.com/novox/mesh-host/internal/firewall	1.861s
ok  	github.com/novox/mesh-host/internal/identity	1.046s
ok  	github.com/novox/mesh-host/internal/image	1.016s
ok  	github.com/novox/mesh-host/internal/inventory	1.027s
ok  	github.com/novox/mesh-host/internal/link	10.373s
ok  	github.com/novox/mesh-host/internal/liveness	2.043s
ok  	github.com/novox/mesh-host/internal/network	1.036s
ok  	github.com/novox/mesh-host/internal/outward	1.027s
ok  	github.com/novox/mesh-host/internal/profile	1.520s
ok  	github.com/novox/mesh-host/internal/reachable	1.025s
ok  	github.com/novox/mesh-host/internal/store	1.086s
ok  	github.com/novox/mesh-host/internal/system	1.016s
ok  	github.com/novox/mesh-host/internal/tunnel	1.017s
ok  	github.com/novox/mesh-host/internal/units	1.010s
ok  	github.com/novox/mesh-host/internal/upgrade	1.034s
ok  	github.com/novox/mesh-host/internal/witness	1.429s
ok  	github.com/novox/mesh-host/packaging	1.013s
ok  	github.com/novox/mesh-host/validate	1.011s
**Merge check** at `fedd9dcf` - `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: mesh-host) - `mesh/repo-check`: **PASS** — its merge-check.sh passed **Delivery plan** — builds mesh-host → ace, g14, novox, shanks; no bus step - tier 0: mesh-host - ace: receives mesh-host - g14: receives mesh-host - novox: receives mesh-host - shanks: receives mesh-host Run by the build seat on g14 as `build-1791486988312659539` (`builds --log build-1791486988312659539`). ``` --- the gate: mesh-host mesh-host: ok long-running resources without health: 0 1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here judging 0 module(s) changed against 4 machine(s), as the snapshot of 2026-10-08T19:09:42Z says they run composing every machine as the mesh is the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued composing every machine with the change the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose) judged by controller development build against the facts of 2026-10-08T19:09:42Z machines: - a machine (f35): composes - holds mesh-dns-resolver (idt): composes - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes - a machine (yvbpsm): composes a merge would rebuild 1 module(s) in 1 tier(s): mesh-host --- its merge-check.sh (go toolchain) ok github.com/novox/mesh-host/cmd/mesh-bootstrap 1.013s ok github.com/novox/mesh-host/cmd/mesh-host 5.281s ok github.com/novox/mesh-host/examples 1.021s ok github.com/novox/mesh-host/internal/accounts 1.015s ok github.com/novox/mesh-host/internal/apply 2.084s ok github.com/novox/mesh-host/internal/bootstrap 1.311s ok github.com/novox/mesh-host/internal/bundle 1.017s ok github.com/novox/mesh-host/internal/declaration 1.046s ok github.com/novox/mesh-host/internal/firewall 1.861s ok github.com/novox/mesh-host/internal/identity 1.046s ok github.com/novox/mesh-host/internal/image 1.016s ok github.com/novox/mesh-host/internal/inventory 1.027s ok github.com/novox/mesh-host/internal/link 10.373s ok github.com/novox/mesh-host/internal/liveness 2.043s ok github.com/novox/mesh-host/internal/network 1.036s ok github.com/novox/mesh-host/internal/outward 1.027s ok github.com/novox/mesh-host/internal/profile 1.520s ok github.com/novox/mesh-host/internal/reachable 1.025s ok github.com/novox/mesh-host/internal/store 1.086s ok github.com/novox/mesh-host/internal/system 1.016s ok github.com/novox/mesh-host/internal/tunnel 1.017s ok github.com/novox/mesh-host/internal/units 1.010s ok github.com/novox/mesh-host/internal/upgrade 1.034s ok github.com/novox/mesh-host/internal/witness 1.429s ok github.com/novox/mesh-host/packaging 1.013s ok github.com/novox/mesh-host/validate 1.011s ```
mesh-admin merged commit ee20388239 into main 2026-10-08 20:57:41 +00:00
mesh-admin deleted branch fix/shares-review-followups 2026-10-08 20:57:41 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-host#62