From df5a8895e23aef81ddbf682ce3d172b3f22e8b8d Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 22 Nov 2026 12:39:36 +0100 Subject: [PATCH] Indexer: registration-history takes every registration's name whole (H-A-470 (1)) The stream took one token after registration., so the history write of a source-only registration (source..) got no response and the operator's approved registration was never written. The manifest now says registration.** (the bus's registration.>); the write subject keeps the name. Builds: design 47 H2 H-A-470 (1), H-A-408 --- modules/mesh-delivery-indexer/manifest_test.go | 12 ++++++++++++ modules/mesh-delivery-indexer/module.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/mesh-delivery-indexer/manifest_test.go b/modules/mesh-delivery-indexer/manifest_test.go index af28dc77e..92d68c246 100644 --- a/modules/mesh-delivery-indexer/manifest_test.go +++ b/modules/mesh-delivery-indexer/manifest_test.go @@ -14,10 +14,12 @@ import ( "testing" "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-indexer/takein" + "git.novox.be/novox/mesh-sdk/go/buscompose" "git.novox.be/novox/mesh-sdk/go/busretry" "git.novox.be/novox/mesh-sdk/go/catalogue" "git.novox.be/novox/mesh-sdk/go/views" + "github.com/nats-io/nats-server/v2/server" "mesh-delivery-indexer/internal/index" ) @@ -228,6 +230,16 @@ func TestManifestDeclarations(t *testing.T) { // 1238/AC1, 1444 (reads the build m.Streams[1].Name != m.Module+"-findings" || m.Streams[1].MaxAgeDays != 7 || m.Streams[1].MaxMiB != 8 { t.Errorf("streams = %+v, want registration-history keeping its history, 64 MiB, and the findings stream at 8 MiB (§387, H2 §783)", m.Streams) } + // Design 47 H2 H-A-470 (1): the stream takes every registration's name whole, a module's one token and a source-only + // registration's source.. (H-A-408's key), so its write lands and is never dropped for want of a subject; the manifest spells the bus's `>` as `**`. + if len(m.Streams) > 0 { + for _, name := range []string{"mesh-delivery-indexer", "source.novox.hq"} { + subject := index.RegistrationHistoryEvent + "." + name + if !slices.ContainsFunc(m.Streams[0].Events, func(e string) bool { return server.SubjectMatchesFilter(subject, buscompose.WirePattern(e)) }) { + t.Errorf("registration-history takes %v, so the history of %s (%s) has no subject on it (H-A-470)", m.Streams[0].Events, name, subject) + } + } + } // Design 47 H2 §810, §814 (H-A-394 (1)): it claims a seat, so its class is core. §775: it makes kept calls, so it declares // the kept-call pace, 1 s to 30 s, read while it runs. §803 (H-A-461 (2)): a take-in's waiting line and bound, 1m and 5m. if m.Class != "core" { diff --git a/modules/mesh-delivery-indexer/module.json b/modules/mesh-delivery-indexer/module.json index e48cd603e..d7f1bbac5 100644 --- a/modules/mesh-delivery-indexer/module.json +++ b/modules/mesh-delivery-indexer/module.json @@ -173,7 +173,7 @@ { "name": "dry-runs", "history": 1, "ttl-seconds": 3600, "max-mib": 16 } ], "streams": [ - { "name": "registration-history", "events": ["registration.*"], "retention": "history", "max-mib": 64 }, + { "name": "registration-history", "events": ["registration.**"], "retention": "history", "max-mib": 64 }, { "name": "mesh-delivery-indexer-findings", "events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"], "max-age-days": 7, "max-mib": 8 } ], "objects": [