The sandbox composer carries the module the mesh provides itself
mesh/delivery closed: a newer head of the same pull request
mesh/check failed: novox: not composed on novox: postgres: its own secret reader is handed to the provisioner and the m… | 61a3bd996dd4 on 27a956448c0a

A check that composes with a candidate's own composer (any mesh-host change)
gave it the indexer's manifests alone, and the input carries no catalogue, so
mesh-wireguard (shipped with mesh-sdk, no repository) was missing: "nothing
provides mesh-wireguard / mesh-addressing" on novox for mesh-host #200. Each case
now lays the provided module's manifest over its shelf, as the bus reader does.

Issue 1126.

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
2026-11-03 01:44:15 +01:00
parent b8158affa7
commit 61a3bd996d
2 changed files with 20 additions and 0 deletions
+10
View File
@@ -134,6 +134,16 @@ func runCase(r Request, c Case, depth string) (CaseVerdict, error) {
if err != nil { if err != nil {
return CaseVerdict{}, fmt.Errorf("composer: the case %q: %w", c.Name, err) return CaseVerdict{}, fmt.Errorf("composer: the case %q: %w", c.Name, err)
} }
// The module the mesh provides itself (the private network) has no repository the indexer reads, so no case carries
// it: its manifest comes with mesh-sdk and always wins, as the bus reader has it (frombus readBase). Without it a node
// it is assigned to composed nothing (issue 1126, check of mesh-host #200: "nothing provides mesh-wireguard").
for _, name := range delivery.ProvidedModules() {
m, _, err := delivery.ProvidedManifest(name)
if err != nil {
return CaseVerdict{}, fmt.Errorf("composer: %w", err)
}
shelf[name] = m
}
in.Catalogue = shelf in.Catalogue = shelf
in.Nodes = slices.Clone(in.Nodes) in.Nodes = slices.Clone(in.Nodes)
in.Holdings = slices.Clone(in.Holdings) in.Holdings = slices.Clone(in.Holdings)
+10
View File
@@ -60,6 +60,16 @@ func TestARequestItCannotRunIsRefused(t *testing.T) {
if _, err := Run(placed); err == nil || !strings.Contains(err.Error(), "holds no node for") { if _, err := Run(placed); err == nil || !strings.Contains(err.Error(), "holds no node for") {
t.Errorf("a case placing a node the input lacks: %v", err) t.Errorf("a case placing a node the input lacks: %v", err)
} }
// Issue 1126 (check of mesh-host #200): the module the mesh provides itself (the private network) comes from mesh-sdk,
// a second source beside the indexer's manifests the cases carry, and the input carries no catalogue: a node it is
// assigned to still composes, and what it provides is provided.
wg := delivery.ProvidedModules()[0]
provided := withInput(t, Request{V: Version, Machines: []string{"a"}, Depth: DepthResolve,
Cases: []Case{{Name: "change", Manifests: map[string]Manifest{"demo": {Raw: json.RawMessage(demo)}}}}},
compose.Input{Nodes: []compose.Node{{Name: "a", Assigned: []string{wg, "demo"}}}})
if v, err := Run(provided); err != nil || !v.Cases[0].Machines["a"].Composes {
t.Errorf("a node assigned the mesh's own module: %+v, %v", v, err)
}
v, err := Run(Request{V: Version, Cases: []Case{{Name: "only-read", Manifests: map[string]Manifest{"demo": {Raw: json.RawMessage(demo)}}}}}) v, err := Run(Request{V: Version, Cases: []Case{{Name: "only-read", Manifests: map[string]Manifest{"demo": {Raw: json.RawMessage(demo)}}}}})
if err != nil || len(v.Cases) != 1 || !v.Cases[0].Manifests["demo"].Accepted || v.Cases[0].Machines != nil || v.SDK == "" { if err != nil || len(v.Cases) != 1 || !v.Cases[0].Manifests["demo"].Accepted || v.Cases[0].Machines != nil || v.SDK == "" {
t.Fatalf("a request with no machines: %+v, %v", v, err) t.Fatalf("a request with no machines: %+v, %v", v, err)