diff --git a/modules/mesh-delivery-indexer/judge/rules.go b/modules/mesh-delivery-indexer/judge/rules.go index 6d30c3f7..3aca3716 100644 --- a/modules/mesh-delivery-indexer/judge/rules.go +++ b/modules/mesh-delivery-indexer/judge/rules.go @@ -5567,8 +5567,9 @@ var seatStreamsKeptUntilMoved = map[string][]string{ // keptUntilMoved is whether a stream of a manifest is one kept until its module moves it: by the module's name, or by a // seat it claims. func keptUntilMoved(m catalogue.Manifest, stream string) bool { - // A foundation part says its findings on its old stream `-findings` for good (design 47 G §529, A-30). - if stream == FindingStreamOf(m.Module) && slices.Contains(Foundation, m.Module) { + // A foundation part keeps its old sections for good, its streams among them: its findings stream `-findings` + // (design 47 G §529, A-30) and the image registry's `distribution-events` (§584, A-54). + if slices.Contains(Foundation, m.Module) { return true } if slices.Contains(streamsKeptUntilMoved[m.Module], stream) { diff --git a/modules/mesh-delivery-indexer/judge/rules_test.go b/modules/mesh-delivery-indexer/judge/rules_test.go index 0530f52f..4f3eb0f9 100644 --- a/modules/mesh-delivery-indexer/judge/rules_test.go +++ b/modules/mesh-delivery-indexer/judge/rules_test.go @@ -5121,12 +5121,15 @@ func caseTwoModulesCannotDeclareOneStream(t *testing.T) { if got := PredefinedFormProblems(catalogue.Manifest{Module: "mesh-build-go", Streams: toolchains}); len(got) != 1 { t.Fatalf("a toolchain stream of a module claiming no build seat was kept by its name: %v", got) } - // A foundation part says its findings on its old stream `-findings` for good (design 47 G §529, A-30); a part - // that is no foundation part keeps none (its findings go by the template `events`). + // A foundation part keeps its old streams for good: its findings stream `-findings` (design 47 G §529, A-30) and + // distribution's `distribution-events` (§584, A-54); a part that is no foundation part keeps none. findings := []catalogue.StreamDeclaration{{Name: "mesh-config-findings", Events: []string{"finding-written.*"}}} if got := PredefinedFormProblems(catalogue.Manifest{Module: "mesh-config", Streams: findings}); len(got) != 0 { t.Fatalf("a foundation part's findings stream was refused: %v", got) } + if got := PredefinedFormProblems(catalogue.Manifest{Module: "distribution", Streams: []catalogue.StreamDeclaration{{Name: "distribution-events", Events: []string{"old-name-closed"}}}}); len(got) != 0 { + t.Fatalf("a foundation part's events stream was refused: %v", got) + } if got := PredefinedFormProblems(catalogue.Manifest{Module: "mesh-config-b", Streams: []catalogue.StreamDeclaration{{Name: "mesh-config-b-findings", Events: []string{"finding-written.*"}}}}); len(got) != 1 { t.Fatalf("a findings stream of a part outside the foundation was kept: %v", got) }