Merge origin/main into the join: a placed module's failed build said as refused
Brings mesh-host #224 (issue 1966): newestFPs returns a placed module whose newest build failed, composedValues writes its refused key at that fingerprint, takeBuildDone starts the pass on a failed build. Conflict in newestFPs settled by keeping G's by-entries branch first (design 47 G §421, §628: the node reads neither the indexer's modules nor the builder's builds; it returns no failed), and main's failed-build path in the other. Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -501,7 +501,8 @@ func (c *Composer) allInputs() []input {
|
||||
}
|
||||
|
||||
// takeBuildDone says whether a build that landed is one this node composes from: done, of a module it wants at that
|
||||
// build, or wanted or placed here whose trunk's build it is. Every other build, and a build not done, moves nothing.
|
||||
// build, or wanted or placed here whose trunk's build it is; or failed, of a module placed here whose trunk's build it
|
||||
// is, which the node publishes as a refusal (ADR 0593 §6). Every other build 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.
|
||||
@@ -525,11 +526,14 @@ func (c *Composer) takeBuildDone(u agent.Update) bool {
|
||||
c.mu.Unlock()
|
||||
// A module placed here is composed at its trunk's build once that is done, for the composition state, before its
|
||||
// want moves (ADR 0593 §6).
|
||||
if !(wanted && w.Fp == fp) && !((wanted || placedHere) && m.Fp2 == fp) {
|
||||
b, err := builds.DecodeBuilderBuild(u.Value)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
b, err := builds.DecodeBuilderBuild(u.Value)
|
||||
return err == nil && b.State == builds.BuildDone
|
||||
if b.State == builds.BuildFailed {
|
||||
return placedHere && m.Fp2 == fp
|
||||
}
|
||||
return b.State == builds.BuildDone && (wanted && w.Fp == fp || (wanted || placedHere) && m.Fp2 == fp)
|
||||
}
|
||||
|
||||
// Watch starts the composer and answers the compositions it makes: each as a key of `composed-<node>` would be, then a
|
||||
|
||||
Reference in New Issue
Block a user