The three build modules consume the seat list's events and invoke its verb
mesh-build-go and mesh-build-image follow the seat list as mesh-build-node does, so each consumes mesh-catalog.seat-definition-changed and -removed, and all three invoke seat:mesh-catalog.seat-definitions, which the reader calls. Builds: design 47 G A-488a, A-488b (hq 57c14047) Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -195,6 +195,16 @@ func TestTheModuleInvokesTheArtifactSeatsVerbsAndWritesNoStore(t *testing.T) {
|
||||
if !slices.Contains(m.Consumes, "mesh-conditions.findings-asked") {
|
||||
t.Errorf("consumes %v lack mesh-conditions.findings-asked", m.Consumes)
|
||||
}
|
||||
// Design 47 G A-488a, A-488b: its runtime follows the seat list, so the module consumes the seat's two events (which makes its
|
||||
// durable consumer) and invokes the verb that reads the list.
|
||||
for _, ev := range []string{"mesh-catalog.seat-definition-changed", "mesh-catalog.seat-definition-removed"} {
|
||||
if !slices.Contains(m.Consumes, ev) {
|
||||
t.Errorf("consumes %v lack %s", m.Consumes, ev)
|
||||
}
|
||||
}
|
||||
if !slices.Contains(m.Invokes, "seat:mesh-catalog.seat-definitions") {
|
||||
t.Errorf("invokes %v lack seat:mesh-catalog.seat-definitions", m.Invokes)
|
||||
}
|
||||
// Not a foundation part, it asks its finding stream in requires, by the template events (design 47 G §529, A-30), and
|
||||
// declares no stream of that name.
|
||||
for _, st := range m.Streams {
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"mesh-conditions.findings-asked"
|
||||
"mesh-conditions.findings-asked",
|
||||
"mesh-catalog.seat-definition-changed",
|
||||
"mesh-catalog.seat-definition-removed"
|
||||
],
|
||||
"invokes": [
|
||||
"seat:mesh-hand-acts.hand-act",
|
||||
@@ -46,6 +48,7 @@
|
||||
"seat:mesh-wants.input",
|
||||
"seat:mesh-module-assigner.assignments",
|
||||
"seat:mesh-catalog.module",
|
||||
"seat:mesh-catalog.seat-definitions",
|
||||
"seat:mesh-catalog.entry"
|
||||
],
|
||||
"config": {
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestTheModuleInvokesTheImageSeatAndHoldsNoRegistry(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if want := []string{"seat:mesh-hand-acts.hand-act", "seat:container-image-registry.publish", "seat:container-image-registry.publish-part",
|
||||
"seat:container-image-registry.mirror", "seat:mesh-module-assigner.assignments", "seat:mesh-catalog.module"}; !slices.Equal(m.Invokes, want) {
|
||||
"seat:container-image-registry.mirror", "seat:mesh-module-assigner.assignments", "seat:mesh-catalog.module", "seat:mesh-catalog.seat-definitions"}; !slices.Equal(m.Invokes, want) {
|
||||
t.Errorf("invokes = %v, want %v", m.Invokes, want)
|
||||
}
|
||||
// The seat's outcomes a copy waits on; the version comes in the ask, so version.numbered is not heard (design 47 G §413).
|
||||
@@ -32,6 +32,7 @@ func TestTheModuleInvokesTheImageSeatAndHoldsNoRegistry(t *testing.T) {
|
||||
for _, e := range OutcomeEvents {
|
||||
consumes = append(consumes, "container-image-registry."+e)
|
||||
}
|
||||
consumes = append(consumes, "mesh-catalog.seat-definition-changed", "mesh-catalog.seat-definition-removed") // the seat list, A-488a
|
||||
if !slices.Equal(m.Consumes, consumes) {
|
||||
t.Errorf("consumes = %v, want %v", m.Consumes, consumes)
|
||||
}
|
||||
|
||||
@@ -113,6 +113,16 @@ func TestWorkAndStoreDirectoriesLieOutsideTheHome(t *testing.T) {
|
||||
// and the registry's address is bound into a file of the home that the program reads.
|
||||
func TestManifestKeepsItsStatesClaimsItsBuildSeatAndDeclaresItsHealthTool(t *testing.T) {
|
||||
m := readManifest(t)
|
||||
// Design 47 G A-488a, A-488b: its runtime follows the seat list, so the module consumes the seat's two events (which makes its
|
||||
// durable consumer) and invokes the verb that reads the list.
|
||||
for _, ev := range []string{"mesh-catalog.seat-definition-changed", "mesh-catalog.seat-definition-removed"} {
|
||||
if !slices.Contains(m.Consumes, ev) {
|
||||
t.Errorf("consumes %v lack %s", m.Consumes, ev)
|
||||
}
|
||||
}
|
||||
if !slices.Contains(m.Invokes, "seat:mesh-catalog.seat-definitions") {
|
||||
t.Errorf("invokes %v lack seat:mesh-catalog.seat-definitions", m.Invokes)
|
||||
}
|
||||
states := []string{}
|
||||
for _, s := range m.State {
|
||||
states = append(states, s.Name)
|
||||
|
||||
@@ -68,11 +68,14 @@
|
||||
"seat:container-image-registry.publish-part",
|
||||
"seat:container-image-registry.mirror",
|
||||
"seat:mesh-module-assigner.assignments",
|
||||
"seat:mesh-catalog.module"
|
||||
"seat:mesh-catalog.module",
|
||||
"seat:mesh-catalog.seat-definitions"
|
||||
],
|
||||
"consumes": [
|
||||
"container-image-registry.published",
|
||||
"container-image-registry.refused"
|
||||
"container-image-registry.refused",
|
||||
"mesh-catalog.seat-definition-changed",
|
||||
"mesh-catalog.seat-definition-removed"
|
||||
],
|
||||
"own-secrets": {
|
||||
"broker": "${dir:state}/broker"
|
||||
|
||||
@@ -285,6 +285,9 @@ func TestTheModuleRequiresNodeToolsItPullsThrough(t *testing.T) {
|
||||
t.Errorf("consumes %v lack %s", m.Consumes, ev)
|
||||
}
|
||||
}
|
||||
if !slices.Contains(m.Invokes, "seat:mesh-catalog.seat-definitions") {
|
||||
t.Errorf("invokes %v lack seat:mesh-catalog.seat-definitions (A-488b)", m.Invokes)
|
||||
}
|
||||
}
|
||||
|
||||
// Design 47 G A-254, A-313, A-314: the module keeps a run's answer over what step-ended carries inline in the steps state's own
|
||||
|
||||
@@ -80,7 +80,8 @@
|
||||
"seat:npm-package-registry.publish",
|
||||
"seat:npm-package-registry.publish-part",
|
||||
"seat:mesh-module-assigner.assignments",
|
||||
"seat:mesh-catalog.module"
|
||||
"seat:mesh-catalog.module",
|
||||
"seat:mesh-catalog.seat-definitions"
|
||||
],
|
||||
"own-secrets": {
|
||||
"broker": "${dir:state}/broker"
|
||||
|
||||
Reference in New Issue
Block a user