BLD15: the Go build module declares its finding stream and hears the keeper's ask
Part of BLD15: the manifest's stream mesh-build-go-findings (the three finding events, 7 days, 16 MiB) and the consume of mesh-conditions.findings-asked. The module's writing of findings through mesh-sdk's finding writer waits for the writer (the writer's API is an open design question, D-16). Builds: design 47 G §383, §384, §387 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -49,7 +49,7 @@ func TestTheManifestDeclaresTheToolchainsStream(t *testing.T) {
|
||||
Events []string `json:"events"`
|
||||
} `json:"streams"`
|
||||
}
|
||||
if err := json.Unmarshal(raw, &m); err != nil || len(m.Streams) != 1 || m.Streams[0].Name != "toolchains-go" || !slices.Equal(m.Streams[0].Events, []string{"toolchain.**"}) {
|
||||
if err := json.Unmarshal(raw, &m); err != nil || len(m.Streams) < 1 || m.Streams[0].Name != "toolchains-go" || !slices.Equal(m.Streams[0].Events, []string{"toolchain.**"}) {
|
||||
t.Errorf("streams = %+v (%v)", m.Streams, err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,6 +190,19 @@ func TestTheModuleInvokesTheArtifactSeatsVerbsAndWritesNoStore(t *testing.T) {
|
||||
if slices.Contains(m.Consumes, "mesh-delivery-builder.version.numbered") {
|
||||
t.Errorf("consumes %v still hear version.numbered", m.Consumes)
|
||||
}
|
||||
// An observer says its findings on a stream of its own and hears the keeper's ask (design 47 G §383, §384, §387).
|
||||
if !slices.Contains(m.Consumes, "mesh-conditions.findings-asked") {
|
||||
t.Errorf("consumes %v lack mesh-conditions.findings-asked", m.Consumes)
|
||||
}
|
||||
found := false
|
||||
for _, st := range m.Streams {
|
||||
if st.Name == "mesh-build-go-findings" {
|
||||
found = slices.Equal(st.Events, []string{"finding-written.*", "finding-cleared.*", "findings-stated.*"}) && st.MaxAgeDays == 7 && st.MaxMiB == 16
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
t.Errorf("streams %+v lack mesh-build-go-findings (7 days, 16 MiB)", m.Streams)
|
||||
}
|
||||
for _, r := range m.Resources {
|
||||
if r["id"] == "registry" {
|
||||
t.Errorf("the store's address is still placed: %v", r)
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
"serves": ["current", "drop", "pause", "resume", "steps"]
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"mesh-conditions.findings-asked"
|
||||
],
|
||||
"reads": [
|
||||
"mesh-delivery-checker.kept"
|
||||
],
|
||||
@@ -78,6 +81,12 @@
|
||||
{
|
||||
"name": "toolchains-go",
|
||||
"events": ["toolchain.**"]
|
||||
},
|
||||
{
|
||||
"name": "mesh-build-go-findings",
|
||||
"events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"],
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
}
|
||||
],
|
||||
"requires": [
|
||||
|
||||
Reference in New Issue
Block a user