Refuse a declaration composed from an older assignment generation than the machine applied (issue 234) #82

Merged
mesh-admin merged 1 commits from fix/234-refuse-a-declaration-from-an-older-generation into main 2026-10-11 16:00:01 +00:00
Contributor

Fixes the node-engine half of novox/hq issue 234 (critical): a later declaration left out four assigned modules, and a machine applied it. Decision: issue 234 note of 2026-10-11 (question 3).

Independent, and first. This needs nothing from the controller: a declaration without a generation is applied exactly as today, so it is safe alone with the controller on main. The controller's half (novox/mesh-controller, branch fix/234-a-declaration-says-the-generation-it-came-from) pins this branch's head, because its validator is this repository's parser and must read the new keys before the controller sends them; that PR says after: novox/mesh-host.

What changes

  • A declaration may carry generation (the assignment generation it was composed from) and put_back (a gate's put-back). Both optional; below zero is refused; a carried bundle may not say put-back.
  • The state keeps generation: the highest generation applied, raised by every apply and never lowered (a put-back of an older generation leaves it).
  • A delivery from an older generation than applied is refused whole before the machine is read, unless it is a put-back. The report names older_generation: {generation, applied} with the refused declaration's digest and order, so the controller names the sender from its record of sends. The kept declaration is not replaced, so the reconcile goes on holding the machine to the last good one. mesh-host apply holds a file to the same rule.
  • Every ordered report says reads_generation: true; the controller sends the keys only to an engine that said so (an older engine refuses unknown keys whole).

Compatibility

  • Older controller with this engine: no generation is sent, nothing is refused for one.
  • This controller-to-be with an older engine: the engine never says reads_generation, so it is sent no new key.
  • Equal generation is not older; a machine that applied none holds nothing against a declaration.

Tests (written first; failed on main)

cmd/mesh-host/generation_test.go: a newer sequence from an older generation is refused and nothing is undeclared (file and state entry stay, kept declaration unchanged); a put-back from an older generation is not refused; a declaration without a generation is not refused for one. On main all three failed because main refuses the generation key as an unknown field, not for its generation. generation_floor_test.go (applies on an Arch machine, skips elsewhere): a put-back does not lower the generation applied, and a later stale send is still refused. internal/link: every report says reads_generation (failed on main: the key is absent). internal/declaration: parse, below zero, bundle put-back.

gofmt, go vet ./..., go test ./... pass locally.

Touches no file of #81.

Fixes the node-engine half of novox/hq issue 234 (critical): a later declaration left out four assigned modules, and a machine applied it. Decision: issue 234 note of 2026-10-11 (question 3). **Independent, and first.** This needs nothing from the controller: a declaration without a generation is applied exactly as today, so it is safe alone with the controller on main. The controller's half (novox/mesh-controller, branch `fix/234-a-declaration-says-the-generation-it-came-from`) pins this branch's head, because its validator is this repository's parser and must read the new keys before the controller sends them; that PR says `after: novox/mesh-host`. ## What changes - A declaration may carry `generation` (the assignment generation it was composed from) and `put_back` (a gate's put-back). Both optional; below zero is refused; a carried bundle may not say put-back. - The state keeps `generation`: the highest generation applied, raised by every apply and never lowered (a put-back of an older generation leaves it). - A delivery from an older generation than applied is refused whole before the machine is read, unless it is a put-back. The report names `older_generation: {generation, applied}` with the refused declaration's digest and order, so the controller names the sender from its record of sends. The kept declaration is not replaced, so the reconcile goes on holding the machine to the last good one. `mesh-host apply` holds a file to the same rule. - Every ordered report says `reads_generation: true`; the controller sends the keys only to an engine that said so (an older engine refuses unknown keys whole). ## Compatibility - Older controller with this engine: no generation is sent, nothing is refused for one. - This controller-to-be with an older engine: the engine never says `reads_generation`, so it is sent no new key. - Equal generation is not older; a machine that applied none holds nothing against a declaration. ## Tests (written first; failed on main) `cmd/mesh-host/generation_test.go`: a newer sequence from an older generation is refused and nothing is undeclared (file and state entry stay, kept declaration unchanged); a put-back from an older generation is not refused; a declaration without a generation is not refused for one. On main all three failed because main refuses the `generation` key as an unknown field, not for its generation. `generation_floor_test.go` (applies on an Arch machine, skips elsewhere): a put-back does not lower the generation applied, and a later stale send is still refused. `internal/link`: every report says `reads_generation` (failed on main: the key is absent). `internal/declaration`: parse, below zero, bundle put-back. `gofmt`, `go vet ./...`, `go test ./...` pass locally. Touches no file of #81.
mesh-admin added 1 commit 2026-10-11 09:30:33 +00:00
Refuse a declaration composed from an older assignment generation than the machine applied (hq issue 234)
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
20d5af9b2d
A newer sequence carrying an older view of the assignments undeclared four
assigned modules on 2026-10-04; the sequence cannot tell it, the generation
can. The engine keeps the highest generation it applied, refuses an older one
before reading the machine unless the declaration is a gate's put-back, and
says the refusal in its report so the controller can name the sender. A
declaration without a generation is applied as before, and every report says
it reads one, so the controller sends it only to engines that do.
Author
Contributor

Delivery novox/mesh-host@20d5af9b2d5f — delivered since 2026-10-11T16:05:28Z

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 2m42s
  • mesh-host on the rest running it: sent

Transitions

  • 2026-10-11 09:31 (new) → proposed (announced): novox/mesh-host#82's head announced
  • 2026-10-11 09:33 proposed → checked (checked): the verdict names this commit
  • 2026-10-11 09:33 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-11 16:01 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
  • 2026-10-11 16:01 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 — not a failed walk that carried a later commit for it, after which it waits for a walk of its own commit
  • 2026-10-11 16:05 delivering → delivered (done): its walk is done, carrying its own commit: 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@20d5af9b2d5f` — **delivered** since 2026-10-11T16:05:28Z **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 2m42s - mesh-host on the rest running it: sent **Transitions** - 2026-10-11 09:31 (new) → proposed (announced): novox/mesh-host#82's head announced - 2026-10-11 09:33 proposed → checked (checked): the verdict names this commit - 2026-10-11 09:33 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-11 16:01 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move - 2026-10-11 16:01 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 — not a failed walk that carried a later commit for it, after which it waits for a walk of its own commit - 2026-10-11 16:05 delivering → delivered (done): its walk is done, carrying its own commit: 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 20d5af9b

  • 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
  • read by no module's build: cmd/mesh-host/generation_floor_test.go, cmd/mesh-host/generation_test.go, internal/declaration/order_test.go, internal/link/queue_test.go

Run by the build seat on shanks as build-1791711065627049972 (builds --log build-1791711065627049972).

--- 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-11T09:30:02Z 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-11T09:30:02Z

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

notes:
  - cmd/mesh-host/generation_floor_test.go, cmd/mesh-host/generation_test.go, internal/declaration/order_test.go and internal/link/queue_test.go read by no module's build, and rebuild nothing (issue 280)
--- its merge-check.sh (go toolchain)
ok  	github.com/novox/mesh-host/cmd/mesh-bootstrap	1.015s
ok  	github.com/novox/mesh-host/cmd/mesh-host	5.602s
ok  	github.com/novox/mesh-host/examples	1.021s
ok  	github.com/novox/mesh-host/internal/accounts	1.536s
ok  	github.com/novox/mesh-host/internal/apply	4.804s
ok  	github.com/novox/mesh-host/internal/bootstrap	1.687s
ok  	github.com/novox/mesh-host/internal/bundle	1.055s
ok  	github.com/novox/mesh-host/internal/declaration	1.092s
ok  	github.com/novox/mesh-host/internal/firewall	1.885s
ok  	github.com/novox/mesh-host/internal/identity	1.185s
ok  	github.com/novox/mesh-host/internal/image	1.044s
ok  	github.com/novox/mesh-host/internal/inventory	1.054s
ok  	github.com/novox/mesh-host/internal/link	10.485s
ok  	github.com/novox/mesh-host/internal/liveness	2.191s
ok  	github.com/novox/mesh-host/internal/meshcli	1.592s
ok  	github.com/novox/mesh-host/internal/network	1.105s
ok  	github.com/novox/mesh-host/internal/outward	1.061s
ok  	github.com/novox/mesh-host/internal/profile	1.544s
ok  	github.com/novox/mesh-host/internal/reachable	1.057s
ok  	github.com/novox/mesh-host/internal/store	1.294s
ok  	github.com/novox/mesh-host/internal/system	1.062s
ok  	github.com/novox/mesh-host/internal/tunnel	1.066s
ok  	github.com/novox/mesh-host/internal/units	1.058s
ok  	github.com/novox/mesh-host/internal/upgrade	1.234s
ok  	github.com/novox/mesh-host/internal/witness	4.891s
ok  	github.com/novox/mesh-host/packaging	1.050s
?   	github.com/novox/mesh-host/rootsearch	[no test files]
ok  	github.com/novox/mesh-host/validate	1.046s
**Merge check** at `20d5af9b` - `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 - read by no module's build: cmd/mesh-host/generation_floor_test.go, cmd/mesh-host/generation_test.go, internal/declaration/order_test.go, internal/link/queue_test.go Run by the build seat on shanks as `build-1791711065627049972` (`builds --log build-1791711065627049972`). ``` --- 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-11T09:30:02Z 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-11T09:30:02Z 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 notes: - cmd/mesh-host/generation_floor_test.go, cmd/mesh-host/generation_test.go, internal/declaration/order_test.go and internal/link/queue_test.go read by no module's build, and rebuild nothing (issue 280) --- its merge-check.sh (go toolchain) ok github.com/novox/mesh-host/cmd/mesh-bootstrap 1.015s ok github.com/novox/mesh-host/cmd/mesh-host 5.602s ok github.com/novox/mesh-host/examples 1.021s ok github.com/novox/mesh-host/internal/accounts 1.536s ok github.com/novox/mesh-host/internal/apply 4.804s ok github.com/novox/mesh-host/internal/bootstrap 1.687s ok github.com/novox/mesh-host/internal/bundle 1.055s ok github.com/novox/mesh-host/internal/declaration 1.092s ok github.com/novox/mesh-host/internal/firewall 1.885s ok github.com/novox/mesh-host/internal/identity 1.185s ok github.com/novox/mesh-host/internal/image 1.044s ok github.com/novox/mesh-host/internal/inventory 1.054s ok github.com/novox/mesh-host/internal/link 10.485s ok github.com/novox/mesh-host/internal/liveness 2.191s ok github.com/novox/mesh-host/internal/meshcli 1.592s ok github.com/novox/mesh-host/internal/network 1.105s ok github.com/novox/mesh-host/internal/outward 1.061s ok github.com/novox/mesh-host/internal/profile 1.544s ok github.com/novox/mesh-host/internal/reachable 1.057s ok github.com/novox/mesh-host/internal/store 1.294s ok github.com/novox/mesh-host/internal/system 1.062s ok github.com/novox/mesh-host/internal/tunnel 1.066s ok github.com/novox/mesh-host/internal/units 1.058s ok github.com/novox/mesh-host/internal/upgrade 1.234s ok github.com/novox/mesh-host/internal/witness 4.891s ok github.com/novox/mesh-host/packaging 1.050s ? github.com/novox/mesh-host/rootsearch [no test files] ok github.com/novox/mesh-host/validate 1.046s ```
mesh-admin merged commit 6defec8f68 into main 2026-10-11 16:00:01 +00:00
mesh-admin deleted branch fix/234-refuse-a-declaration-from-an-older-generation 2026-10-11 16:00:01 +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#82