Give a service's held state its own field and key, so main compiles again #67

Merged
mesh-admin merged 1 commits from fix/store-declared-redeclared into main 2026-10-09 01:09:40 +00:00
Contributor

main does not compile since #66 merged (690966d): internal/store/store.go:145:2: Declared redeclared.

#64/#65 (issue 339) and #66 (ADR 0269) each added Applied.Declared to the store record, and both used the JSON key declared:

  • #64/#65: a directory used as found, the owner and mode that were declared (string). This was on main at d28ca95, which is the build running on the nodes, so node stores may already hold records with "declared": "<owner>, mode <mode>".
  • #66: a service's held state (*FoundUnit). #66 never deployed, so no node holds this record.

The fix keeps the directory's field as Declared, key declared, unchanged. The service's field becomes DeclaredUnit, key declared_unit. Its readers and writers in internal/apply/apply.go (startUnitBack, the restore check, the replaced-unit give-back, the record write) and internal/apply/plan.go (the restore preview) are updated.

A new test, internal/store/declared_keys_test.go, pins both keys: it checks that a record holding both reads back and writes out under its own key.

Checked locally: gofmt is clean, go vet ./... passes, go test -race ./... passes and merge-check.sh exits 0.

main does not compile since #66 merged (690966d): `internal/store/store.go:145:2: Declared redeclared`. #64/#65 (issue 339) and #66 (ADR 0269) each added `Applied.Declared` to the store record, and both used the JSON key `declared`: - #64/#65: a directory used as found, the owner and mode that were declared (string). This was on main at d28ca95, which is the build running on the nodes, so node stores may already hold records with `"declared": "<owner>, mode <mode>"`. - #66: a service's held state (`*FoundUnit`). #66 never deployed, so no node holds this record. The fix keeps the directory's field as `Declared`, key `declared`, unchanged. The service's field becomes `DeclaredUnit`, key `declared_unit`. Its readers and writers in `internal/apply/apply.go` (startUnitBack, the restore check, the replaced-unit give-back, the record write) and `internal/apply/plan.go` (the restore preview) are updated. A new test, `internal/store/declared_keys_test.go`, pins both keys: it checks that a record holding both reads back and writes out under its own key. Checked locally: gofmt is clean, `go vet ./...` passes, `go test -race ./...` passes and merge-check.sh exits 0.
mesh-admin added 1 commit 2026-10-09 01:04:12 +00:00
Give a service's held state its own field and key, so main compiles again
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 delivered
c2bae14994
#64/#65 and #66 each added Applied.Declared: a directory's declared owner and
mode (string) and a service's held state (*FoundUnit), both under the JSON key
"declared". The directory's is already on nodes, written by d28ca95, so it
keeps the name and key; the service's becomes DeclaredUnit, "declared_unit".
#66 never deployed, so no node holds a record under the new key.
Author
Contributor

Delivery novox/mesh-host@c2bae1499435 — delivered since 2026-10-09T01:13:24Z

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

Machines

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

Transitions

  • 2026-10-09 01:04 (new) → proposed (announced): novox/mesh-host#67's head announced
  • 2026-10-09 01:06 proposed → checked (checked): the verdict names this commit
  • 2026-10-09 01:06 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-09 01:10 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
  • 2026-10-09 01:10 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-09 01:13 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@c2bae1499435` — **delivered** since 2026-10-09T01:13:24Z **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 **Machines** - mesh-host on ace: passed — healthy 3 times over 2m32s - mesh-host on the rest running it: sent **Transitions** - 2026-10-09 01:04 (new) → proposed (announced): novox/mesh-host#67's head announced - 2026-10-09 01:06 proposed → checked (checked): the verdict names this commit - 2026-10-09 01:06 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-09 01:10 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move - 2026-10-09 01:10 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-09 01:13 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 c2bae149

  • 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-1791507871320240181 (builds --log build-1791507871320240181).

--- the gate: mesh-host
mesh-host: ok
long-running resources without health: 0
files asking for a setting without saying whether it is trusted: 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-09T01:03:55Z 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-09T01:03:55Z

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.016s
ok  	github.com/novox/mesh-host/cmd/mesh-host	5.312s
ok  	github.com/novox/mesh-host/examples	1.022s
ok  	github.com/novox/mesh-host/internal/accounts	1.020s
ok  	github.com/novox/mesh-host/internal/apply	2.310s
ok  	github.com/novox/mesh-host/internal/bootstrap	1.342s
ok  	github.com/novox/mesh-host/internal/bundle	1.010s
ok  	github.com/novox/mesh-host/internal/declaration	1.045s
ok  	github.com/novox/mesh-host/internal/firewall	1.676s
ok  	github.com/novox/mesh-host/internal/identity	1.048s
ok  	github.com/novox/mesh-host/internal/image	1.012s
ok  	github.com/novox/mesh-host/internal/inventory	1.037s
ok  	github.com/novox/mesh-host/internal/link	10.371s
ok  	github.com/novox/mesh-host/internal/liveness	2.047s
ok  	github.com/novox/mesh-host/internal/network	1.038s
ok  	github.com/novox/mesh-host/internal/outward	1.027s
ok  	github.com/novox/mesh-host/internal/profile	1.536s
ok  	github.com/novox/mesh-host/internal/reachable	1.032s
ok  	github.com/novox/mesh-host/internal/store	1.090s
ok  	github.com/novox/mesh-host/internal/system	1.011s
ok  	github.com/novox/mesh-host/internal/tunnel	1.011s
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	2.393s
ok  	github.com/novox/mesh-host/packaging	1.011s
ok  	github.com/novox/mesh-host/validate	1.006s
**Merge check** at `c2bae149` - `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-1791507871320240181` (`builds --log build-1791507871320240181`). ``` --- the gate: mesh-host mesh-host: ok long-running resources without health: 0 files asking for a setting without saying whether it is trusted: 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-09T01:03:55Z 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-09T01:03:55Z 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.016s ok github.com/novox/mesh-host/cmd/mesh-host 5.312s ok github.com/novox/mesh-host/examples 1.022s ok github.com/novox/mesh-host/internal/accounts 1.020s ok github.com/novox/mesh-host/internal/apply 2.310s ok github.com/novox/mesh-host/internal/bootstrap 1.342s ok github.com/novox/mesh-host/internal/bundle 1.010s ok github.com/novox/mesh-host/internal/declaration 1.045s ok github.com/novox/mesh-host/internal/firewall 1.676s ok github.com/novox/mesh-host/internal/identity 1.048s ok github.com/novox/mesh-host/internal/image 1.012s ok github.com/novox/mesh-host/internal/inventory 1.037s ok github.com/novox/mesh-host/internal/link 10.371s ok github.com/novox/mesh-host/internal/liveness 2.047s ok github.com/novox/mesh-host/internal/network 1.038s ok github.com/novox/mesh-host/internal/outward 1.027s ok github.com/novox/mesh-host/internal/profile 1.536s ok github.com/novox/mesh-host/internal/reachable 1.032s ok github.com/novox/mesh-host/internal/store 1.090s ok github.com/novox/mesh-host/internal/system 1.011s ok github.com/novox/mesh-host/internal/tunnel 1.011s 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 2.393s ok github.com/novox/mesh-host/packaging 1.011s ok github.com/novox/mesh-host/validate 1.006s ```
mesh-admin merged commit a390bce5f2 into main 2026-10-09 01:09:40 +00:00
mesh-admin deleted branch fix/store-declared-redeclared 2026-10-09 01:09:40 +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#67