grants: a module left out of the shadow list says why no manifest was found (the pass's gaps naming it)

This commit is contained in:
2026-11-15 22:34:45 +01:00
parent 7d97516c3b
commit 2682a623de
@@ -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.