The node-engine composes nothing of a package artifact (H-A-466)

A package is a build input published to a registry, never placed on a
machine, and no registry seat the engine reads numbers it: asking its
digest failed the whole build, so a module declaring a package (the
indexer, the forge bridge) was wanted and held. The engine now leaves
package artifacts out of what it resolves (lookUp), holds
(partsMissing), builds (buildOf) and takes in (takein.Manifest,
takein.Built, and the manifest handed to Resolve), and so does the
candidate compose, which shares partsOf.

Builds: design 47 H2 H-A-466
This commit is contained in:
2026-11-22 04:32:20 +01:00
parent 39aff2c4a4
commit 63133503a9
5 changed files with 82 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) {