Judge the catalogue's manifests against the predefined list, and put merge-check.sh back as main has it (issue 914)

The seats test I moved to internal/ownmanifest parsed each catalogue manifest alone, so claude-code's managed_settings and dunst's font-size, which fall back to a predefined key, were refused where the check clones the catalogue beside (ADR 0348 section 7). It reads them with ReadTreeManifest from the catalogue's root, as the tests that issue 914 fixed do. merge-check.sh differed from main in a comment only; it is main's again.
This commit is contained in:
2026-10-20 10:08:41 +00:00
parent 7d949f888f
commit 157d1599b4
2 changed files with 17 additions and 8 deletions
+15 -6
View File
@@ -19,16 +19,25 @@ func TestEveryManifestInUseClaimsASeatTheMeshDefines(t *testing.T) {
if len(paths) == 0 {
t.Fatal("no manifests in the catalogue, so this proved nothing")
}
root := beside.Dir(t, "mesh-catalog")
paths = append(paths, "../../module.json")
var checked int
for _, path := range paths {
raw, err := os.ReadFile(path)
if err != nil {
t.Fatal(err)
}
// The SDK's claimProblems is unexported; the parser runs it on every manifest whose claims are well formed
// (go/catalogue manifest.go), so a manifest that parses claims only seats the mesh defines or declares.
m, err := catalogue.ParseManifest(raw)
// (go/catalogue manifest.go), so a manifest that parses claims only seats the mesh defines or declares. A
// catalogue manifest is judged as the merge check judges it, against the predefined list at the root of the tree it
// is read in (ADR 0348 §7, issue 914); this repository's own is judged alone.
var m catalogue.Manifest
var err error
if path == "../../module.json" {
var raw []byte
if raw, err = os.ReadFile(path); err != nil {
t.Fatal(err)
}
m, err = catalogue.ParseManifest(raw)
} else {
m, err = catalogue.ReadTreeManifest(root, filepath.Dir(path))
}
if err != nil {
t.Errorf("%s: %v", path, err)
continue