H2 K1: every seat package read tolerantly, saying its form

A reader of another part's value refused a field it did not know, so a holder
that added one broke every reader until each was rebuilt. Every package is
generated again by mesh-delivery's seatgen (feat/47-H2 ff7db337): each
generated decoder keeps unknown fields, returns the form read (1 when absent)
and each package states its Form (1 everywhere, left out on the wire). The
hand-written clients take the three values, and the node-engine client's
ask, answer, composition and have decoders keep unknown fields too; their tests
now hold that tolerance. seatgen -check clean in all five folders.

Builds: design 47 H2 §780; H-A-350 DMC-4
This commit is contained in:
2026-11-21 23:15:25 +01:00
parent 28cb4d5441
commit 2172a8732d
41 changed files with 2514 additions and 543 deletions
+2 -2
View File
@@ -124,8 +124,8 @@ func TestCompositionRefusals(t *testing.T) {
if _, err := DecodeComposition([]byte(`{"v":2,"node":"ace","resources":[]}`)); err == nil {
t.Error("a composition of version 2 is read")
}
if _, err := DecodeComposition([]byte(`{"v":1,"node":"ace","resources":[],"extra":1}`)); err == nil {
t.Error("a composition with a field it does not know is read")
if c, err := DecodeComposition([]byte(`{"v":1,"node":"ace","resources":[],"extra":1}`)); err != nil || c.Node != "ace" {
t.Errorf("a composition with a field it does not know is refused (§780 reads it tolerantly): %v", err)
}
if _, err := DecodeComposition([]byte(`{"v":1,"node":"ace","resources":[],"signature":"x"}`)); err != nil {
t.Errorf("a signed composition of the ended controller is refused: %v", err)