The nats keeper takes the removal grant from the grants part's published busgrants package and names it in packages (ADR 0634 §4; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 17:03:28 +01:00
parent bbcc95e66d
commit 1f3a293988
4 changed files with 17 additions and 6 deletions
+9 -3
View File
@@ -41,9 +41,10 @@ func TestTheBussManifestMountsItsProgramsIntoTheUpstreamImage(t *testing.T) {
Form string `json:"form"`
} `json:"credential"`
} `json:"provides"`
Tools []string `json:"tools"`
Emits []string `json:"emits"`
Resources []map[string]any `json:"resources"`
Packages map[string]string `json:"packages"`
Tools []string `json:"tools"`
Emits []string `json:"emits"`
Resources []map[string]any `json:"resources"`
Build struct {
On any `json:"on"`
Artifacts []artifact `json:"artifacts"`
@@ -52,6 +53,11 @@ func TestTheBussManifestMountsItsProgramsIntoTheUpstreamImage(t *testing.T) {
if err := json.Unmarshal(raw, &m); err != nil {
t.Fatal(err)
}
// The removal grant the tests compose is the grants part's published package busgrants (series 0.1), which the
// manifest names so the build resolves it (ADR 0634 §4).
if m.Packages["busgrants"] != "0.1" {
t.Errorf("packages = %v, want busgrants at 0.1", m.Packages)
}
// The bus provides "bus-state" beside "mesh-bus" (ADR 0614 §5): a module whose manifest keeps bus state requires it.
provided := map[string]string{}
for _, p := range m.Provides {
+3 -3
View File
@@ -12,7 +12,7 @@ import (
"testing"
"time"
"git.novox.be/novox/mesh-sdk/go/buscompose"
"git.novox.be/novox/mesh-delivery/modules/mesh-grants/busgrants"
"git.novox.be/novox/mesh-sdk/go/catalogue"
"github.com/nats-io/nats-server/v2/server"
"github.com/nats-io/nats.go"
@@ -27,9 +27,9 @@ import (
func TestTheRemovalToolsChangeOnlyWhatTheyAreAskedAndTheGrantAllows(t *testing.T) {
dir := t.TempDir()
conf := filepath.Join(dir, "nats.conf")
// Issue 1126 B5: the tools' grant as the mesh composes it for this module's word (mesh-sdk BusRemovalGrants), never
// Issue 1126 B5: the tools' grant as the mesh composes it for this module's word (the grants part's busgrants.BusRemovalGrants), never
// a list written here, so the test proves the composed grant is enough and no wider.
grants, err := buscompose.BusRemovalGrants([]string{catalogue.RemovesControllerLeftovers, catalogue.RemovesEngineActs},
grants, err := busgrants.BusRemovalGrants([]string{catalogue.RemovesControllerLeftovers, catalogue.RemovesEngineActs},
[]string{"novox"})
if err != nil {
t.Fatal(err)
+2
View File
@@ -3,6 +3,7 @@ module nats-tools
go 1.26.0
require (
git.novox.be/novox/mesh-delivery/modules/mesh-grants/busgrants v0.0.0-00010101000000-000000000000
git.novox.be/novox/mesh-delivery/contracts/go/seats/meshcatalog v0.0.0-00010101000000-000000000000
git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshhandactsclient v0.0.0-00010101000000-000000000000
git.novox.be/novox/mesh-contracts/operator-and-conversation/go/clients/operatorchannelclient v0.0.0-00010101000000-000000000000
@@ -15,6 +16,7 @@ require (
)
require (
git.novox.be/novox/mesh-delivery/modules/mesh-grants/busgrants v0.0.0-00010101000000-000000000000
git.novox.be/novox/mesh-delivery/contracts/go/seats/meshcatalog v0.0.0-00010101000000-000000000000
git.novox.be/novox/mesh-contracts/go v0.0.0-20261104174344-ae5266e77639 // indirect
github.com/antithesishq/antithesis-sdk-go v0.8.0-default-no-op // indirect
+3
View File
@@ -1,6 +1,9 @@
{
"module": "nats",
"version": "1",
"packages": {
"busgrants": "0.1"
},
"upgrade": {
"policy": "record",
"why": "the bus keeps the streams of the whole mesh: each move waits for a person's yes, which the operator's Approve of the release that carries its build gives, and its node backs its streams up before it applies (hq ADR 0236, ADR 0601)"