From 6c47ffcf8fe44ea5bed596c3b1d40afd904a9a0d Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 14 Nov 2026 03:20:47 +0100 Subject: [PATCH] Indexer: a single * in invokes declares the verb revision (A-390) The verb revision's callers rule matched seat:mesh-catalog.revision by exact text only; the grants part reads a single * as every seat verb, so node-tools was refused. Match that reading; the holder stays off the list. Builds: design 47 G, lead answer A-390 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- .../mesh-delivery-indexer/internal/index/revision_verb.go | 5 +++-- .../mesh-delivery-indexer/internal/index/toolchains_test.go | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/mesh-delivery-indexer/internal/index/revision_verb.go b/modules/mesh-delivery-indexer/internal/index/revision_verb.go index 3a0d48e0..5f4d82b9 100644 --- a/modules/mesh-delivery-indexer/internal/index/revision_verb.go +++ b/modules/mesh-delivery-indexer/internal/index/revision_verb.go @@ -18,11 +18,12 @@ import ( const RevisionInvoke = "seat:" + meshcatalog.Seat + "." + meshcatalog.VerbRevision // RevisionCallers are the parts the newest trunk revision's entries say declare the verb revision in their invokes, -// sorted, the holder itself never among them (ADR 0663 §2: granted to exactly the parts that declare it). +// sorted, the holder itself never among them (ADR 0663 §2: granted to exactly the parts that declare it). A single `*` +// in invokes declares every seat verb, as the grants part reads it (A-390). func RevisionCallers(entries []meshcatalog.CatalogEntry, holder string) stdio.Callers { var out stdio.Callers for _, e := range entries { - if e.Module != holder && slices.Contains(e.Invokes, RevisionInvoke) { + if e.Module != holder && (slices.Contains(e.Invokes, RevisionInvoke) || slices.Contains(e.Invokes, "*")) { out = append(out, e.Module) } } diff --git a/modules/mesh-delivery-indexer/internal/index/toolchains_test.go b/modules/mesh-delivery-indexer/internal/index/toolchains_test.go index 67fca1d2..7b09f69d 100644 --- a/modules/mesh-delivery-indexer/internal/index/toolchains_test.go +++ b/modules/mesh-delivery-indexer/internal/index/toolchains_test.go @@ -622,6 +622,9 @@ func TestBasesAreComputedFirstAndNoFingerprintTakesTheBuilder(t *testing.T) { // if declares[name] { e.Invokes = []string{RevisionInvoke} } + if name == "avahi" && rev.Kind == "trunk" { + e.Invokes = []string{"*"} // A-390: a single `*` declares every seat verb, as the grants part reads it + } data, _ := json.Marshal(e) digest := fmt.Sprintf("%s-%d-%s", rev.Kind, rev.Revision, name) entries[digest] = data @@ -636,7 +639,7 @@ func TestBasesAreComputedFirstAndNoFingerprintTakesTheBuilder(t *testing.T) { // } keep(meshcatalog.CatalogRevision{Revision: 3, Kind: "trunk"}, map[string]bool{"node-tools": true, testSelf: true}) keep(meshcatalog.CatalogRevision{Revision: 4, Kind: "candidate", Group: "feat/x", Heads: "0123456789ab"}, map[string]bool{"node-tools": true, "mesh-grants": true}) - for caller, answered := range map[string]bool{"n1.node-tools": true, "n1.mesh-grants": false, "n1." + testSelf: false, "person.someone": false, "unproven": false} { + for caller, answered := range map[string]bool{"n1.node-tools": true, "n1.avahi": true, "n1.mesh-grants": false, "n1." + testSelf: false, "person.someone": false, "unproven": false} { got, err := Revision(context.Background(), verbObjects, testSelf, caller, meshcatalog.RevisionInput{}) if (err == nil) != answered || (answered && (got.Revision.Revision != 3 || len(got.Entries) != 4 || got.Next != "")) { t.Errorf("revision to %s answered %+v (%v), want answered %v with trunk revision 3 whole", caller, got, err, answered)