diff --git a/modules/artifact-store-tools/cmd/artifact-store-tools/store_test.go b/modules/artifact-store-tools/cmd/artifact-store-tools/store_test.go index 3729944df..8156df52c 100644 --- a/modules/artifact-store-tools/cmd/artifact-store-tools/store_test.go +++ b/modules/artifact-store-tools/cmd/artifact-store-tools/store_test.go @@ -474,7 +474,7 @@ func TestTheToolsServedAreTheToolsTheManifestNames(t *testing.T) { t.Errorf("invokes %v", m.Invokes) } // ADR 0615: the assigner's wants and the indexer's manifests are asked once and followed by their events, not read. - if !reflect.DeepEqual(m.Consumes, []string{"mesh-delivery-assigner.views.wants", "mesh-delivery-indexer.views.manifests"}) || + if !reflect.DeepEqual(m.Consumes, []string{"mesh-delivery-assigner.views.wants", "mesh-delivery-indexer.views.manifests", "mesh-conditions.findings-asked"}) || slices.Contains(m.Reads, WantsRead) || slices.Contains(m.Reads, ManifestsRead) { t.Errorf("consumes %v, reads %v", m.Consumes, m.Reads) } diff --git a/modules/artifact-store-tools/module.json b/modules/artifact-store-tools/module.json index 64f4349cf..8ae3fe620 100644 --- a/modules/artifact-store-tools/module.json +++ b/modules/artifact-store-tools/module.json @@ -39,7 +39,8 @@ ], "consumes": [ "mesh-delivery-assigner.views.wants", - "mesh-delivery-indexer.views.manifests" + "mesh-delivery-indexer.views.manifests", + "mesh-conditions.findings-asked" ], "state": [ "findings" @@ -85,6 +86,14 @@ "template": "files/store-address" } ], + "streams": [ + { + "name": "artifact-store-tools-findings", + "events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"], + "max-age-days": 7, + "max-mib": 16 + } + ], "build": { "artifacts": [ { diff --git a/modules/mesh-healers/cmd/mesh-healers/manifest_test.go b/modules/mesh-healers/cmd/mesh-healers/manifest_test.go index 001969ccb..83f59216b 100644 --- a/modules/mesh-healers/cmd/mesh-healers/manifest_test.go +++ b/modules/mesh-healers/cmd/mesh-healers/manifest_test.go @@ -48,7 +48,7 @@ func TestTheManifestSaysWhatTheCodeDoes(t *testing.T) { got, want []string }{ {"emits (healer-acted is the seat's, said on its subject)", m.Emits, nil}, - {"consumes", m.Consumes, []string{RaisedEvent, ChangedEvent, RecordedEvent}}, + {"consumes", m.Consumes, []string{RaisedEvent, ChangedEvent, RecordedEvent, "mesh-conditions.findings-asked"}}, {"invokes", m.Invokes, []string{"seat:mesh-hand-acts.hand-act", "seat:mesh-hand-acts.hand-acts"}}, {"reads", m.Reads, []string{ConditionsRead}}, } { diff --git a/modules/mesh-healers/module.json b/modules/mesh-healers/module.json index 08871f822..7fe853339 100644 --- a/modules/mesh-healers/module.json +++ b/modules/mesh-healers/module.json @@ -16,7 +16,8 @@ "consumes": [ "mesh-conditions.condition-raised", "mesh-conditions.condition-changed", - "mesh-hand-acts.act-recorded" + "mesh-hand-acts.act-recorded", + "mesh-conditions.findings-asked" ], "invokes": [ "seat:mesh-hand-acts.hand-act", @@ -61,6 +62,14 @@ "unknown": "program" } ], + "streams": [ + { + "name": "mesh-healers-findings", + "events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"], + "max-age-days": 7, + "max-mib": 16 + } + ], "build": { "artifacts": [ { diff --git a/modules/mesh-vault/module.json b/modules/mesh-vault/module.json index 79a24ea6e..8a33f4943 100644 --- a/modules/mesh-vault/module.json +++ b/modules/mesh-vault/module.json @@ -162,6 +162,14 @@ ] } ], + "streams": [ + { + "name": "mesh-vault-findings", + "events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"], + "max-age-days": 7, + "max-mib": 16 + } + ], "build": { "artifacts": [ { @@ -253,6 +261,7 @@ } }, "consumes": [ - "mesh-delivery-assigner.views.assignments" + "mesh-delivery-assigner.views.assignments", + "mesh-conditions.findings-asked" ] } diff --git a/modules/mesh-watcher/cmd/mesh-watcher/manifest_test.go b/modules/mesh-watcher/cmd/mesh-watcher/manifest_test.go index c419583fe..f67524610 100644 --- a/modules/mesh-watcher/cmd/mesh-watcher/manifest_test.go +++ b/modules/mesh-watcher/cmd/mesh-watcher/manifest_test.go @@ -39,7 +39,7 @@ func TestTheManifestSaysWhatTheCodeDoes(t *testing.T) { t.Fatal(err) } // Where the bus runs is the assigner's seat-holders, asked once and followed by its events (ADR 0615), never read. - if !reflect.DeepEqual(m.Consumes, []string{"mesh-self-check.checked", assignerModule + ".views." + mesh.StateSeatHolders}) { + if !reflect.DeepEqual(m.Consumes, []string{"mesh-self-check.checked", assignerModule + ".views." + mesh.StateSeatHolders, "mesh-conditions.findings-asked"}) { t.Fatalf("consumes %v", m.Consumes) } if !reflect.DeepEqual(m.Invokes, []string{SeatHoldersTool, m.Module + ".watcher_ping", "seat:mesh-hand-acts.hand-act"}) || len(m.Reads) != 0 { diff --git a/modules/mesh-watcher/module.json b/modules/mesh-watcher/module.json index e4555e822..5a855c5fb 100644 --- a/modules/mesh-watcher/module.json +++ b/modules/mesh-watcher/module.json @@ -4,7 +4,8 @@ "slug": "watch", "consumes": [ "mesh-self-check.checked", - "mesh-delivery-assigner.views.seat-holders" + "mesh-delivery-assigner.views.seat-holders", + "mesh-conditions.findings-asked" ], "invokes": [ "mesh-delivery-assigner.assigner_read_seat_holders", @@ -53,6 +54,14 @@ "template": "files/settings.json" } ], + "streams": [ + { + "name": "mesh-watcher-findings", + "events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"], + "max-age-days": 7, + "max-mib": 16 + } + ], "build": { "artifacts": [ { diff --git a/modules/minio/cmd/object-store/manifest_test.go b/modules/minio/cmd/object-store/manifest_test.go index e299d71b5..ad150f08f 100644 --- a/modules/minio/cmd/object-store/manifest_test.go +++ b/modules/minio/cmd/object-store/manifest_test.go @@ -41,7 +41,7 @@ func TestManifestClaimsTheSeat(t *testing.T) { } invokes, _ := m["invokes"].([]any) consumes, _ := m["consumes"].([]any) - if _, reads := m["reads"]; reads || len(invokes) != 2 || invokes[0] != SeatHoldersTool || invokes[1] != "seat:mesh-hand-acts.hand-act" || len(consumes) != 1 || consumes[0] != assignerModule+".views."+mesh.StateSeatHolders { + if _, reads := m["reads"]; reads || len(invokes) != 2 || invokes[0] != SeatHoldersTool || invokes[1] != "seat:mesh-hand-acts.hand-act" || len(consumes) != 2 || consumes[0] != assignerModule+".views."+mesh.StateSeatHolders || consumes[1] != "mesh-conditions.findings-asked" { t.Fatalf("reads %v, invokes %v, consumes %v: it asks the assigner's seat-holders once and follows its events (ADR 0615)", m["reads"], invokes, consumes) } var goBundle map[string]any diff --git a/modules/minio/module.json b/modules/minio/module.json index 0df4e3615..47f19cdf6 100644 --- a/modules/minio/module.json +++ b/modules/minio/module.json @@ -44,7 +44,8 @@ "seat:mesh-hand-acts.hand-act" ], "consumes": [ - "mesh-delivery-assigner.views.seat-holders" + "mesh-delivery-assigner.views.seat-holders", + "mesh-conditions.findings-asked" ], "state": [ "findings" @@ -192,6 +193,14 @@ "package": "minio-client" } ], + "streams": [ + { + "name": "minio-findings", + "events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"], + "max-age-days": 7, + "max-mib": 16 + } + ], "build": { "artifacts": [ { diff --git a/modules/nfs-server/cmd/nfs-server/manifest_test.go b/modules/nfs-server/cmd/nfs-server/manifest_test.go index 8af51fd5a..e59ac3b94 100644 --- a/modules/nfs-server/cmd/nfs-server/manifest_test.go +++ b/modules/nfs-server/cmd/nfs-server/manifest_test.go @@ -152,7 +152,7 @@ func TestTheManifestCarriesGrantsTheRosterTheWantsAndTheRemovalOrder(t *testing. if len(full.Reads) != 2 || full.Reads[0] != diskreadings.ReadingsRead || full.Reads[1] != MountsState { t.Errorf("reads: %v", full.Reads) } - if len(full.Invokes) != 2 || full.Invokes[0] != SeatHoldersTool || full.Invokes[1] != "seat:mesh-hand-acts.hand-act" || len(full.Consumes) != 1 || full.Consumes[0] != assignerModule+".views."+mesh.StateSeatHolders { + if len(full.Invokes) != 2 || full.Invokes[0] != SeatHoldersTool || full.Invokes[1] != "seat:mesh-hand-acts.hand-act" || len(full.Consumes) != 2 || full.Consumes[0] != assignerModule+".views."+mesh.StateSeatHolders || full.Consumes[1] != "mesh-conditions.findings-asked" { t.Errorf("invokes %v, consumes %v", full.Invokes, full.Consumes) } roster := full.Facts["machines"] diff --git a/modules/nfs-server/module.json b/modules/nfs-server/module.json index f4567f7b3..6f77dba2c 100644 --- a/modules/nfs-server/module.json +++ b/modules/nfs-server/module.json @@ -172,6 +172,14 @@ "template": "files/shares.conf" } ], + "streams": [ + { + "name": "nfs-server-findings", + "events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"], + "max-age-days": 7, + "max-mib": 16 + } + ], "build": { "artifacts": [ { @@ -197,6 +205,7 @@ "seat:mesh-hand-acts.hand-act" ], "consumes": [ - "mesh-delivery-assigner.views.seat-holders" + "mesh-delivery-assigner.views.seat-holders", + "mesh-conditions.findings-asked" ] }