Keep a have's sealed values only when they are of what runs, when a waiting-yes have says running again (issue 774, review round 1)

This commit is contained in:
2026-10-31 00:35:22 +01:00
parent 08e9d15817
commit 7bbba2e39e
+6 -1
View File
@@ -1552,7 +1552,12 @@ func (a *Agent) waitsForYes(ctx context.Context, module string, w wantNow, comp
// Composed back to what runs: a have still waiting for a yes for a move since gone says running again, or it waits
// for a yes nobody needs (issue 774, 2026-10-31: four providers stayed waiting-yes once their consumers composed).
if h, ok := a.env.Haves.Read(ctx, module); ok && h.Phase == string(delivery.PhaseWaitingYes) {
a.writeHave(ctx, Have{Module: module, FP: r.FP, Composed: r.Composed, Phase: string(delivery.PhaseRunning), Sealed: h.Sealed})
// Its sealed values only when they are of what runs; else writeHave reads them (sealedOf).
var sealed delivery.Seals
if h.Composed == r.Composed {
sealed = h.Sealed
}
a.writeHave(ctx, Have{Module: module, FP: r.FP, Composed: r.Composed, Phase: string(delivery.PhaseRunning), Sealed: sealed})
}
return false
}