distribution asks the builder through the builder's published package builds, taken by its series (B5e; ADR 0634 §1, §4; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 15:25:34 +01:00
parent 72dd8a719e
commit a636dc3df3
4 changed files with 13 additions and 4 deletions
@@ -12,6 +12,7 @@ import (
"encoding/json"
"errors"
"fmt"
builds "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds"
"net/url"
"os"
"strings"
@@ -24,7 +25,6 @@ import (
reg "git.novox.be/novox/mesh-delivery/contracts/go/seats/containerimageregistry"
"git.novox.be/novox/mesh-delivery/sdk/parts"
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-sdk/go/delivery"
"distribution/internal/holder"
)
@@ -520,7 +520,7 @@ func tools(v *holder.Verbs, windows kept[holder.Window], callers func() (holder.
func main() {
base, _ := url.Parse("http://127.0.0.1:5001")
store := &holder.OCI{Base: base, Upstream: &holder.Upstream{}}
h := &holder.Holder{Objects: parts.BusObjects(holder.IncomingObjects), Builder: delivery.BuilderVersions{Ask: stdio.Ask}, Store: store, Say: say, Finding: finding,
h := &holder.Holder{Objects: parts.BusObjects(holder.IncomingObjects), Builder: builds.BuilderVersions{Ask: stdio.Ask}, Store: store, Say: say, Finding: finding,
Transfers: parts.BusTransfers[holder.Opening](holder.TransfersState), Cap: parts.BusCap(holder.IncomingObjects), Record: recordAct, Idle: parts.BusArm(holder.IdleState)}
files := &holder.Files{Container: or(os.Getenv("MESH_REGISTRY_CONTAINER"), "mesh-registry"), Run: holder.ExecRunner, UID: os.Getuid()}
v := &holder.Verbs{Holder: h, Catalog: store, Holds: kept[holder.Hold]{state: "holds", key: holder.Hold.Key}, Mirrors: mirrors{},
+1
View File
@@ -3,6 +3,7 @@ module distribution
go 1.26.0
require (
git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds v0.0.0-00010101000000-000000000000
git.novox.be/novox/mesh-delivery/sdk v0.0.0-00010101000000-000000000000
git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshconditionsclient v0.0.0-00010101000000-000000000000
git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshconditions v0.0.0-00010101000000-000000000000
@@ -832,12 +832,17 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) {
Name string `json:"name"`
Serves []string `json:"serves"`
} `json:"claims"`
Resources []map[string]any `json:"resources"`
Consumes []string `json:"consumes"`
Resources []map[string]any `json:"resources"`
Consumes []string `json:"consumes"`
Packages map[string]string `json:"packages"`
}
if err := json.Unmarshal(raw, &m); err != nil {
t.Fatal(err)
}
// The builder's question is its published package, taken by its series (ADR 0634 §1).
if m.Packages["builds"] != "0.1" {
t.Errorf("packages %v: want builds of series 0.1", m.Packages)
}
// E15: the provision artifact-store retired (ADR 0632 §3): distribution provides and serves nothing, and the
// store is found by its seats' holder and the listen it opens to the mesh.
if len(m.Provides) != 0 || len(m.Serves) != 0 {
+3
View File
@@ -1,6 +1,9 @@
{
"module": "distribution",
"version": "2",
"packages": {
"builds": "0.1"
},
"claims": [
{
"name": "container-image-registry",