An own-path merge never shares a batch with a catalogue merge, and plans names a walk by what it moves (tracker issues 377, 378) #200

Merged
mesh-admin merged 3 commits from fix/377-378-own-path-batches-and-named-plan-lines into main 2026-10-10 13:14:37 +00:00
Showing only changes of commit 16362e1bbd - Show all commits
+8 -4
View File
@@ -465,12 +465,16 @@ func startedBeside(ctx context.Context, inv *inventory.Inventory, id string, cre
return "", nil
}
// deferredNote begins the note of a walk deferred behind another.
const deferredNote = "let go; starts once "
// deferred says a walk has its word and has not started: let go while another walk was started, it waits for
// that one to end (startedBeside). Read as a wait, not as a tier running late: `plans` and `status` say its
// note, and S3 leaves it out.
// that one to end (startedBeside), and its note says so. Read as a wait, not as a tier running late: `plans`
// and `status` say its note, and S3 leaves it out. A let-go walk whose first ask failed carries that error as
// its note instead, and is watched as before.
func deferred(p inventory.Plan) bool {
return p.Open() && p.Release == nil && p.Tier == 0 && !askedAny(p) && p.Delivery != nil &&
p.Delivery.Awaits != "" && p.Delivery.Go != nil
p.Delivery.Awaits != "" && p.Delivery.Go != nil && strings.HasPrefix(p.Note, deferredNote)
}
// askedAny says a plan asked any module.
@@ -621,7 +625,7 @@ func advanceOnce(ctx context.Context, open *stores, p *inventory.Plan,
if behind, err := startedBeside(ctx, inv, p.ID, p.Created); err != nil {
return false, err
} else if behind != "" {
note := fmt.Sprintf("let go; starts once %s ended — one walk at a time", behind)
note := fmt.Sprintf("%s%s ended — one walk at a time", deferredNote, behind)
changed := p.Note != note
p.Note = note
return changed, nil