diff --git a/modules/distribution/module.json b/modules/distribution/module.json index 0642df247..82f16fa97 100644 --- a/modules/distribution/module.json +++ b/modules/distribution/module.json @@ -133,20 +133,6 @@ "max-age-days": 7, "max-mib": 16 } - }, - { - "name": "finding-events", - "storage": "stream", - "template": "events", - "options": { - "events": [ - "finding-written.*", - "finding-cleared.*", - "findings-stated.*" - ], - "max-age-days": 7, - "max-mib": 16 - } } ], "capabilities": [ @@ -293,5 +279,17 @@ } } ] - } + }, + "streams": [ + { + "name": "distribution-findings", + "events": [ + "finding-written.*", + "finding-cleared.*", + "findings-stated.*" + ], + "max-age-days": 7, + "max-mib": 16 + } + ] } diff --git a/modules/gitea/module.json b/modules/gitea/module.json index dd8276509..d7a18c757 100644 --- a/modules/gitea/module.json +++ b/modules/gitea/module.json @@ -34,20 +34,6 @@ "options": { "history": 1 } - }, - { - "name": "finding-events", - "storage": "stream", - "template": "events", - "options": { - "events": [ - "finding-written.*", - "finding-cleared.*", - "findings-stated.*" - ], - "max-age-days": 7, - "max-mib": 16 - } } ], "contributes": { @@ -673,5 +659,13 @@ "git.pull-closed", "git.pull-merged", "mesh-conditions.findings-asked" + ], + "streams": [ + { + "name": "gitea-findings", + "events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"], + "max-age-days": 7, + "max-mib": 16 + } ] } diff --git a/modules/mesh-config/cmd/mesh-config/manifest_test.go b/modules/mesh-config/cmd/mesh-config/manifest_test.go index 9a0d91269..79b0f0144 100644 --- a/modules/mesh-config/cmd/mesh-config/manifest_test.go +++ b/modules/mesh-config/cmd/mesh-config/manifest_test.go @@ -63,7 +63,9 @@ func TestEveryStateAndActHasItsTool(t *testing.T) { if !slices.Equal(dm.Emits, []string{ConfigChanged}) { t.Errorf("emits %v, want only %s: the stream carries the others", dm.Emits, ConfigChanged) } - if len(dm.Streams) != 1 || dm.Streams[0].Name != StreamName || !dm.Streams[0].KeepsHistory() || !dm.Streams[0].Carries(EventRenamed) || + // beside the findings' stream of a foundation part, `-findings` (design 47 G A-30, ยง529) + if len(dm.Streams) != 2 || dm.Streams[1].Name != Module+"-findings" || !dm.Streams[1].Carries("finding-written.x") || + dm.Streams[0].Name != StreamName || !dm.Streams[0].KeepsHistory() || !dm.Streams[0].Carries(EventRenamed) || !dm.Streams[0].Carries(EventRetiring) || !dm.Streams[0].Carries(EventRetired) || dm.Streams[0].Carries(ConfigChanged) { t.Errorf("streams %+v: want %s, keeping its history, carrying renamed, retiring and retired but not config-changed", dm.Streams, StreamName) } diff --git a/modules/mesh-config/module.json b/modules/mesh-config/module.json index 5c772339f..b139a8421 100644 --- a/modules/mesh-config/module.json +++ b/modules/mesh-config/module.json @@ -124,22 +124,16 @@ "retired" ], "retention": "history" - } - ], - "requires": [ + }, { - "name": "finding-events", - "storage": "stream", - "template": "events", - "options": { - "events": [ - "finding-written.*", - "finding-cleared.*", - "findings-stated.*" - ], - "max-age-days": 7, - "max-mib": 16 - } + "name": "mesh-config-findings", + "events": [ + "finding-written.*", + "finding-cleared.*", + "findings-stated.*" + ], + "max-age-days": 7, + "max-mib": 16 } ] }