From 23226384e52933586a8ad7bf786ac48a0e9401d3 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 26 Oct 2026 13:27:27 +0100 Subject: [PATCH] Answer the indexer's trunk value at the trunk's commit alone in the declarations test, so its take-in records mesh-host's build (issue 1945) The stub answered the trunk for every commit, so since registering on the fingerprint (666d1b68, #465) mesh-host, registered at an older commit, looked already at the trunk's fingerprint: the take-in only moved its commit, no build was recorded, and the fingerprints never named the new node-engine. The real indexer holds no value at a commit it never indexed. (cherry picked from commit 779533764bc0b1e8704566f9aa99a9e7564ac2ef) --- cmd/mesh-controller/composed_integration_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/mesh-controller/composed_integration_test.go b/cmd/mesh-controller/composed_integration_test.go index 28d7cc41..b07958ba 100644 --- a/cmd/mesh-controller/composed_integration_test.go +++ b/cmd/mesh-controller/composed_integration_test.go @@ -13,6 +13,7 @@ import ( "github.com/nats-io/nats.go/jetstream" "github.com/novox/mesh-controller/internal/broker" + "github.com/novox/mesh-controller/internal/builderkeys" "github.com/novox/mesh-controller/internal/identity" "github.com/novox/mesh-controller/internal/link" "github.com/novox/mesh-controller/internal/testbus" @@ -76,13 +77,18 @@ func aComposingMesh(t *testing.T) *composingMesh { return m } -// trunkKeys are a done key and the indexer's trunk value naming it. +// trunkKeys are a done key and the indexer's trunk value naming it. The indexer holds that value at the trunk's commit +// alone, as the real one does: answering it for any commit made a module registered at an older commit look already +// registered at the trunk's fingerprint, so the take-in only moved its commit and recorded no build (issue 1945). type trunkKeys struct { keyBuckets trunk sdkdelivery.Module } -func (k trunkKeys) ModuleAt(context.Context, string, string) (sdkdelivery.Module, error) { +func (k trunkKeys) ModuleAt(_ context.Context, _ string, commit string) (sdkdelivery.Module, error) { + if commit != "" && !sameCommitID(commit, k.trunk.Commit) { + return sdkdelivery.Module{}, builderkeys.ErrNoValue + } return k.trunk, nil }