Node agent: compose its own modules from their builds and providers' served keys under its own grant (issue 1126, group fix/1126-node-creds) #153

Merged
mesh-tools merged 6 commits from fix/1126-node-creds into main 2026-10-27 20:32:37 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit d5adf9b72b - Show all commits
+2 -1
View File
@@ -383,6 +383,8 @@ func TestNatsANodeThePlacementNamesComposesAndAppliesItsOwn(t *testing.T) {
b := newItBed(t)
stop, _ := h8(t, b, false)
defer stop()
// 15 s, above link.historyWithin (10 s): the bus's refusal of a publish reaches only the connection's error
// handler (nats.go fails no request on it), so the refused read ends at its own bound, then the node says it.
within(t, 15*time.Second, "the bus did not refuse the served key's read, or the node did not say it", func() bool {
b.mu.Lock()
defer b.mu.Unlock()
@@ -390,7 +392,6 @@ func TestNatsANodeThePlacementNamesComposesAndAppliesItsOwn(t *testing.T) {
selfcompose.ResolvedBucket) && strings.Contains(strings.Join(b.refusals, "\n"), ".it2.mailer.domain") &&
strings.Contains(strings.Join(b.said, "\n"), "what mailer serves on it2 (domain)")
})
t.Logf("DEBUG refusals: %v", b.refusals)
if b.file("web") != "" {
t.Errorf("composed and applied under a grant without the served key: %q", b.file("web"))
}
-1
View File
@@ -640,7 +640,6 @@ func (r reader) Build(ctx context.Context, module, fp string) (*delivery.Builder
return nil, err
}
raw, err := r.c.env.Get(ctx, delivery.BuilderBuildsBucket, key)
r.c.env.Say(fmt.Sprintf("DEBUG build %s: %d bytes err=%v", key, len(raw), err))
if err != nil || raw == nil {
return nil, err
}