Compose each machine in the merge gate with its engine's contract, so moved modules are handed there as on the mesh (issue 969)

This commit is contained in:
fix-969
2026-10-16 23:12:16 +02:00
parent 1cdf12df00
commit 2f2a8bb57e
5 changed files with 61 additions and 1 deletions
+7 -1
View File
@@ -1126,7 +1126,13 @@ func engineTakesHanded(ctx context.Context, inv *inventory.Inventory, node strin
if err != nil {
return false, err
}
return had && stated.Contract >= link.HandedContract, nil
return takesHanded(stated, had), nil
}
// takesHanded is whether a machine's newest statement (had: it ever stated one) is of an engine that writes a
// filled file on the provisioner client's word alone.
func takesHanded(stated inventory.NodeHealth, had bool) bool {
return had && stated.Contract >= link.HandedContract
}
// provisionerAccount is the account the provisioner's client runs as on this machine (novox/hq ADR 0349 §4): the user