mesh-sdk takes the catalogue, the validator and a store-free composition, the fingerprint's new form and the delivery parts' key layouts (design 47 R4a, issues 1353-1364, 1298) #48

Merged
mesh-tools merged 41 commits from feat/r4a-sdk-first into main 2026-10-20 07:15:54 +00:00
Showing only changes of commit cf965b93c2 - Show all commits
+16
View File
@@ -469,3 +469,19 @@ func TestTheInternalSuffixIsTheInputsAndNeverTheEnvironments(t *testing.T) {
t.Errorf("names: %v", names)
}
}
// Round 2: a need answered on the same machine is a grant too (catalogue resolve.go gives it From: the node's own name).
func TestAConsumerOnTheProvidersOwnNodeIsGrantedWithAStandInAndNamedForeseen(t *testing.T) {
in := aGrantMesh(t)
in.Issued = nil
laptop, anchor := nodeOf(t, &in, "laptop"), nodeOf(t, &in, "anchor")
laptop.Assigned = []string{overlay.Name}
anchor.Assigned = append(anchor.Assigned, "files")
got := rendered(t, in, "anchor", Foreseeing)
if len(got.Rendering.Grants) != 1 || got.Rendering.Grants[0].Consumer != "anchor" || got.Rendering.Grants[0].Sealed != catalogue.ForeseenSealed {
t.Fatalf("grants are %+v", got.Rendering.Grants)
}
if !has(got.Foreseen, "the grant of s3-bucket for files on anchor") {
t.Errorf("foreseen %v", got.Foreseen)
}
}