A module's state on the bus: buckets from the catalogue, grants, membership (hq ADR 0201) #257

Merged
mesh-admin merged 2 commits from feat/module-state-on-the-bus into main 2026-10-04 01:43:36 +00:00
Contributor

novox/hq ADR 0201.

  • Manifest: state (name, or {name, history, ttl-seconds}) and reads (<module>.<name>); refused at parse when a name is not one local token, history out of 1..64, a read of its own state; module check names a read whose present owner keeps no such state, and prints what each module keeps and reads.
  • Raise: a key-value bucket <module>_<name> per declared state, from the catalogue (assigned or not), asserted in place with the owner's options and the mesh's caps (256 KiB a value, 64 MiB a bucket); buckets nothing declares are reported, never removed.
  • Grants: owner's runtime writes $KV.<bucket>.> and reads; a reader's runtime reads (stream info, direct get, ordered consumer create/delete, flow control). Composed grants loaded into a real server and exercised as both runtimes: owner does all, reader's writes refused.
  • Membership: state: [{name, bucket, writes}] per assignment.

Inert until a manifest declares state: no module does today, so the composed user list and every membership are unchanged.

Rollout order: this (controller and builder) before any manifest uses state — an older parser refuses the unknown field.

Tests: full suite green, live bucket test against MESH_TEST_NATS.

novox/hq ADR 0201. - Manifest: `state` (name, or {name, history, ttl-seconds}) and `reads` (`<module>.<name>`); refused at parse when a name is not one local token, history out of 1..64, a read of its own state; `module check` names a read whose present owner keeps no such state, and prints what each module keeps and reads. - Raise: a key-value bucket `<module>_<name>` per declared state, from the catalogue (assigned or not), asserted in place with the owner's options and the mesh's caps (256 KiB a value, 64 MiB a bucket); buckets nothing declares are reported, never removed. - Grants: owner's runtime writes `$KV.<bucket>.>` and reads; a reader's runtime reads (stream info, direct get, ordered consumer create/delete, flow control). Composed grants loaded into a real server and exercised as both runtimes: owner does all, reader's writes refused. - Membership: `state: [{name, bucket, writes}]` per assignment. Inert until a manifest declares state: no module does today, so the composed user list and every membership are unchanged. **Rollout order:** this (controller and builder) before any manifest uses `state` — an older parser refuses the unknown field. Tests: full suite green, live bucket test against MESH_TEST_NATS.
mesh-admin added 2 commits 2026-10-04 00:51:02 +00:00
A manifest names the state it keeps (state) and reads (reads); the controller
asserts a key-value bucket per name on every raise, grants owners write and
readers read (measured against a running server), issues each assignment its
buckets in the membership, and reports buckets nothing declares without
removing them.
mesh-admin merged commit 17b8f14fe1 into main 2026-10-04 01:43:36 +00:00
mesh-admin deleted branch feat/module-state-on-the-bus 2026-10-04 01:43:37 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-controller#257