From eb02389d450240613429e0306f27596ec4d07322 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 22 Nov 2026 02:48:06 +0100 Subject: [PATCH] M-class (watchman): class core, the finding stream at 8 MiB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It claims a seat, so its class is core; its finding stream keeps 7 days at 8 MiB, not 16. Builds: design 47 H2 §810, §814, §820; H-A-394 (1) --- modules/mesh-delivery-watchman/manifest_test.go | 9 +++++++-- modules/mesh-delivery-watchman/module.json | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/mesh-delivery-watchman/manifest_test.go b/modules/mesh-delivery-watchman/manifest_test.go index 23f9209da..6a0dd971c 100644 --- a/modules/mesh-delivery-watchman/manifest_test.go +++ b/modules/mesh-delivery-watchman/manifest_test.go @@ -53,6 +53,7 @@ type manifest struct { Tools []string `json:"tools"` Moved bool `json:"moved"` Version string `json:"version"` + Class string `json:"class"` Slug string `json:"slug"` Reads []string `json:"reads"` Consumes []string `json:"consumes"` @@ -103,6 +104,10 @@ func TestManifestStateAndReads(t *testing.T) { // 1135/AC6 if m.Module != "mesh-delivery-watchman" || m.Moved || m.Slug != "watchman" { t.Errorf("module %q moved %v (it has no template, so it is not moved) slug %q", m.Module, m.Moved, m.Slug) } + // design 47 H2 §810, §814; H-A-394 (1): it claims a seat, so its class is core. + if m.Class != "core" { + t.Errorf("class = %q, want core", m.Class) + } want := []state{{Name: "presence", History: 20}, {Name: "pulse", KeyTTL: true}, {Name: "stuck", History: 20}, {Name: "first-views", History: 1}} if !reflect.DeepEqual(m.State, want) { t.Errorf("state = %+v, want %+v", m.State, want) @@ -301,11 +306,11 @@ type require struct { } // findingRequires is the findings state and the finding stream a module asks for by their templates (design 47 G -// §383, §387; A-30): 7 days and 16 MiB, the findings state keeping the given history. +// §383, §387; A-30): 7 days and 8 MiB (design 47 H2 §820), the findings state keeping the given history. func findingRequires(history float64) []require { return []require{ {Name: "findings", Storage: "key-value", Template: "state", Options: map[string]any{"history": history}}, {Name: "finding-events", Storage: "stream", Template: "events", Options: map[string]any{ - "events": []any{"finding-written.*", "finding-cleared.*", "findings-stated.*"}, "max-age-days": float64(7), "max-mib": float64(16)}}, + "events": []any{"finding-written.*", "finding-cleared.*", "findings-stated.*"}, "max-age-days": float64(7), "max-mib": float64(8)}}, } } diff --git a/modules/mesh-delivery-watchman/module.json b/modules/mesh-delivery-watchman/module.json index 2c6665b01..0d0318aa0 100644 --- a/modules/mesh-delivery-watchman/module.json +++ b/modules/mesh-delivery-watchman/module.json @@ -1,6 +1,7 @@ { "module": "mesh-delivery-watchman", "version": "0.1", + "class": "core", "slug": "watchman", "claims": [ { @@ -203,7 +204,7 @@ "findings-stated.*" ], "max-age-days": 7, - "max-mib": 16 + "max-mib": 8 } } ]