delivery: a composition carries no signature, since the node applies only what it composes itself (ADR 0593 §6)

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
2026-11-02 19:02:33 +01:00
parent 1c684743f7
commit f4bbcd7e5e
4 changed files with 16 additions and 306 deletions
+7
View File
@@ -101,6 +101,13 @@ func TestComposeCandidateAndComposedPlanRoundTripAndRefuse(t *testing.T) {
if SameComposed(planned, Composed{Node: "ace", Module: "netcheck", FP: fp, Resources: []json.RawMessage{}}) {
t.Error("a plan change is not a new composition value")
}
signed := strings.Replace(string(raw), `"resources"`, `"signature":{"signer":"x","sig":"y"},"resources"`, 1)
if c, err := DecodeComposed([]byte(signed)); err != nil || c.Node != "ace" {
t.Fatalf("a composition the ended controller signed does not decode: %v", err)
}
if strings.Contains(string(raw), "signature") {
t.Error("a composition is written with a signature")
}
refused := Composed{Node: "ace", Module: "netcheck", FP: fp, Refused: "the setting domain has no value"}
if raw, err = EncodeComposed(refused); err != nil {
t.Fatal(err)