From efce28c996c2e31192e754a9c9a4a2ff25b2229a Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 11 Nov 2026 22:45:40 +0100 Subject: [PATCH] =?UTF-8?q?JUDGE=20(=C2=A7584,=20A-54):=20every=20stream?= =?UTF-8?q?=20of=20a=20foundation=20part=20is=20a=20predefined=20form,=20i?= =?UTF-8?q?ts=20old=20sections=20kept=20for=20good?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit keptUntilMoved passes the streams of a Foundation module (the findings stream -findings, distribution-events); a row in caseTwoModulesCannotDeclareOneStream names distribution-events (fails without the change). Builds: design 47 G §584, A-54, A-30 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- modules/mesh-delivery-indexer/judge/rules.go | 5 +++-- modules/mesh-delivery-indexer/judge/rules_test.go | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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) }