From 3742a7c54c9d7489d3ce795f48037dbb95965185 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 5 Nov 2026 21:22:50 +0100 Subject: [PATCH] The description of grants_assert says a held stream gains the subjects a manifest adds (issue 1921) Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i --- modules/mesh-grants/cmd/mesh-grants/main.go | 2 +- modules/mesh-grants/cmd/mesh-grants/tools.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/mesh-grants/cmd/mesh-grants/main.go b/modules/mesh-grants/cmd/mesh-grants/main.go index 9cfc0c70..1c95e3e4 100644 --- a/modules/mesh-grants/cmd/mesh-grants/main.go +++ b/modules/mesh-grants/cmd/mesh-grants/main.go @@ -10,7 +10,7 @@ // that brought the manifest; one the bus holds is never changed. **The user list is written sealed to the bus node** // (ADR 0547 clause 7) as an object of the part's own bucket named in `user-list.sealed`, which the bus node follows // alone since the controller ended by its unassignment (novox/hq ADR 0590, issue 1126). **The grants** the assigner -// reads are written, and **the account consumers** made; a stream the bus holds is never changed, a difference only said. +// reads are written, and **the account consumers** made; a stream the bus holds gains only the subjects its manifest adds (a consumer the filters), never loses one or changes a limit; any other difference is only said. // // It holds no timer, and never exits for a refused read, write or publish: a refusal is said and tried again at the next // event. diff --git a/modules/mesh-grants/cmd/mesh-grants/tools.go b/modules/mesh-grants/cmd/mesh-grants/tools.go index 5eb4e40d..6116d751 100644 --- a/modules/mesh-grants/cmd/mesh-grants/tools.go +++ b/modules/mesh-grants/cmd/mesh-grants/tools.go @@ -102,8 +102,9 @@ func toolsOf(p *grants.Part) []stdio.Tool { {Name: grants.ToolAssert, Description: "One module's buckets, logs and streams (ADR 0547 clause 6), composed from its manifest at " + "the indexer's trunk with their limits, beside what the bus holds (through the bus module's nats_streams). When the " + "bus lacks one, asks the part's process (which alone holds the grant) to create it now with the manifest's limits, " + - "as it does by itself when a manifest is registered (issue 1790), and says asserted; one the bus holds is never " + - "changed, a difference is only said. Answers the comparison and the ask; call again to see what the bus holds.", + "as it does by itself when a manifest is registered (issue 1790), and says asserted. A stream the bus holds gains the " + + "subjects its manifest adds (and a consumer the filters its module's consumes adds), only ever adding: it never removes " + + "a subject, changes a limit or retention, deletes or recreates one; any other difference is only said. Answers the comparison and the ask; call again to see what the bus holds.", Input: schema(map[string]string{"module": "the module"}, "module"), Run: func(a map[string]any) (any, error) { return p.AssertOne(grants.Answer(a, "module")) }}, {Name: grants.ToolAccounts, Description: "The bus accounts the mesh wants (novox/hq ADR 0561 §2, §9): every account the vault " +