Declare asks in the assigner's version series, and have the teller and the view accept it there (H-A-188)

The builder numbers every artifact of a release in its module's version, so the assigner's package asks is
published in 0.3, not the 0.1 eba4309b declared: asks now names series 0.3, and the teller and the view, which
import it, accept it at 0.3 in their manifests' packages. The other eight packages' modules are all at 0.1, so
their series stand. The gate in mesh-catalog, which imports asks too, follows with the catalog's next change.

Builds: design 47 G §370, H-A-186, H-A-188
This commit is contained in:
2026-11-20 21:05:39 +01:00
parent eba4309b19
commit 1db38fcc72
6 changed files with 20 additions and 4 deletions
@@ -120,11 +120,11 @@ func TestManifest(t *testing.T) {
}
}
// H-A-186 (design 47 G §370): asks, which the gate, the teller and the view import, is a declared Go package of the
// module, so every release publishes it.
// module, so every release publishes it; H-A-188: in the module's version series, 0.3.
if !slices.ContainsFunc(m.Build.Artifacts, func(a catalogue.Artifact) bool {
return a.Name == "asks" && a.Kind == catalogue.ArtifactPackage && a.Language == "go" && slices.Equal(a.Paths, []string{"asks"}) && a.Series == "0.1"
return a.Name == "asks" && a.Kind == catalogue.ArtifactPackage && a.Language == "go" && slices.Equal(a.Paths, []string{"asks"}) && a.Series == m.Version && m.Version == "0.3"
}) {
t.Errorf("artifacts = %+v, want the Go package asks of series 0.1", m.Build.Artifacts)
t.Errorf("artifacts = %+v, want the Go package asks of series 0.3, the module's", m.Build.Artifacts)
}
// ADR 0635 §5: its views family is its ordinary events, `views.<state>` among its emits, on no stream of its own.
// The seat's four events are said on the seat's own subject (the seat's family), so the module keeps no stream for them
+1 -1
View File
@@ -378,7 +378,7 @@
"paths": [
"asks"
],
"series": "0.1"
"series": "0.3"
}
]
}
@@ -43,6 +43,7 @@ type artifact struct {
}
type manifest struct {
Packages map[string]string `json:"packages"`
Module string `json:"module"`
Version string `json:"version"`
Slug string `json:"slug"`
@@ -181,6 +182,10 @@ func TestManifestProcess(t *testing.T) { // 1240/AC1
if len(m.Build.Artifacts) != 3 {
t.Fatalf("artifacts = %+v, want the program, the tools and the package tellerevents", m.Build.Artifacts)
}
// H-A-188: the assigner is at 0.3, so its package asks, which this module imports, is accepted in that series.
if got := m.Packages["git.novox.be/novox/mesh-delivery/modules/mesh-delivery-assigner/asks"]; got != "0.3" || len(m.Packages) != 1 {
t.Errorf("packages = %v, want asks accepted in the assigner's series 0.3", m.Packages)
}
// H-A-186 (design 47 G §370): tellerevents, which the assigner imports, is a declared package.
if a := m.Build.Artifacts[2]; a.Name != "tellerevents" || a.Kind != "package" || a.Language != "go" || !reflect.DeepEqual(a.Paths, []string{"tellerevents"}) || a.Series != "0.1" {
t.Errorf("package artifact = %+v", a)
+3
View File
@@ -1,6 +1,9 @@
{
"module": "mesh-delivery-teller",
"version": "0.1",
"packages": {
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-assigner/asks": "0.3"
},
"slug": "teller",
"tools": [
"teller_end_ask",
@@ -70,6 +70,7 @@ type claim struct {
}
type manifest struct {
Packages map[string]string `json:"packages"`
Claims []claim `json:"claims"`
State []state `json:"state"`
Module string `json:"module"`
@@ -313,6 +314,10 @@ func TestManifestIsTakenAndReadsOnly(t *testing.T) { // 1134/AC7
func TestManifestIsWholeInItsRepository(t *testing.T) { // 1134/AC7
m, _ := load(t)
// H-A-188: the assigner is at 0.3, so its package asks, which this module imports, is accepted in that series.
if got := m.Packages["git.novox.be/novox/mesh-delivery/modules/mesh-delivery-assigner/asks"]; got != "0.3" || len(m.Packages) != 1 {
t.Errorf("packages = %v, want asks accepted in the assigner's series 0.3", m.Packages)
}
// H-A-186 (design 47 G §370): viewstate, which the gate, the assigner and the teller import, is a declared package.
if len(m.Build.Artifacts) != 5 || m.Build.Artifacts[4].Name != "viewstate" {
t.Fatalf("artifacts = %+v", m.Build.Artifacts)
+3
View File
@@ -1,6 +1,9 @@
{
"module": "mesh-delivery-view",
"version": "0.1",
"packages": {
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-assigner/asks": "0.3"
},
"moved": true,
"slug": "view",
"tools": [