E1: read another part's values tolerantly

The generated decoders keep unknown fields and return the form read, so
a want the assigner writes with run, or any field added later, is applied
rather than refused: the node-engine that reads run runs before the
assigner writes it.

Builds: design 47 H2 §780; §813 (1) (the edge)
This commit is contained in:
2026-11-21 23:18:48 +01:00
parent 38447a66b8
commit 53d5c8b20f
5 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ func (s *Shadow) composeCandidate(ctx context.Context, c *Composer, ask nodeengi
if raw == nil {
return refuse("the indexer holds no candidate " + ask.Candidate)
}
cand, err = meshcatalog.DecodeCandidatesByGroupValue(raw)
cand, _, err = meshcatalog.DecodeCandidatesByGroupValue(raw)
if err != nil {
return refuse(fmt.Sprintf("the indexer's candidate %s cannot be read: %v", ask.Candidate, err))
}
+1 -1
View File
@@ -898,7 +898,7 @@ func (c *Composer) takeWantLocked(u agent.Update) string {
delete(c.notTaken, module)
delete(c.keptWants, module)
c.dropForgottenLocked(module) // its next want asks again what a failed fetch made it forget (H-A-146)
w, err := meshwants.DecodeWantsByWantNodeModuleValue(u.Value)
w, _, err := meshwants.DecodeWantsByWantNodeModuleValue(u.Value)
if u.Deleted || err != nil || w.Removed || w.Fp == "" {
delete(c.wants, module)
switch {
+1 -1
View File
@@ -332,7 +332,7 @@ func (s *Shadow) takeCandidate(u agent.Update) bool {
}
return true
}
c, err := meshmoduleassigner.DecodeCandidatesByProposalNodeValue(u.Value)
c, _, err := meshmoduleassigner.DecodeCandidatesByProposalNodeValue(u.Value)
if err != nil || c.Proposal != proposal || (c.Assignments != nil && c.Assignments.Node != node) {
// Not one: read as gone.
if _, ok := s.candidates[proposal][node]; ok {