From aacdba44e34acad3440fb6f589ad1e8e3ded17d6 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 3 Nov 2026 16:25:04 +0100 Subject: [PATCH] =?UTF-8?q?The=20judge's=20copy=20of=20the=20mesh-catalog?= =?UTF-8?q?=20seat=20is=20the=20SDK's=20entry:=20four=20optional=20verbs,?= =?UTF-8?q?=20so=20the=20old=20module's=20claim=20is=20not=20outgrown=20(A?= =?UTF-8?q?DR=200604=20=C2=A71;=20F3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mesh-delivery-indexer/judge/rules.go | 23 ++++++++++++++++++- .../mesh-delivery-indexer/judge/rules_test.go | 11 +++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/modules/mesh-delivery-indexer/judge/rules.go b/modules/mesh-delivery-indexer/judge/rules.go index 49fa9f40..734c5730 100644 --- a/modules/mesh-delivery-indexer/judge/rules.go +++ b/modules/mesh-delivery-indexer/judge/rules.go @@ -7462,7 +7462,8 @@ var defaultSeats = append([]catalogue.Seat{ // images and archives, by digest — which is why the provision is the artifact store and not an // image registry. {Name: "mesh-artifact-store", Scope: catalogue.ScopeMesh, Delivers: "artifact-store", Decision: "novox/hq ADR 0075"}, - {Name: "mesh-catalog", Scope: catalogue.ScopeMesh, Decision: "novox/hq ADR 0121"}, + // The catalog (novox/hq ADR 0604): the SDK's entry, its four verbs optional while the module that claimed it before stands. + {Name: "mesh-catalog", Scope: catalogue.ScopeMesh, Serves: catalogVerbs(), Decision: "novox/hq ADR 0604"}, // The delivery's owner (novox/hq ADR 0239): one commit's journey from its pull request's head to every // machine, and a group of them, recorded and ordered by its holder, which asks the controller for each act. // What it says it says as its module (`mesh-delivery.transition`), through the runtime that launches it. @@ -7881,6 +7882,26 @@ func configInput() map[string]any { return in } +// catalogVerbs are the catalog seat's four verbs, as the SDK's seat serves them (catalogue.CatalogSeat). +func catalogVerbs() []catalogue.Verb { + return []catalogue.Verb{ + {Name: "modules", Optional: true, Description: "Every module the trunk holds, each with its repository, its " + + "directory there, the merge commit it was last changed at and its fingerprint (or why it has none): the " + + "catalog of the mesh, read from its holder's state. Reads only.", + Input: schema(map[string]string{}, nil)}, + {Name: "module", Optional: true, Description: "One module whole: its repository, directory, commit and " + + "fingerprint, and its manifest as the trunk holds it. Older versions are in its repository's history. Reads only.", + Input: schema(map[string]string{"module": "the module's name"}, []string{"module"})}, + {Name: "provides", Optional: true, Description: "Which modules provide a provision (a module provides its own " + + "name too) and which require it, from the module graph's provision edges. Reads only.", + Input: schema(map[string]string{"provision": "the provision, such as postgres-database"}, []string{"provision"})}, + {Name: "dependents", Optional: true, Description: "The modules whose build edges reach a module, directly or " + + "through others (a base, a mesh package it publishes, the build module that builds them): what a change of it " + + "builds again, from the module graph. Reads only.", + Input: schema(map[string]string{"module": "the module's name"}, []string{"module"})}, + } +} + // deliveryVerbs are the delivery seat's tools: what reads the merges and checks, and the acts of a person and healer H2 // on a merge (ADR 0539 clause 17). func deliveryVerbs() []catalogue.Verb { diff --git a/modules/mesh-delivery-indexer/judge/rules_test.go b/modules/mesh-delivery-indexer/judge/rules_test.go index 6e873e02..5e3c4325 100644 --- a/modules/mesh-delivery-indexer/judge/rules_test.go +++ b/modules/mesh-delivery-indexer/judge/rules_test.go @@ -4825,6 +4825,17 @@ func TestTheSeatsAreAClosedSetAndEachNamesItsDecision(t *testing.T) { []string{"placement", "proposals", "propose", "withdraw", "again"}) { t.Errorf("the placement seat is %v, %v", ok, s) } + // The judge's copy of the catalog seat is the SDK's entry exactly (ADR 0604 §1): four optional verbs, so the claim of the + // module that held the seat before is not outgrown while both stand. + if sdk, ok := catalogue.SeatNamed(catalogue.CatalogSeat); !ok || len(sdk.Serves) != 4 { + t.Errorf("the SDK's catalog seat is %v, %+v", ok, sdk) + } else { + for _, s := range defaultSeats { + if s.Name == catalogue.CatalogSeat && !reflect.DeepEqual(s, sdk) { + t.Errorf("the judge's copy of the catalog seat is %+v, want the SDK's %+v", s, sdk) + } + } + } // The checker's seat serves the try, which replaces the shell's merge check (ADR 0547 §10, ADR 0245). var checkerVerbs []string for _, s := range catalogue.Seats() {