buscompose: the grants part may create a placed module's declared buckets, logs and streams, creation only (issue 1790, ADR 0547 clause 1 exception)
#86
Merged
mesh-toolsmerged 2 commits from fix/1790-grants-create-buckets into main2026-10-26 08:17:17 +00:00
Issue 1790 (notes 8-10): a new module's state appears only at the controller's start; met three times on 2026-10-25/26. The operator allowed one more grant in the composer (Telegram, 2026-10-26 08:54), as the memberships grant of 2026-10-25 22:31 (ADR 0547 clause 1).
The grants principal (<node>.mesh-grants) may publish $JS.API.STREAM.CREATE.<name> and $JS.API.STREAM.INFO.<name> for exactly the KV_, LOG_ and module-stream names that placed modules' manifests declare (declaredStreamsOf), one subject each, no wildcard (a name that is not one plain token is dropped). Never update, delete or purge; the writers table's createsDeclared allows only a declared create. Core streams are out of reach: catalogue.StreamProblems refuses a module stream named like one or with a reserved prefix.
Also BucketStreamConfig and ModuleStreamConfig, pure functions equal to the controller's BucketConfig and StreamConfigFor, so the grants part creates what the controller would.
Tests: TestTheGrantsPartCreatesOnlyDeclaredStreams (13 rows), TestDeclaredStreamsAreCreatedAsTheControllerAssertsThem, TestTheCopiedComposerComposesAsTheControllers (fixture checked by the reviewer against the controller's own code). go test -race -count=3 ./... and go vet -tags integration ./... pass.
Delivery group with mesh-controller and mesh-delivery on the same branch name. Rules bent (rules-are-weighed): no mesh-controller.try, as the operator directed on 2026-10-25.
Issue: 1790
Reviewed-by: review-create-buckets@shanks at 136fa8b2a8
Issue 1790 (notes 8-10): a new module's state appears only at the controller's start; met three times on 2026-10-25/26. The operator allowed one more grant in the composer (Telegram, 2026-10-26 08:54), as the memberships grant of 2026-10-25 22:31 (ADR 0547 clause 1).
The grants principal (`<node>.mesh-grants`) may publish `$JS.API.STREAM.CREATE.<name>` and `$JS.API.STREAM.INFO.<name>` for exactly the KV_, LOG_ and module-stream names that placed modules' manifests declare (`declaredStreamsOf`), one subject each, no wildcard (a name that is not one plain token is dropped). Never update, delete or purge; the writers table's `createsDeclared` allows only a declared create. Core streams are out of reach: `catalogue.StreamProblems` refuses a module stream named like one or with a reserved prefix.
Also `BucketStreamConfig` and `ModuleStreamConfig`, pure functions equal to the controller's BucketConfig and StreamConfigFor, so the grants part creates what the controller would.
Tests: TestTheGrantsPartCreatesOnlyDeclaredStreams (13 rows), TestDeclaredStreamsAreCreatedAsTheControllerAssertsThem, TestTheCopiedComposerComposesAsTheControllers (fixture checked by the reviewer against the controller's own code). `go test -race -count=3 ./...` and `go vet -tags integration ./...` pass.
Delivery group with mesh-controller and mesh-delivery on the same branch name. Rules bent (rules-are-weighed): no mesh-controller.try, as the operator directed on 2026-10-25.
Issue: 1790
Reviewed-by: review-create-buckets@shanks at 136fa8b2a896d004edde7ae49d9ae3e9fc68a4a0
The copied bus composer grants mesh-grants' principal $JS.API.STREAM.CREATE.<stream> and
$JS.API.STREAM.INFO.<stream> for each bucket (KV_<module>_<state>), log (LOG_<module>_<log>) and
module stream a placed module's manifest declares, each by its own name: NATS wildcards are whole
tokens, so nothing narrower than an exact name exists and nothing wider is granted. The writers
table lets the grants part create, never update or delete. The operator allowed this one grant
on 2026-10-26 08:54, beside the memberships grant of 22:31 (ADR 0547 clause 1 and 5).
The expected lists were written again by the controller's own internal/broker with the same
change (mesh-control fix/1790-grants-create-buckets); a fixture now places mesh-grants beside the
builder's state, log and stream.
Issue: 1790
BucketStreamConfig and ModuleStreamConfig are the stream configurations the controller's
CreateOrUpdateKeyValue (BucketConfig) and StreamConfigFor assert at its start, pure, for the
grants part's create of a bucket or stream a manifest declares and the bus lacks. A log already
has Log.Config. Never used for an update.
Issue: 1790
Deliverynovox/mesh-sdk@136fa8b2a896 — merged since 2026-10-26T08:17:18Z
Source — source.main moved to novox/mesh-sdk@c3544b6a17. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.
2026-10-26 08:16 (new) → proposed (announced): novox/mesh-sdk#86's head announced
2026-10-26 08:16 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
2026-10-26 08:17 ready → merged (merged): on the trunk its modules follow: merged there
The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.
<!-- mesh-delivery:view -->
**Delivery** `novox/mesh-sdk@136fa8b2a896` — **merged** since 2026-10-26T08:17:18Z
**Source** — source.main moved to novox/mesh-sdk@c3544b6a17a2. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves.
**Group** `fix/1790-grants-create-buckets`: novox/mesh-controller@6927b02d4d58, novox/mesh-delivery@12f16bbebd40, novox/mesh-sdk@136fa8b2a896
**Transitions**
- 2026-10-26 08:16 (new) → proposed (announced): novox/mesh-sdk#86's head announced
- 2026-10-26 08:16 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
- 2026-10-26 08:17 ready → merged (merged): on the trunk its modules follow: merged there
The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
mesh-delivery: the operator's Approve of this pull request's merge into main is ended: a head it covers moved on: the heads it covers are no longer the group's heads. Nothing is merged on it. The operator is asked again once the checks pass at the new head.
mesh-delivery: the operator's Approve of this pull request's merge into main is ended: a head it covers moved on: the heads it covers are no longer the group's heads. Nothing is merged on it. The operator is asked again once the checks pass at the new head.
mesh-delivery: the operator's Approve of this pull request's merge into main is ended: a head it covers moved on: the heads it covers are no longer the group's heads. Nothing is merged on it. The operator is asked again once the checks pass at the new head.
mesh-delivery: the operator's Approve of this pull request's merge into main is ended: a head it covers moved on: the heads it covers are no longer the group's heads. Nothing is merged on it. The operator is asked again once the checks pass at the new head.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Issue 1790 (notes 8-10): a new module's state appears only at the controller's start; met three times on 2026-10-25/26. The operator allowed one more grant in the composer (Telegram, 2026-10-26 08:54), as the memberships grant of 2026-10-25 22:31 (ADR 0547 clause 1).
The grants principal (
<node>.mesh-grants) may publish$JS.API.STREAM.CREATE.<name>and$JS.API.STREAM.INFO.<name>for exactly the KV_, LOG_ and module-stream names that placed modules' manifests declare (declaredStreamsOf), one subject each, no wildcard (a name that is not one plain token is dropped). Never update, delete or purge; the writers table'screatesDeclaredallows only a declared create. Core streams are out of reach:catalogue.StreamProblemsrefuses a module stream named like one or with a reserved prefix.Also
BucketStreamConfigandModuleStreamConfig, pure functions equal to the controller's BucketConfig and StreamConfigFor, so the grants part creates what the controller would.Tests: TestTheGrantsPartCreatesOnlyDeclaredStreams (13 rows), TestDeclaredStreamsAreCreatedAsTheControllerAssertsThem, TestTheCopiedComposerComposesAsTheControllers (fixture checked by the reviewer against the controller's own code).
go test -race -count=3 ./...andgo vet -tags integration ./...pass.Delivery group with mesh-controller and mesh-delivery on the same branch name. Rules bent (rules-are-weighed): no mesh-controller.try, as the operator directed on 2026-10-25.
Issue: 1790
Reviewed-by: review-create-buckets@shanks at
136fa8b2a8Delivery
novox/mesh-sdk@136fa8b2a896— merged since 2026-10-26T08:17:18ZSource — source.main moved to novox/mesh-sdk@c3544b6a17. Whether it reached the machines is
mesh-delivery-view's, derived fromsource.main, the wants and the haves.Group
fix/1790-grants-create-buckets: novox/mesh-controller@6927b02d4d, novox/mesh-delivery@12f16bbebd, novox/mesh-sdk@136fa8b2a8Transitions
The commit's note under
refs/notes/mesh-plankeeps every transition of this change up to its merge:git log --notes=mesh-plan.mesh-delivery: the operator's Approve of this pull request's merge into main is ended: a head it covers moved on: the heads it covers are no longer the group's heads. Nothing is merged on it. The operator is asked again once the checks pass at the new head.
mesh-delivery: the operator's Approve of this pull request's merge into main is ended: a head it covers moved on: the heads it covers are no longer the group's heads. Nothing is merged on it. The operator is asked again once the checks pass at the new head.