Write each node's declaration at the Version its engine reads

The composer is the node-engine's own build, so a newer composer could hand
an older engine a field its strict decode refuses. The engine's record now
states the declaration Version it reads, and the composer writes node X's
declaration at the lower of its own Version and X's (1 when X states none),
leaving out what that Version lacks: an engine reading 1 gets no
drain-bound and runs on its own default.

Builds: design 47 H2 §813 (12); H-A-416 (2), H-A-419; mesh-contracts feat/47-H2 e6ed560e (the record's declaration-reads)
This commit is contained in:
2026-11-22 01:17:49 +01:00
parent b305a5f08c
commit 86380b66c1
6 changed files with 62 additions and 1 deletions
+3
View File
@@ -247,6 +247,9 @@ type Node struct {
// Contract is the contract of its node-engine's newest statement (inv.HealthOf); Stated is whether it ever stated one.
Contract int
Stated bool
// DeclarationReads is the declaration Version its node-engine states it reads (nodeengine.NodeRecord.DeclarationReads,
// design 47 H2 §813 (12), H-A-416 (2), H-A-419); 0 when it states none, read as 1.
DeclarationReads int
// InOwn is the modules it runs inside its own composition (`<node>.node`), not by a composition of their own, since
// no fingerprint of the new form names them where it runs them (novox/hq issue 1126): Compositions folds their
// resources into the node's own, as the controller's composed writer does, unless fps gives one of the new form.