Let gitea's forge-account provider read the assignments it learns its consumers from (issue 955)
mesh/merge-gate head 065ecd85f53e merged into trunk 734a77f5a91a — pass: builds gitea → novox; no bus step; every machine composes with the change as it di…
mesh/repo-check head 065ecd85f53e merged into trunk 734a77f5a91a — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery delivered

This commit is contained in:
2026-10-16 23:05:10 +00:00
parent 734a77f5a9
commit 065ecd85f5
2 changed files with 25 additions and 0 deletions
@@ -1,6 +1,9 @@
package main
import (
"encoding/json"
"os"
"slices"
"strings"
"testing"
)
@@ -20,3 +23,24 @@ func TestConfigFromEnvNamesWhatIsMissing(t *testing.T) {
t.Fatalf("%v", err)
}
}
// Issue 955: the runtime grants a module only the states its manifest `reads`, and the provider watches the machines'
// keys and, through the SDK's provider, the controller's assignments (where it learns its consumers). Run as the
// bus test does, with every bucket made, a missing grant passes unseen; the manifest is read here instead.
func TestTheManifestReadsEveryStateTheProviderWatches(t *testing.T) {
raw, err := os.ReadFile("../../module.json")
if err != nil {
t.Fatal(err)
}
var m struct {
Reads []string `json:"reads"`
}
if err := json.Unmarshal(raw, &m); err != nil {
t.Fatal(err)
}
for _, state := range []string{"mesh-controller.assignments", "ssh-client.keys"} {
if !slices.Contains(m.Reads, state) {
t.Errorf("gitea's reads %v lack %q, so the runtime refuses its watch", m.Reads, state)
}
}
}