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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user