mesh/delivery merged: source.main moved to novox/mesh-delivery@7f412185525e
mesh/delivery-group group fix/1966-seat-reads-bootstrap merged: every member is merged
mesh/check failed (2): mesh-delivery-checker: no published of the tagged version of go-sdk of mesh-delivery…; and 1 more | ee6fd92b4d1a on 7f412185525e
Every reader of the seat list holds the bootstrapped seats from its start (ADR 0636 §2), so a manifest naming one is read by every node-engine whatever its statement names. graph.MissingReads, in the Delivery domain's SDK, is the one rule both holds judge with; mesh-sdk is not changed. ace's engine states no seat, so the want of the node-engine's own build 0bd8cbad (needing mesh-catalog) and of restic (needing node-backup) were held on ace: the engine that would state them could not be delivered. The indexer's hold judges only mesh-wide reads today, so its verdicts do not change; it takes the rule so the two stay one. Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
38 lines
1.4 KiB
Go
38 lines
1.4 KiB
Go
package graph
|
|
|
|
import (
|
|
"slices"
|
|
"strings"
|
|
"sync"
|
|
|
|
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
|
"git.novox.be/novox/mesh-sdk/go/seatlist"
|
|
)
|
|
|
|
// bootstrappedReads are the reader capabilities `seat:<seat>` of the bootstrapped seats: the embedded files' own, so
|
|
// computed once.
|
|
var bootstrappedReads = sync.OnceValue(func() []string {
|
|
var out []string
|
|
for _, d := range seatlist.Bootstrapped() {
|
|
out = append(out, catalogue.ReadSeat+d.Seat)
|
|
}
|
|
return out
|
|
})
|
|
|
|
// MissingReads is catalogue.MissingManifestReads with every need of a bootstrapped seat counted as read (novox/hq ADR 0614
|
|
// §4, ADR 0636 §2): every reader of the seat list holds the bootstrapped seats from its start, before it has read the list,
|
|
// so a manifest naming one is read by every node-engine whatever its statement names. Without it an engine whose statement
|
|
// was made before its list was in use states no seat, and the node-engine's own build naming mesh-catalog is held on the
|
|
// very engine that would state it (issue 1966). The assigner's capability hold and the indexer's hold both judge with it,
|
|
// so the rule is one.
|
|
func MissingReads(needs, stated []string) []string {
|
|
boot := bootstrappedReads()
|
|
missing := slices.DeleteFunc(catalogue.MissingManifestReads(needs, stated), func(n string) bool {
|
|
return strings.HasPrefix(n, catalogue.ReadSeat) && slices.Contains(boot, n)
|
|
})
|
|
if len(missing) == 0 {
|
|
return nil
|
|
}
|
|
return missing
|
|
}
|