H1 refused-at-failed-build: a placed module whose newest build failed is published as a refusal
mesh/delivery merged: source.main moved to novox/mesh-host@df1412081bed
mesh/delivery-group group fix/1966-unpublished-placed-module merged: every member is merged
mesh/check checking 8e993c759a5c on df1412081bed | novox/mesh-host#224 in group fix/1966-unpublished-placed-module

The node-engine writes a refused key, with the build's own error, at the indexer's
fingerprint in composed-<node> for a placed module whose newest build the builder
holds failed; a build queued or running stays unpublished (U1). A failed build of a
placed module's newest fingerprint also moves the pass (takeBuildDone), so the key is
written when it lands (U8).

Builds: design 47 fix-unpublished-placed-module U1, U8, ADR 0593 §6
This commit is contained in:
2026-11-12 16:01:24 +01:00
parent 14c22b4a45
commit 8e993c759a
3 changed files with 88 additions and 16 deletions
+8 -4
View File
@@ -433,7 +433,8 @@ 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 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.
@@ -457,11 +458,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