From b83c546831b0392fe33aca84f64dfcb16f787f16 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 11:00:33 +0100 Subject: [PATCH] checker: compositions keeps ttl-seconds 259200 with max-mib 256; the texts say only what holds (issue 1975 note 6) Builds: issue 1975 note 6 (the lead's review round 1; no design line) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- .../cmd/mesh-delivery-checker-tools/main.go | 4 ++-- modules/mesh-delivery-checker/internal/check/requests.go | 4 ++-- modules/mesh-delivery-checker/manifest_test.go | 2 +- modules/mesh-delivery-checker/module.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/mesh-delivery-checker/cmd/mesh-delivery-checker-tools/main.go b/modules/mesh-delivery-checker/cmd/mesh-delivery-checker-tools/main.go index eebac0e6..28504499 100644 --- a/modules/mesh-delivery-checker/cmd/mesh-delivery-checker-tools/main.go +++ b/modules/mesh-delivery-checker/cmd/mesh-delivery-checker-tools/main.go @@ -378,7 +378,7 @@ func RequestTools(r check.StateRead) []stdio.Tool { Description: "The composition request a check sent to a node: the composer's whole input for that node (the node-engine's composition input, the case's " + "manifests and verdicts, the seat list), kept exactly as sent so a session reproduces the check's composition (the composer run by hand over the same " + "request gives the check's answer). Kept in the checker's state compositions, per check key (group.heads, the 12-digit heads hash) and node, " + - "0.7 to 0.8 MB each (kept compressed, in pieces that each fit the state's 256 KiB value), for a day (the state's ttl-seconds), the state holding at most 256 MiB (max-mib). With a check and a node, that request whole; with a check, " + + "0.7 to 0.8 MB each (kept compressed, in pieces that each fit the state's 256 KiB value), for 3 days (the state's ttl-seconds), the state holding at most 256 MiB (max-mib, which mesh-grants raises a held bucket to). With a check and a node, that request whole; with a check, " + "the nodes it kept one for; with neither, every kept request, each with its size, digest and when it was kept. Read-only; " + check.RequestsDropTool + " drops a check's.", Input: map[string]any{"type": "object", "properties": map[string]any{ "check": map[string]any{"type": "string", "description": "the check's key, ., as the verdict and composition name it"}, @@ -397,7 +397,7 @@ func RequestDropTools(s check.StateDrop, acts views.HandActs) []stdio.Tool { Description: "Drop the composition requests the checker kept for one check (" + check.RequestsReadTool + " lists them): every node's, and the pieces " + "no other kept request names. The hand act is recorded through the seat mesh-hand-acts first, and a drop whose act could not be recorded is not made. " + "Answers the nodes and pieces dropped. Use it when a check's words say its request could not be kept in the state compositions because it is full; " + - "a request is dropped by the state itself a day after it was kept.", + "the state itself drops a request 3 days after it was kept.", Input: map[string]any{"type": "object", "required": []string{"check", "why"}, "properties": map[string]any{ "check": map[string]any{"type": "string", "description": "the check's key, ., whose kept requests are dropped"}, "why": map[string]any{"type": "string", "description": "why they are dropped, in words; recorded as the hand act"}}}, diff --git a/modules/mesh-delivery-checker/internal/check/requests.go b/modules/mesh-delivery-checker/internal/check/requests.go index 64838a3c..0345ec80 100644 --- a/modules/mesh-delivery-checker/internal/check/requests.go +++ b/modules/mesh-delivery-checker/internal/check/requests.go @@ -26,7 +26,7 @@ import ( // of the check and node holds a small document naming the request's digest, size and number of pieces, and each piece is // a value of its own under RequestChunkKey, of at most RequestChunkBytes. The kept data is the checker's, a foundation // part's, so it stays in the old section `state` (ADR 0619 ยง2) and is read through the tool runner's state read, which -// serves no object store of the old sections. The manifest's ttl-seconds is the lifetime (1 day) of the pointer and of +// serves no object store of the old sections. The manifest's ttl-seconds is the lifetime (3 days) of the pointer and of // every piece and its max-mib the most the state holds (256): the bus drops a value past the one and refuses a put past the // other, so nothing waits on a timer here; a state that is full says so in the check's words, which name RequestsDropTool. A check kept again overwrites the key; // a request whose pieces cannot all be put is refused naming the size (never dropped, never half kept: the pointer is @@ -193,7 +193,7 @@ func unpackRequest(s StateRead, raw []byte) (KeptRequest, []byte, error) { return kept, nil, fmt.Errorf("is no kept request: %w", err) } if kept.V != 2 { - return kept, nil, fmt.Errorf("is a kept request of version %d, which this reader does not read (it reads version 2; an older one is past its lifetime within a day)", kept.V) + return kept, nil, fmt.Errorf("is a kept request of version %d, which this reader does not read (it reads version 2; an older one is past its lifetime within 3 days)", kept.V) } var packed []byte for i := 0; i < kept.Pieces; i++ { diff --git a/modules/mesh-delivery-checker/manifest_test.go b/modules/mesh-delivery-checker/manifest_test.go index 5451f26f..796113f8 100644 --- a/modules/mesh-delivery-checker/manifest_test.go +++ b/modules/mesh-delivery-checker/manifest_test.go @@ -109,7 +109,7 @@ func TestManifestDeclarations(t *testing.T) { // 1678/AC1 t.Errorf("module = %q", m.Module) } // The histories of the checker's four seat states (checked against internal/check names below); the names follow the seat mesh-delivery-checker. - if want := []state{{Name: "asks", History: 1}, {Name: "hearing", History: 1}, {Name: "inputs", TTL: 86400}, {Name: "compositions", TTL: 86400, MaxMiB: 256}, {Name: "kept", History: 1}, {Name: "owed", History: 5}, {Name: "previews", History: 5}, {Name: "tries", History: 1}, {Name: "verdicts", History: 5}, {Name: "first-views", History: 1}, {Name: "findings", History: 1}}; !reflect.DeepEqual(m.State, want) { + if want := []state{{Name: "asks", History: 1}, {Name: "hearing", History: 1}, {Name: "inputs", TTL: 86400}, {Name: "compositions", TTL: 259200, MaxMiB: 256}, {Name: "kept", History: 1}, {Name: "owed", History: 5}, {Name: "previews", History: 5}, {Name: "tries", History: 1}, {Name: "verdicts", History: 5}, {Name: "first-views", History: 1}, {Name: "findings", History: 1}}; !reflect.DeepEqual(m.State, want) { t.Errorf("state = %+v, want %+v", m.State, want) } if want := []string{"mesh-build-go.steps", "mesh-build-go.toolchains", "mesh-build-node.steps", "mesh-build-node.toolchains", diff --git a/modules/mesh-delivery-checker/module.json b/modules/mesh-delivery-checker/module.json index 07d368dd..96a896b3 100644 --- a/modules/mesh-delivery-checker/module.json +++ b/modules/mesh-delivery-checker/module.json @@ -37,7 +37,7 @@ { "name": "asks", "history": 1 }, { "name": "hearing", "history": 1 }, { "name": "inputs", "ttl-seconds": 86400 }, - { "name": "compositions", "ttl-seconds": 86400, "max-mib": 256 }, + { "name": "compositions", "ttl-seconds": 259200, "max-mib": 256 }, { "name": "kept", "history": 1 }, { "name": "owed", "history": 5 }, { "name": "previews", "history": 5 },