diff --git a/module.json b/module.json index 088d8463..c0ba5c01 100644 --- a/module.json +++ b/module.json @@ -29,6 +29,7 @@ "acts", "packages", "composition", + "composition-diff", "compose", "compose-candidate", "manifest-reads", diff --git a/packaging/operator_keys_test.go b/packaging/operator_keys_test.go index 27970245..6798db6c 100644 --- a/packaging/operator_keys_test.go +++ b/packaging/operator_keys_test.go @@ -8,6 +8,7 @@ import ( "strings" "testing" + "git.novox.be/novox/mesh-contracts/go/seats/nodeengine" "git.novox.be/novox/mesh-sdk/go/catalogue" "git.novox.be/novox/mesh-sdk/go/declaration" ) @@ -126,6 +127,26 @@ func testTheManifestConsumesTheBackupEvent(t *testing.T) { } // Design 47 H2 ยง813 (12), H-A-388: it states the declaration Version it reads, the one its contract parses, so the // delivery plan orders the composer that writes that Version after it. + // The claim of node-engine serves every verb the seat's contract defines, composition-diff among them (the H2 K row of + // mesh-contracts, H-A-355 (2), H-A-392): a claim short of one is refused by the manifest validator. + if parsed, err := catalogue.Decode(raw); err == nil { + var serves []string + for _, c := range parsed.Claims { + if c.Name == nodeengine.Seat { + serves = c.Serves + } + } + for _, verb := range []string{nodeengine.VerbHandOver, nodeengine.VerbAccessAct, nodeengine.VerbJudgeDirectories, + nodeengine.VerbSetuidSearch, nodeengine.VerbRootFree, nodeengine.VerbActs, nodeengine.VerbPackages, + nodeengine.VerbComposition, nodeengine.VerbCompositionDiff, nodeengine.VerbCompose, nodeengine.VerbComposeCandidate, + nodeengine.VerbManifestReads, nodeengine.VerbApplyOrder, nodeengine.VerbSeatList, nodeengine.VerbSeatListAgain, + nodeengine.VerbFirstViews, nodeengine.VerbFirstViewAgain, nodeengine.VerbEntryAgain, nodeengine.VerbProcessBuilds, + nodeengine.VerbConverged} { + if !slices.Contains(serves, verb) { + t.Errorf("the claim of %s does not serve %s: %v", nodeengine.Seat, verb, serves) + } + } + } // H-A-394 (1): a module that claims a seat is core. if parsed, err := catalogue.Decode(raw); err != nil || parsed.Class != catalogue.ClassCore { t.Errorf("the manifest's class is %q, and the node-engine claims a seat (%v)", parsed.Class, err)