From 2682a623dee11d567ad35df86c836473efa5882f Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 15 Nov 2026 22:34:45 +0100 Subject: [PATCH] grants: a module left out of the shadow list says why no manifest was found (the pass's gaps naming it) --- modules/mesh-grants/internal/grants/tools.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/mesh-grants/internal/grants/tools.go b/modules/mesh-grants/internal/grants/tools.go index e76413de..77681b63 100644 --- a/modules/mesh-grants/internal/grants/tools.go +++ b/modules/mesh-grants/internal/grants/tools.go @@ -136,6 +136,18 @@ func (p *Part) MembershipOf(node, module string) (any, error) { } } out["composed"] = why + // Why no manifest was found: every gap of the pass that names the module, its manifest or its node's build of it + // (the trunk's verdict, the catalog entry of the running build, the want's), so a module left out says why. + var said []Gap + for _, g := range in.Gaps { + if strings.Contains(g.Input, module) || strings.Contains(g.Why, node+"."+module) { + said = append(said, g) + } + } + _, running := in.Running[node+"."+module] + _, trunk := in.Manifests[module] + _, held := in.Held[module] + out["manifest"] = map[string]any{"running": running, "trunk": trunk, "held": held, "gaps": said} } // The state holds the bare membership last published (mesh-sdk's codec, issue 774); what became of it at the last // pass is the pass's, kept in user-list at KeyPass.