From 9f43e927e4881b8eca3a3a699c37c70464d26c89 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 11 Nov 2026 13:53:50 +0100 Subject: [PATCH] WM7 (store-filling): a store clears below 80 % of its cap, not 70 % MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 47 G §181, §263 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ --- .../internal/watch/pipelines_test.go | 8 ++++++-- modules/mesh-delivery-watchman/internal/watch/records.go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/mesh-delivery-watchman/internal/watch/pipelines_test.go b/modules/mesh-delivery-watchman/internal/watch/pipelines_test.go index b384cafd..4459ee23 100644 --- a/modules/mesh-delivery-watchman/internal/watch/pipelines_test.go +++ b/modules/mesh-delivery-watchman/internal/watch/pipelines_test.go @@ -144,13 +144,17 @@ func fillBody(store string, bytes int64) []byte { } // design 47 G §181, §263: a store past its share is `store-filling` naming the part and the store, full is urgent, `room` and a -// fill under 70 % clear it. +// fill under 80 % clear it. func TestAStoreFillingIsAFinding(t *testing.T) { w, o, _ := setup() key := FindingKey(ScopeDelivery, "mesh-delivery-records", KindStoreFilling) w.StoreFill("mesh-delivery", "filling", fillBody("records", 60)) if len(o.findings) != 0 { - t.Fatalf("under 70 %%: %v", o.findings) + t.Fatalf("under 80 %%: %v", o.findings) + } + w.StoreFill("mesh-delivery", "filling", fillBody("records", 75)) + if len(o.findings) != 0 { + t.Fatalf("75 %% is under §181's 80 %%: %v", o.findings) } w.StoreFill("mesh-delivery", "filling", fillBody("records", 85)) if o.findings[key].Severity != Warning { diff --git a/modules/mesh-delivery-watchman/internal/watch/records.go b/modules/mesh-delivery-watchman/internal/watch/records.go index f51e2bfa..95e5032b 100644 --- a/modules/mesh-delivery-watchman/internal/watch/records.go +++ b/modules/mesh-delivery-watchman/internal/watch/records.go @@ -37,7 +37,7 @@ const uncovered = "uncovered:record-open" const RecordOpenBound = 24 * time.Hour // FillingFrom is the share of a store's cap under which a `filling` clears its finding (design 47 G §181). -const FillingFrom = 0.70 +const FillingFrom = 0.80 // StoreFill hears a seat's `filling`, `full` or `room` of one of its stores. A `filling` is a warning, naming the part and the // store, unless its share is under FillingFrom, which clears it; `full` is urgent, naming what it refuses; `room` clears either.