From 9e5bd7e49ca5f74f2efab5777f6ed7f73e002c73 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 13 Nov 2026 11:37:35 +0100 Subject: [PATCH] S5 sdk-objects-cap-option: OptionObjectsCapMiB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 47 G §513, §547 (A-343, A-344) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- go/catalogue/busstate.go | 3 +++ go/catalogue/objects_test.go | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/go/catalogue/busstate.go b/go/catalogue/busstate.go index 89274d96..090de245 100644 --- a/go/catalogue/busstate.go +++ b/go/catalogue/busstate.go @@ -50,6 +50,9 @@ const ( OptionAgeDays = "max-age-days" // OptionCapMiB is the cap of a stream, a bucket or an object store, in MiB. OptionCapMiB = "max-mib" + // OptionObjectsCapMiB is the cap of a state's objects store `-objects`, in MiB, where the state needs + // another than the one the bus module plans (design 47 G §513, §547). + OptionObjectsCapMiB = "objects-max-mib" // OptionGrant names the trusted config value granting another module a part of it (ADR 0363 §4, ADR 0592 §9). OptionGrant = "grant" // OptionDeliveries is how many times a work queue's message is delivered before it is a dead letter. diff --git a/go/catalogue/objects_test.go b/go/catalogue/objects_test.go index f296a66c..9d6681c2 100644 --- a/go/catalogue/objects_test.go +++ b/go/catalogue/objects_test.go @@ -53,3 +53,10 @@ func decodeStrictObjects(raw string) (Manifest, error) { type errString string func (e errString) Error() string { return string(e) } + +// The option naming a state's objects cap is exported with the bounds the judge checks it by (design 47 G §513, §547). +func TestTheObjectsCapOptionIsNamedWithItsBounds(t *testing.T) { + if OptionObjectsCapMiB != "objects-max-mib" || ObjectsLeastMiB != 1 || ObjectsMostMiB != 8192 { + t.Fatalf("option %q, bounds %d to %d", OptionObjectsCapMiB, ObjectsLeastMiB, ObjectsMostMiB) + } +}