From fc4ce1cd79c39616c44178bccafd130d0649dade Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 05:34:01 +0100 Subject: [PATCH] RN25: the runner's stores declare their caps, its sent store, tools named runner_ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pipelines state is capped at 256 MiB and kept at 128 MiB in the old state section, the sent store sent-objects is declared at 256 MiB, and the first-view tools carry the runner's tool prefix. Builds: design 47 G §469, §85, §477, §533, §539 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- .../cmd/mesh-delivery-pipeline-tools/main.go | 6 +++--- .../mesh-delivery-pipeline-tools/main_test.go | 4 ++-- modules/mesh-delivery-pipeline/manifest_test.go | 16 +++++++++++++--- modules/mesh-delivery-pipeline/module.json | 14 ++++++++++---- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main.go b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main.go index 64776e43..a8aafaef 100644 --- a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main.go +++ b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main.go @@ -86,16 +86,16 @@ func Tools(r pipeline.Reads) []stdio.Tool { return out } -// Module and Slug are the runner's module and its tools' prefix, as its manifest names them. +// Module is the runner's module, and Prefix its tools' prefix (design 47 G §539: runner_first_views, runner_health). const ( Module = "mesh-delivery-pipeline" - Slug = "pipeline" + Prefix = "runner" ) // FirstViewTools are the runner's `_first_views` and `_first_view_again` over its state first-views // (design 47 G §77, §200): each view it holds or waits for, since when, and asked again by hand, a hand act. func FirstViewTools(st stdio.KeptState, acts views.HandActs, now func() time.Time) []stdio.Tool { - return views.StatusTools(Module, Slug+"_first_views", Slug+"_first_view_again", st, acts, now) + return views.StatusTools(Module, Prefix+"_first_views", Prefix+"_first_view_again", st, acts, now) } func main() { diff --git a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go index 73d96db0..2638c5d9 100644 --- a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go +++ b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go @@ -17,7 +17,7 @@ func (none) Keys() ([]string, error) { return nil, nil } func (none) Value(string) (json.RawMessage, error) { return nil, nil } // TestTools: the bundle serves the five read verbs as . (§83, §306; RN15/AC1), and the first-view tools -// (§77, §200; RN2/AC4). +// (§77, §200; RN2/AC4), named with the prefix runner_ (§539; RN25). func TestTools(t *testing.T) { var names []string for _, tl := range Tools(pipeline.Reads{Pipelines: none{}, Kept: none{}}) { @@ -26,7 +26,7 @@ func TestTools(t *testing.T) { for _, tl := range FirstViewTools(stdio.State(views.StatusState), nil, nil) { names = append(names, tl.Name) } - want := "mesh-pipeline-runner.show mesh-pipeline-runner.list mesh-pipeline-runner.stands mesh-pipeline-runner.why-carried mesh-pipeline-runner.kept pipeline_first_views pipeline_first_view_again" + want := "mesh-pipeline-runner.show mesh-pipeline-runner.list mesh-pipeline-runner.stands mesh-pipeline-runner.why-carried mesh-pipeline-runner.kept runner_first_views runner_first_view_again" if got := strings.Join(names, " "); got != want { t.Errorf("tools %q, want %q", got, want) } diff --git a/modules/mesh-delivery-pipeline/manifest_test.go b/modules/mesh-delivery-pipeline/manifest_test.go index a1ffc26d..cbc157a5 100644 --- a/modules/mesh-delivery-pipeline/manifest_test.go +++ b/modules/mesh-delivery-pipeline/manifest_test.go @@ -22,15 +22,19 @@ func TestManifest(t *testing.T) { } var states, streams, objects []string keyTTL := map[string]bool{} + stateMiB := map[string]int{} for _, s := range m.State { states = append(states, s.Name) keyTTL[s.Name] = s.KeyTTL + stateMiB[s.Name] = s.MaxMiB } + objectMiB := map[string]int{} for _, s := range m.Streams { streams = append(streams, s.Name) } for _, o := range m.Objects { objects = append(objects, o.Name) + objectMiB[o.Name] = o.MaxMiB } var program catalogue.Artifact if m.Build == nil { @@ -53,6 +57,9 @@ func TestManifest(t *testing.T) { {"old state sections", equalSets(states, []string{seat.StatePipelines, seat.StateKept, "aged", "bounds", "toolchains", "findings", "first-views"})}, // §535, §647, A-77, A-104: an ask no holder takes is bound by a key with its own time to live. {"bounds is key-ttl", keyTTL["bounds"]}, + // RN25 (§469, §85): an old state section declares its cap, pipelines 256 MiB and kept 128 MiB. + {"pipelines 256 MiB", stateMiB[seat.StatePipelines] == 256}, + {"kept 128 MiB", stateMiB[seat.StateKept] == 128}, // §470 (amending §27, §85): the step log is an old logs section kept 100 days, 128 MiB; RN24 (§383, §387): the finding // stream its findings are said on is the one old stream. {"old streams section", equalSets(streams, []string{"mesh-delivery-pipeline-findings"})}, @@ -62,8 +69,10 @@ func TestManifest(t *testing.T) { equalSets(m.Streams[0].Events, []string{"finding-written.*", "finding-cleared.*", "findings-stated.*"})}, // RN24 (§368): the version as MAJOR.MINOR, 0.1 with none published. {"version 0.1", m.Version == "0.1"}, - {"old objects section", equalSets(objects, []string{seat.StateStepOutputs})}, - {"step-outputs 1 GiB", len(m.Objects) == 1 && m.Objects[0].MaxMiB == 1024}, + // RN25 (§477, §533, §59): a foundation part whose seat has verbs and events declares its sent store, 256 MiB. + {"old objects section", equalSets(objects, []string{seat.StateStepOutputs, catalogue.SentObjectsLocal})}, + {"step-outputs 1 GiB", objectMiB[seat.StateStepOutputs] == 1024}, + {"sent-objects 256 MiB", objectMiB[catalogue.SentObjectsLocal] == 256}, // §333, §54, §44, §53, §376, §24, §37, §4, §77: what the runner hears. {"consumes", equalSets(m.Consumes, []string{ "mesh-delivery-indexer.take-in.taken", "mesh-builds.package-published", "mesh-builds.toolchain-agreed", "mesh-builds.step-ended", @@ -81,7 +90,8 @@ func TestManifest(t *testing.T) { "seat:mesh-builds.step", "seat:mesh-wants.step", "seat:node-build-go.check.step", "seat:node-build-node.check.step", "seat:node-build-image.check.step"})}, {"uses operator-channel", equalSets(m.Uses, []string{"operator-channel"})}, - {"first-view tools", equalSets(m.Tools, []string{"pipeline_first_views", "pipeline_first_view_again"})}, + // RN25 (§539): the runner's tools carry the prefix runner_. + {"first-view tools", equalSets(m.Tools, []string{"runner_first_views", "runner_first_view_again"})}, // RN1/AC5 (§95, §130): the new assigner is delivered before the runner. {"program needs the assigner's program", slices.Equal(program.Needs, []string{"mesh-delivery-assigner:program"})}, } diff --git a/modules/mesh-delivery-pipeline/module.json b/modules/mesh-delivery-pipeline/module.json index b66b07dd..143719c6 100644 --- a/modules/mesh-delivery-pipeline/module.json +++ b/modules/mesh-delivery-pipeline/module.json @@ -23,8 +23,8 @@ } ], "tools": [ - "pipeline_first_views", - "pipeline_first_view_again" + "runner_first_views", + "runner_first_view_again" ], "consumes": [ "mesh-delivery-indexer.take-in.taken", @@ -61,11 +61,13 @@ "state": [ { "name": "pipelines", - "history": 1 + "history": 1, + "max-mib": 256 }, { "name": "kept", - "history": 1 + "history": 1, + "max-mib": 128 }, { "name": "aged", @@ -105,6 +107,10 @@ { "name": "step-outputs", "max-mib": 1024 + }, + { + "name": "sent-objects", + "max-mib": 256 } ], "own-secrets": {