From 463fa66aa10538448c8753dcddfe3927a15a329d Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 5 Nov 2026 15:41:04 +0100 Subject: [PATCH] meshcatalogclient: the holder's module name and the addresses of the states others read (modules, manifests), so a reader names them from the client (lead's request; issue 1966) Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i --- contracts/go/clients/meshcatalogclient/catalog_test.go | 7 +++++++ contracts/go/clients/meshcatalogclient/module.go | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/contracts/go/clients/meshcatalogclient/catalog_test.go b/contracts/go/clients/meshcatalogclient/catalog_test.go index 1151fc00..91a4e3ef 100644 --- a/contracts/go/clients/meshcatalogclient/catalog_test.go +++ b/contracts/go/clients/meshcatalogclient/catalog_test.go @@ -35,6 +35,13 @@ func TestDigestAndFingerprintSetKeepTheirForms(t *testing.T) { } // A manifest and a module are read back as written, and each rule of the old values is kept: a refusal names its reason. +// The holder's states others read keep the addresses the manifests' `reads` and the first views name today. +func TestTheHoldersReadAddressesAreTheOnesTheManifestsName(t *testing.T) { + if Module != "mesh-delivery-indexer" || ModulesRead != "mesh-delivery-indexer.modules" || ManifestsRead != "mesh-delivery-indexer.manifests" { + t.Errorf("the holder %q reads %q and %q", Module, ModulesRead, ManifestsRead) + } +} + func TestManifestAndModuleValuesKeepTheirRules(t *testing.T) { if _, err := ManifestsKey("abc"); err == nil || !strings.Contains(err.Error(), `"abc"`) { t.Errorf("ManifestsKey(abc) = %v", err) diff --git a/contracts/go/clients/meshcatalogclient/module.go b/contracts/go/clients/meshcatalogclient/module.go index d07b3692..b07eada7 100644 --- a/contracts/go/clients/meshcatalogclient/module.go +++ b/contracts/go/clients/meshcatalogclient/module.go @@ -10,6 +10,15 @@ import ( "git.novox.be/novox/mesh-sdk/go/keys" ) +// Module is the module that holds the seat mesh-catalog, and the two states of its others read, by the address a +// manifest's `reads` and a first view name them: the modules the trunk holds and their manifests. A reader names them here, +// never by the holder's literal name. +const ( + Module = "mesh-delivery-indexer" + ModulesRead = Module + ".modules" + ManifestsRead = Module + ".manifests" +) + // RootPath is a `modules` value's path when the module's manifest is its repository's root. const RootPath = "."