G1: the grants part's tests read no verdicts and no callers
The root package's tests and the part's whole test no longer write or read the indexer's verdicts: a value whose verdict field says refused is composed as ever (a module in a revision is accepted by being there), and a held module is one whose manifest the part cannot read. The verdicts' first view row reads the four first views; the no-verdict window and the want's newest build rows go; the compare rows carry the denies every account now has, being granted every verb of every seat; the seat list's again tool's caller row goes with the callers; the captured nats manifest consumes catalog-revision, as the catalog's does, not the retired manifest-accepted. Builds: design 47 H §745, §752, §764 (every seat contract: the callers lists); lead answers H-A-66, H-A-79, H-A-113 (hq f599b761) Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -32,7 +32,6 @@ import (
|
||||
"git.novox.be/novox/mesh-sdk/go/membership"
|
||||
"git.novox.be/novox/mesh-sdk/go/process"
|
||||
"git.novox.be/novox/mesh-sdk/go/seal"
|
||||
"git.novox.be/novox/mesh-sdk/go/seatlist"
|
||||
"git.novox.be/novox/mesh-sdk/go/views"
|
||||
|
||||
"mesh-grants/internal/buscompose"
|
||||
@@ -108,8 +107,6 @@ func TestTheGrantsPartWhole(t *testing.T) {
|
||||
put(grants.ReadManifests, digest, meshcatalog.ManifestsByDigestValue{V: keys.Version, Module: module, Manifest: raw})
|
||||
put(grants.ReadModules, module, meshcatalog.ModulesByModuleValue{V: keys.Version, Fp2: "src2:" + strings.Repeat("ab", 32), Manifest: digest,
|
||||
Repository: "novox/x", Commit: "c"})
|
||||
verdict, _ := meshcatalogclient.EncodeVerdict(meshcatalog.VerdictsByDigestValue{Module: module, State: meshcatalogclient.VerdictAccepted, Judge: "j", At: new(time.Now())})
|
||||
put(grants.ReadVerdicts, digest, json.RawMessage(verdict))
|
||||
}
|
||||
manifest("nats", `{"module":"nats","version":"1","claims":[{"name":"mesh-broker"}],"own-secrets":{"broker":"/var/lib/nats/broker"},`+
|
||||
`"emits":["created","done","dropped","recreated"],"streams":[{"name":"broker-events","events":["created","dropped","recreated"],"max-age-days":30,"max-mib":256}]}`)
|
||||
@@ -543,16 +540,6 @@ func TestTheGrantsPartWhole(t *testing.T) {
|
||||
t.Errorf("the bucket %s: %v, want none", bucket, err)
|
||||
}
|
||||
}
|
||||
// Issue 1966: the seat list's again tool answers an operator's session, which the mesh MCP server proves as its
|
||||
// machine's tool runner (issue 627), and the healers; no other module.
|
||||
t.Run("the seat list's again tool answers an operator's session", func(t *testing.T) {
|
||||
for caller, refused := range map[string]bool{"person.jochen": false, "shanks.node-tools": false, "ace.mesh-healers": false,
|
||||
"ace.messenger": true} {
|
||||
if err := seatlist.Refusal(grants.ToolSeatListAgain, seatListAgainCallers, caller); (err != nil) != refused {
|
||||
t.Errorf("%s: refused=%v, err %v", caller, refused, err)
|
||||
}
|
||||
}
|
||||
})
|
||||
// ADR 0640 §5: the real additions change the subjects and the filters and nothing else, and recreate nothing.
|
||||
t.Run("adding subjects and filters changes only those", func(t *testing.T) {
|
||||
stream, err := js.CreateStream(ctx, jetstream.StreamConfig{Name: "ADDS", Subjects: []string{"a.>"}, MaxAge: time.Hour, MaxMsgs: 100,
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"mesh-delivery-indexer.indexer_bus_state"
|
||||
],
|
||||
"consumes": [
|
||||
"mesh-catalog.manifest-accepted"
|
||||
"mesh-catalog.catalog-revision"
|
||||
],
|
||||
"uses": [
|
||||
"operator-channel"
|
||||
|
||||
Reference in New Issue
Block a user