From 8f0150bba28a432d1799e5add0a682f14b7955b8 Mon Sep 17 00:00:00 2001 From: mesh-tools Date: Tue, 20 Oct 2026 07:06:17 +0000 Subject: [PATCH] Grant a consumer on the provider's own node too: a need answered on the same machine has its secret made before the grants are read (review round 2, item 2). The test failed first; the suite is 1259 tests in 1.05 s --- go/compose/credentials.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/go/compose/credentials.go b/go/compose/credentials.go index 8d60fc4..ece4226 100644 --- a/go/compose/credentials.go +++ b/go/compose/credentials.go @@ -114,7 +114,7 @@ func (c *composer) grantsFor(node string) ([]catalogue.Grant, []catalogue.Overfl // rowsFor is every pair credential this node's declaration must carry a grant for, in the order the controller reads them // (SecretsFrom: by provision, consumer, consumer module and local name): the ones the Input says were made, and the ones the same send -// would make before it composes this node -- every need of another node that resolves, whose provider is this node, that is not +// would make before it composes this node -- every need of a node that resolves (this one too), whose provider is this node, that is not // answered by a record and not a credential only a person gives and nobody gave. Those have no sealed copy (ForProvider empty), so the // grant is composed with a stand-in and named foreseen (plan.go: planFor makes the secret in every mode before grantsFor reads it). func (c *composer) rowsFor(node string) ([]Issued, error) { @@ -125,13 +125,9 @@ func (c *composer) rowsFor(node string) ([]Issued, error) { } } for _, other := range c.in.sorted() { - if other.Name == node { - continue - } resolved, err := c.planFor(other.Name) switch { - case unresolvable(err): - continue + case unresolvable(err): continue case err != nil: return nil, fmt.Errorf("what %s asked of %s cannot be read: %w", other.Name, node, err) }