From 31c2c5c7fe4075caad7fdb874f9fdac27d09f9da Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 21 Nov 2026 11:43:57 +0100 Subject: [PATCH] Design 47 H1: the indexer retires call-unanswered by the ids it wrote under it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The daemon's call-unanswered keys from before the rename would be seeded and stated by the tool runner's writer, which owns that kind, and never cleared. The retired list now names call-unanswered with the indexer's own id forms (the seed's node-build-.steps, the floor's mesh-catalog.versions-floor., the versions fill's mesh-delivery-builder.builder_versions), so those keys clear once and the tool runner's approval findings stay. Builds: design 47 H H-A-247 (3), H-A-249, G ยง580 --- .../internal/index/finding_kinds_test.go | 25 ++++++++++++++++--- .../internal/index/findings.go | 8 ++++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/modules/mesh-delivery-indexer/internal/index/finding_kinds_test.go b/modules/mesh-delivery-indexer/internal/index/finding_kinds_test.go index 1a6c9114..fe735baf 100644 --- a/modules/mesh-delivery-indexer/internal/index/finding_kinds_test.go +++ b/modules/mesh-delivery-indexer/internal/index/finding_kinds_test.go @@ -178,9 +178,28 @@ func TestFindingKindsHoldEveryKindTheCodeRaises(t *testing.T) { } } // a retired kind is one no code raises and the writer does not own (H-A-247 (3)) - for _, k := range RetiredFindingKinds { - if at, ok := raised[k]; ok || slices.Contains(declared, k) { - t.Errorf("the retired kind %q is still declared or raised (%s)", k, at) + for _, r := range RetiredFindingKinds { + if at, ok := raised[r.Kind]; ok || slices.Contains(declared, r.Kind) { + t.Errorf("the retired kind %q is still declared or raised (%s)", r.Kind, at) } } + // H-A-249: the retired call-unanswered names the ids the indexer's unanswered calls are written under, as in a key + covers := func(id string) bool { + for _, r := range RetiredFindingKinds { + if r.Kind == mcc.KindCallUnanswered && (slices.Contains(r.IDs, id) || + slices.ContainsFunc(r.Prefixes, func(p string) bool { return strings.HasPrefix(id, p) })) { + return true + } + } + return false + } + for _, id := range []string{keyID("node-build-go." + StepsVerb), keyID("node-build-image." + StepsVerb), keyID(floorKey("mesh-tools")), + keyID(BuilderVersionsCall)} { + if !covers(id) { + t.Errorf("the retired call-unanswered does not cover the indexer's id %s", id) + } + } + if covers("mesh-hand-acts.warranted") || covers("ask-1") { + t.Error("the retired call-unanswered covers an id of the tool runner's") + } } diff --git a/modules/mesh-delivery-indexer/internal/index/findings.go b/modules/mesh-delivery-indexer/internal/index/findings.go index 773a2966..faa1fac9 100644 --- a/modules/mesh-delivery-indexer/internal/index/findings.go +++ b/modules/mesh-delivery-indexer/internal/index/findings.go @@ -27,8 +27,12 @@ var FindingKinds = []string{PinMissingKind, OutOfStepKind, PackagesNotPublishedK views.EventUnhandledKind, heard.Kind} // RetiredFindingKinds are kinds no code of the indexer raises any more, which its writer clears once at its start (H-A-247 -// (3)): merge-untaken went with H-A-82. -var RetiredFindingKinds = []string{"merge-untaken"} +// (3)): merge-untaken went with H-A-82; call-unanswered became indexer-call-unanswered (H-A-247 (2)), and since the tool +// runner's writer owns call-unanswered in the same state, only the ids the indexer wrote under it are cleared (H-A-249): +// the seed's .steps (every build seat is named node-build-), the floor's mesh-catalog.versions-floor. +// and the versions fill's mesh-delivery-builder.builder_versions. +var RetiredFindingKinds = []views.RetiredKind{{Kind: "merge-untaken"}, {Kind: mcc.KindCallUnanswered, + IDs: []string{keyID(BuilderVersionsCall)}, Prefixes: []string{"node-build-", keyID(FloorCall) + "."}}} // FindingWriter is the indexer's finding writer, mesh-sdk's held writer of the seat mesh-conditions' generated finding (design // 47 G A-29, A-38): Write raises a finding, Clear clears one, Held answers the findings it holds, so the indexer reads what