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 c011be826..d0e7eab71 100644 --- a/modules/mesh-delivery-indexer/internal/index/finding_kinds_test.go +++ b/modules/mesh-delivery-indexer/internal/index/finding_kinds_test.go @@ -177,9 +177,10 @@ func TestFindingKindsHoldEveryKindTheCodeRaises(t *testing.T) { t.Errorf("%s: the code raises the finding kind %q, which the writer's list FindingKinds does not declare", at, k) } } - // a retired kind is one no code raises and the writer does not own (H-A-247 (3)) + // a retired kind is one no code raises and the writer does not own (H-A-247 (3)); an entry naming only ids clears those ids + // of a kind still raised (H2 H-A-558 (3)) for _, r := range RetiredFindingKinds { - if at, ok := raised[r.Kind]; ok || slices.Contains(declared, r.Kind) { + if at, ok := raised[r.Kind]; (ok || slices.Contains(declared, r.Kind)) && (len(r.IDs) == 0 || len(r.Prefixes) > 0) { t.Errorf("the retired kind %q is still declared or raised (%s)", r.Kind, at) } } @@ -199,6 +200,15 @@ func TestFindingKindsHoldEveryKindTheCodeRaises(t *testing.T) { t.Errorf("the retired call-unanswered does not cover the indexer's id %s", id) } } + // H2 H-A-558 (3): the versions fill's indexer-call-unanswered of builder_versions is cleared, and no other id of the kind + ownCovers := func(id string) bool { + return slices.ContainsFunc(RetiredFindingKinds, func(r views.RetiredKind) bool { + return r.Kind == CallUnansweredKind && r.Scope == mcc.ScopeCall && slices.Contains(r.IDs, id) + }) + } + if !ownCovers(keyID("mesh-delivery-builder.builder_versions")) || ownCovers(keyID("node-build-go."+StepsVerb)) { + t.Error("the retired indexer-call-unanswered covers not only builder_versions") + } // the approval gate's findings: scope machine, id =2e if covers("machine", "novox=2eask-1") || covers("machine", "node-build-go.steps") || covers(mcc.ScopeCall, "novox=2eask-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 bda317b18..c3b7d84a2 100644 --- a/modules/mesh-delivery-indexer/internal/index/findings.go +++ b/modules/mesh-delivery-indexer/internal/index/findings.go @@ -32,7 +32,10 @@ var FindingKinds = []string{TakeInWaitingKind, PinMissingKind, OutOfStepKind, Pa // 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, Scope: mcc.ScopeCall, - IDs: []string{keyID("mesh-delivery-builder.builder_versions")}, Prefixes: []string{"node-build-", keyID("mesh-catalog.versions-floor") + "."}}} // the floor went at design 47 H §756 + IDs: []string{keyID("mesh-delivery-builder.builder_versions")}, Prefixes: []string{"node-build-", keyID("mesh-catalog.versions-floor") + "."}}, // the floor went at design 47 H §756 + // The versions fill's indexer-call-unanswered of builder_versions went with the fill (design 47 H2 H-A-552, H-A-558 (3)): + // only its id is cleared, the kind being raised still. + {Kind: CallUnansweredKind, Scope: mcc.ScopeCall, IDs: []string{keyID("mesh-delivery-builder.builder_versions")}}} // 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