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.<owner>.<name>) 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
This commit is contained in:
@@ -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.<owner>.<name> (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" {
|
||||
|
||||
@@ -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": [
|
||||
|
||||
Reference in New Issue
Block a user