Give each node a declaration-files bucket of its own, so a grant names it and never needs a wildcard (issue 1694, ADR 0488) #64

Merged
mesh-tools merged 4 commits from fix/1694-bucket-per-node into main 2026-10-21 15:39:08 +00:00
Showing only changes of commit 216d2b4411 - Show all commits
+9 -7
View File
@@ -137,13 +137,15 @@ func TestTheSharedNames(t *testing.T) {
// 1694/AC6: each node has a bucket of its own, so a grant names it and never needs a `*` (ADR 0486 §2).
func TestEachNodeHasABucketOfItsOwn(t *testing.T) {
b, err := FileBucketFor("g14")
if err != nil || b != "declaration-files-g14" {
t.Fatalf("%q %v", b, err)
}
s, err := FileStreamFor("g14")
if err != nil || s != "OBJ_declaration-files-g14" {
t.Fatalf("%q %v", s, err)
for _, n := range []string{"ace", "g14", "novox", "shanks"} {
b, err := FileBucketFor(n)
if err != nil || b != "declaration-files-"+n {
t.Errorf("bucket for %q: %q %v", n, b, err)
}
s, err := FileStreamFor(n)
if err != nil || s != "OBJ_declaration-files-"+n {
t.Errorf("stream for %q: %q %v", n, s, err)
}
}
for _, bad := range []string{"", "a.b", "a*", "*", ">", "a b", "a>", "a/b", "ä"} {
if _, err := FileBucketFor(bad); err == nil {