From 70ac4ff79a70c9a24c5380e125729cb86f5126e1 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 3 Nov 2026 18:41:10 +0100 Subject: [PATCH] =?UTF-8?q?The=20indexer's=20integration=20test=20expects?= =?UTF-8?q?=20a=20field=20from=20later=20to=20wait,=20not=20be=20refused,?= =?UTF-8?q?=20while=20no=20engine=20says=20which=20build=20runs=20(ADR=200?= =?UTF-8?q?601=20=C2=A73)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01JG73KG7AfSdh6FP8VrBqCn --- .../mesh-delivery-indexer/integration_test.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/integration_test.go b/modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/integration_test.go index 5685dc01..a28b8db5 100644 --- a/modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/integration_test.go +++ b/modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/integration_test.go @@ -229,7 +229,7 @@ func TestIndexerWritesModulesAtAMerge(t *testing.T) { // 1239/AC9; I1, I3: the m // its inputs and the reason it has no fingerprint of the new form, and manifests. with the manifest byte for byte. // // And it judges them (novox/hq ADR 0578, issue 1585): with three manifests more, one valid, one refused and one with a -// field the decoder does not know, mesh-sdk's bus reader read before the indexer judged composes all three, the field set +// field the decoder does not know (it waits, ADR 0601 §3), mesh-sdk's bus reader read before the indexer judged composes all three, the field set // aside and named (a missing verdict is accepted, §3); the indexer writes the three verdicts, says manifest-refused for // each refusal, and the reader then composes the valid one and holds the others, named, never ending its read. func TestIndexerKeepsManifestsAtAMerge(t *testing.T) { // 1444/AC4, 1449/AC4, 1585 @@ -300,7 +300,7 @@ func TestIndexerKeepsManifestsAtAMerge(t *testing.T) { // 1444/AC4, 1449/AC4, 15 if err != nil { t.Fatal(err) } - want := map[string]string{"good": delivery.VerdictAccepted, "bad": delivery.VerdictRefused, "later": delivery.VerdictRefused} + want := map[string]string{"good": delivery.VerdictAccepted, "bad": delivery.VerdictRefused, "later": delivery.VerdictManifestWaits} got := map[string]delivery.ManifestVerdict{} for deadline := time.Now().Add(10 * time.Second); time.Now().Before(deadline) && len(got) < len(want); time.Sleep(50 * time.Millisecond) { for name := range want { @@ -316,10 +316,12 @@ func TestIndexerKeepsManifestsAtAMerge(t *testing.T) { // 1444/AC4, 1449/AC4, 15 t.Errorf("the verdict on %s = %+v within 10 s, want %s by the running judge", name, v, state) } } - if !strings.Contains(strings.Join(got["bad"].Problems, " "), `provides "amqp"`) || !strings.Contains(strings.Join(got["later"].Problems, " "), "a-field-from-later") { - t.Errorf("the refusals name no problem: %+v", got) + // ADR 0601 §3: the field this judge does not know waits and is named, since no node-engine answers which build of the + // indexer runs here (the unit tests of the index package prove it refused once that build is the trunk's). + if !strings.Contains(strings.Join(got["bad"].Problems, " "), `provides "amqp"`) || strings.Join(got["later"].Unknown, " ") != "a-field-from-later" { + t.Errorf("the refusal names no problem or the wait no field: %+v", got) } - // manifest-refused, said once for each refusal. + // manifest-refused, said once for each refusal (a wait is no refusal). events, err := js.Stream(ctx, "INDEXER_EVENTS") if err != nil { t.Fatal(err) @@ -335,8 +337,8 @@ func TestIndexerKeepsManifestsAtAMerge(t *testing.T) { // 1444/AC4, 1449/AC4, 15 said[r.Module] = true } } - if !said["bad"] || !said["later"] || said["good"] { - t.Errorf("manifest-refused said for %v, want bad and later", said) + if !said["bad"] || said["later"] || said["good"] { + t.Errorf("manifest-refused said for %v, want bad only", said) } // How a composer holds a refused module by these verdicts is the node-engine's to test (ADR 0593 §7: the composer // and its bus reader are its own).