Node-engine: judge a move's data forms from the entry kept of the running build; no endless handing again

The running build's entry stays held (kept in the composition state) while the node runs it, though the catalog half dropped it; the agent no longer tells the composer it waits for a composition it holds, and the composer hands again when the entry answers.

Builds: design 47 G §296, §297, A-113, §614
This commit is contained in:
2026-11-16 19:59:20 +01:00
parent 869d15e6d3
commit f8f33e54a7
4 changed files with 89 additions and 3 deletions
+31
View File
@@ -311,3 +311,34 @@ func runningModuleWithoutEntryStandsAsTheNewestBuild(t *testing.T) {
})
}
}
// The node judges a move's data forms from the entry it kept of the build it runs, though the catalog half dropped that entry and no
// running event names it; and an answered entry has the composition handed again, which the agent waits on (novox, mesh-hand-acts).
func TestRunningBuildEntryKeptAndHandedAgain(t *testing.T) {
old := meshcatalogclient.SourcePrefix2 + strings.Repeat("1", 64)
next := meshcatalogclient.SourcePrefix2 + strings.Repeat("2", 64)
env := newFakeBus().env()
env.Node = "n1"
env.Running = func() []compositions.Composed {
return []compositions.Composed{{Node: "n1", Module: "hand", FP: old}}
}
c := New(env)
c.mu.Lock()
c.wants["hand"] = meshwants.WantsByWantNodeModuleValue{Fp: next}
c.mu.Unlock()
if named, ok := c.wantedBuilds()[old]; !ok || named {
t.Errorf("the running build %s is asked of no want yet kept: %v, %v", old, named, ok)
}
key, _ := compositions.Key("n1", "hand", next)
c.mu.Lock()
c.handed[key] = "d"
c.mu.Unlock()
c.entryChanged(meshcatalogclient.EntryRow{Fingerprint: old, State: meshcatalogclient.EntryAnswered,
Entry: &meshcatalog.CatalogEntry{Module: "hand", Fp: old}})
c.mu.Lock()
_, still := c.handed[key]
c.mu.Unlock()
if still {
t.Error("an entry of the running build was answered, and the composition was not handed again")
}
}