Raise the declaration's Version to 2 for drain-bound; manifests state the Version read and written

Version is the declaration's form: drain-bound raises it by one, and a
node-engine refuses only a higher one, so it still takes what a composer
of version 1 writes. A manifest says declaration-reads (the node-engine's)
and declaration-writes (the composer's), so the delivery plan can order
the writer of a Version after every engine that reads it.

Builds: design 47 H2 §813 (12), H-A-388 (2), H-A-358
This commit is contained in:
2026-11-22 00:19:52 +01:00
parent 484e2bba3c
commit 134b111e3f
4 changed files with 30 additions and 6 deletions
+5 -4
View File
@@ -26,9 +26,10 @@ import (
"git.novox.be/novox/mesh-sdk/go/seal"
)
// Version is the vocabulary this host speaks. A declaration naming any other version is
// refused: an older host handed a newer vocabulary must not quietly do half of it.
const Version = 1
// Version is the vocabulary this host speaks, the declaration's form. A declaration naming a higher version is
// refused: an older host handed a newer vocabulary must not quietly do half of it. A lower one is a part of this
// vocabulary and is read. Version 2 carries a process's drain-bound (design 47 H2 §813 (12), H-A-358, H-A-388).
const Version = 2
// Type names a kind of resource. Every addition widens what a compromised control plane can
// express, so the list is a security artefact and grows deliberately.
@@ -2361,7 +2362,7 @@ func parse(raw []byte, allowActions bool) (*Declaration, error) {
return nil, &RefusalError{Problems: []string{"not a declaration: " + err.Error()}}
}
if env.Version != Version {
if env.Version < 1 || env.Version > Version {
// Everything below assumes the vocabulary, so there is nothing further to say.
return nil, &RefusalError{Problems: []string{fmt.Sprintf(
"declaration version %d; this host speaks version %d. Refused whole rather than "+