Merge main (the node-engine composes nothing of a package artifact, H-A-466)

This commit is contained in:
2026-11-22 04:50:40 +01:00
5 changed files with 106 additions and 12 deletions
+5 -2
View File
@@ -1120,10 +1120,13 @@ func testTheNodeComposesItsWantsFromTheBus(t *testing.T) {
catalogEntries := map[string]meshcatalog.CatalogEntry{fp: entryOfManifest("lemurs", fp, lemurs), kfp: entryOfManifest("keeper", kfp, keeper)}
// A module with an artifact: its build is made from its entry and the parts the candidate gives (design 47 G §628, A-316).
artFp := meshcatalogclient.SourcePrefix2 + strings.Repeat("7", 64)
artManifest := `{"module":"art","version":"1","capabilities":["systemd"],"build":{"artifacts":[{"name":"files","kind":"archive","from":"files"}]},` +
artManifest := `{"module":"art","version":"1","capabilities":["systemd"],"build":{"artifacts":[{"name":"files","kind":"archive","from":"files"},` +
`{"name":"artapi","kind":"package","language":"go","from":"api"}]},` +
`"resources":[{"id":"service","type":"service","unit":"art.service","state":"running","boot":"enabled"}]}`
artEntry := entryOfManifest("art", artFp, artManifest)
artEntry.Artifacts = []meshcatalog.Artifact{{Kind: "archive", Language: "none", Ref: "art:files"}}
// Its package is a build input, never placed (H-A-466): the candidate's version resolves no digest of it and holds nothing for it.
artEntry.Artifacts = []meshcatalog.Artifact{{Kind: "archive", Language: "none", Ref: "art:files"},
{Kind: "package", Language: "go", Ref: "art:artapi", Package: &meshcatalog.ArtifactPackage{Name: "git.example/art/api"}}}
catalogEntries[artFp] = artEntry
// art's files archive at version 1, which the candidate "art-with" names (the candidate's version, never a digest).
senv.Registry = EntryCall(func(_ context.Context, seat, _ string, args any) (json.RawMessage, error) {