Forget a kept build when its key is written again, and retry data items on the composer's bound (review round 1)
mesh/delivery merged: source.main moved to novox/mesh-host@233bb23bbcb1
mesh/delivery-group group feat/data-items merged: every member is merged
mesh/check pass e031758e4a37 on 6c1f7cc7f50f | unit 4510 run, 4259 kept, 49 skipped | integration 4589 run, 4361 kept, 51 skipped | over bound: unit, …

The builder claims a done key again as a new revision, so a build kept as done is dropped on any
write of its key. Data items that could not be worked out or written stay due and owe a pass after
the growing bound, so a first write refused before the state or grant exists is tried again
without waiting for an unrelated composition.

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
2026-11-01 00:27:29 +01:00
parent 122f4dd727
commit e031758e4a
3 changed files with 55 additions and 12 deletions
+6
View File
@@ -156,6 +156,7 @@ type Composer struct {
// (publishData); dataSaid is the last line said of them. Under mu. dataKept is what this node's keys of the state
// data hold, read once per run, nil before; the loop's alone.
dataDue bool
dataTries int // data runs failed in a row, for oweData's bound
dataSaid string
dataScope frombus.Scope
dataKept map[string][]byte
@@ -309,6 +310,11 @@ func (c *Composer) inputs() []input {
// takeBuildDone says whether a build that landed is one this node composes from: done, of a module it wants at that
// build or whose trunk's build it is. Every other build, and a build not done, moves nothing.
func (c *Composer) takeBuildDone(u agent.Update) bool {
// Any write or delete of a build's key forgets the build kept as done: the builder claims a done key again as a new
// revision (a gone step, issue 1937), which lands done with other artifacts.
c.mu.Lock()
delete(c.builds, u.Key)
c.mu.Unlock()
if u.Deleted {
return false
}