From f8b8be1600bdc30c28aca5fda25284bd99f1236b Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 9 Nov 2026 09:45:37 +0100 Subject: [PATCH] The builder's build log has a cap that holds its 30 days (issue 1966, recovery) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The log grew about 3 MiB an hour on 2026-11-09 (951.9 MiB at 07:47 UTC, 954.9 at 08:42) against the bus's default cap of 1 GiB, about 23 hours before builds stop. ADR 0571 §1 keeps it 30 days, so the cap rises to 3072 MiB instead of the age falling. Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i --- modules/mesh-delivery-builder/builds/log.go | 3 +++ modules/mesh-delivery-builder/manifest_test.go | 7 ++++--- modules/mesh-delivery-builder/module.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/mesh-delivery-builder/builds/log.go b/modules/mesh-delivery-builder/builds/log.go index 6bf530c5..0c59e696 100644 --- a/modules/mesh-delivery-builder/builds/log.go +++ b/modules/mesh-delivery-builder/builds/log.go @@ -27,6 +27,9 @@ const ( BuildSaidEvent = "build.said" // BuilderLogDays is how long the log keeps its entries. BuilderLogDays = 30 + // BuilderLogMiB is the log's cap: 30 days of entries, at the 3 MiB an hour read on 2026-11-09, with room to spare. + // The bus's default of 1 GiB held about two weeks of them (issue 1966). + BuilderLogMiB = 3072 // BuildsSinceTool is the builder's tool answering every ended build since a time, in order (clause 9): its // argument `since` (RFC 3339), its answer BuildsSince. BuildsSinceTool = "builder_builds_since" diff --git a/modules/mesh-delivery-builder/manifest_test.go b/modules/mesh-delivery-builder/manifest_test.go index 4ef9d37e..aa10d1bd 100644 --- a/modules/mesh-delivery-builder/manifest_test.go +++ b/modules/mesh-delivery-builder/manifest_test.go @@ -48,6 +48,7 @@ type manifest struct { Logs []struct { Name string `json:"name"` MaxAgeDays int `json:"max-age-days"` + MaxMiB int `json:"max-mib"` } `json:"logs"` Reads []string `json:"reads"` Uses []string `json:"uses"` @@ -159,9 +160,9 @@ func TestManifestDeclarations(t *testing.T) { // 1607/AC1 if want := []string{"build.asked-again", "version.numbered", "version.old-form-closed"}; !reflect.DeepEqual(m.Emits, want) { t.Errorf("emits = %v, want %v", m.Emits, want) } - // 1955/L7 (ADR 0571 §1): its module log, each build's start and end, kept 30 days; no bare stream. - if len(m.Logs) != 1 || m.Logs[0].Name != builds.BuilderLog || m.Logs[0].MaxAgeDays != builds.BuilderLogDays { - t.Errorf("logs = %+v, want %s kept %d days", m.Logs, builds.BuilderLog, builds.BuilderLogDays) + // 1955/L7 (ADR 0571 §1): its module log, each build's start and end, kept 30 days in a cap that holds them; no bare stream. + if len(m.Logs) != 1 || m.Logs[0].Name != builds.BuilderLog || m.Logs[0].MaxAgeDays != builds.BuilderLogDays || m.Logs[0].MaxMiB != builds.BuilderLogMiB { + t.Errorf("logs = %+v, want %s kept %d days in %d MiB", m.Logs, builds.BuilderLog, builds.BuilderLogDays, builds.BuilderLogMiB) } for _, k := range []string{"streams", "claims", "provides", "requires", "defines-seats", "seat", "seats", "bus", "config"} { if _, ok := top[k]; ok { diff --git a/modules/mesh-delivery-builder/module.json b/modules/mesh-delivery-builder/module.json index 6ac35f0c..d9c7c566 100644 --- a/modules/mesh-delivery-builder/module.json +++ b/modules/mesh-delivery-builder/module.json @@ -95,7 +95,7 @@ { "name": "first-views", "history": 1 } ], "logs": [ - { "name": "build-log", "max-age-days": 30 } + { "name": "build-log", "max-age-days": 30, "max-mib": 3072 } ], "reads": [ "mesh-build-go.steps",