Assigner: the module graph is served from the node-engine's haves, the adapter and the last go/delivery import are gone (ADR 0634 §5; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 16:08:35 +01:00
parent b0d5b8d1af
commit 72e1676d61
@@ -3,13 +3,11 @@ package main
import (
"context"
"git.novox.be/novox/mesh-contracts/go/clients/nodeengineclient"
"git.novox.be/novox/mesh-contracts/go/seats/nodeengine"
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds"
"mesh-delivery-assigner/internal/buckets"
"slices"
"git.novox.be/novox/mesh-sdk/go/catalogue"
"git.novox.be/novox/mesh-sdk/go/delivery"
"git.novox.be/novox/mesh-delivery/sdk/graph"
@@ -66,7 +64,7 @@ func (p *passer) served(ctx context.Context, get getter, g graph.Graph, n assign
if len(g) == 0 {
return nil
}
served, unread := graph.Served(graphHaves(n.Haves), func(module, fp string) ([]string, bool) { return p.servesOf(ctx, get, module, fp) },
served, unread := graph.Served(n.Haves, func(module, fp string) ([]string, bool) { return p.servesOf(ctx, get, module, fp) },
func(module string) []string { return g[module].Serves })
if len(unread) > 0 {
p.logf("the manifest of the running build of %v cannot be read, so what the module graph says they serve is counted as served", unread)
@@ -130,16 +128,3 @@ func (p *passer) manifestOf(ctx context.Context, get getter, module, fp string)
}
return got.manifest, true
}
// graphHaves is the haves as the module graph's Served reads them, which keeps the earlier have form for what it reads: the
// build, the phase and the health of each module on each node.
func graphHaves(haves map[string]map[string]nodeengine.HaveByNodeModuleValue) map[string]map[string]delivery.Have {
out := map[string]map[string]delivery.Have{}
for node, modules := range haves {
out[node] = map[string]delivery.Have{}
for module, h := range modules {
out[node][module] = delivery.Have{FP: h.Fp, Build: h.Build, Phase: delivery.Phase(h.Phase), Health: delivery.Health(h.Health)}
}
}
return out
}