The node composes again only when what it composes from changed, so a want, placement, module or value written again asks the vault nothing (issue 774)
mesh/delivery merged: source.main moved to novox/mesh-host@bb8383b065a1
mesh/check being carried to da0f8f1cfdb4 on bb8383b065a1 | from 62b211bb6040

Every put under want.<node>.>, every module's take-in and every placement write
made a pass, and each pass asked the vault for the node's own secrets. The
shadow's change check moves onto the composer, gains the want (by its
fingerprint, the only part composed) and serves both loops.
This commit is contained in:
2026-10-31 01:59:58 +01:00
parent 62b211bb60
commit da0f8f1cfd
3 changed files with 97 additions and 52 deletions
+35 -1
View File
@@ -546,6 +546,40 @@ func TestTheNodeComposesItsWantsFromTheBus(t *testing.T) {
t.Errorf("%s: a pass made %v, want %v", row.name, got, row.pass)
}
}
// Issue 774, 2026-10-31: every put under want.n1.> made a pass, and each pass asked the vault for the node's own
// secrets. A key written again with what it held, or a want whose words moved and not its build, makes none.
worded, _ := delivery.EncodeWant(delivery.Want{FP: fp, Self: true, Words: "lemurs is held at aaaaaaaaaaaa"})
elsewhere, _ := delivery.EncodeWant(delivery.Want{FP: delivery.SourcePrefix2 + strings.Repeat("e", 64), Self: true})
for _, row := range []struct {
name, bucket, key string
value []byte
pass bool
}{
{"lemurs's want again", delivery.AssignerWantsBucket, "want.n1.lemurs", want, false},
{"the node's own want again", delivery.AssignerWantsBucket, "want.n1.node", nodeWant, false},
{"lemurs's want with other words", delivery.AssignerWantsBucket, "want.n1.lemurs", worded, false},
{"the placement again", delivery.PlacementBucket, "placement.n1", place, false},
{"lemurs's module again", delivery.ModulesBucket, "lemurs", mod, false},
{"lemurs's want at another build", delivery.AssignerWantsBucket, "want.n1.lemurs", elsewhere, true},
{"lemurs's want back at its build", delivery.AssignerWantsBucket, "want.n1.lemurs", want, true},
} {
before := passes()
b.put(t, row.bucket, row.key, row.value)
if !row.pass {
quiet(t, out)
} else {
for done := false; !done; {
select {
case <-out:
case <-time.After(200 * time.Millisecond):
done = true
}
}
}
if got := passes() > before; got != row.pass {
t.Errorf("%s: a pass made %v, want %v", row.name, got, row.pass)
}
}
// And today's sequence whole: tool runs at its old build; its want and the trunk move to a build not yet done, and
// the node holds tool, keeping what runs, naming why; the build lands, and with no other change tool is handed at it.
{
@@ -629,7 +663,7 @@ func TestTheNodeComposesItsWantsFromTheBus(t *testing.T) {
b.mu.Lock()
n := 0
for _, s := range b.said {
if strings.Contains(s, "lemurs is wanted at") {
if strings.Contains(s, "lemurs is wanted at "+gone) {
n++
}
}