Skip to content

docs: auto-update for PR #2979 — refactor(meroctl): use shared MemberCapabilities consts for capability bits#2986

Closed
meroreviewer[bot] wants to merge 3 commits into
masterfrom
docs/auto-pr2979-713e1d1
Closed

docs: auto-update for PR #2979 — refactor(meroctl): use shared MemberCapabilities consts for capability bits#2986
meroreviewer[bot] wants to merge 3 commits into
masterfrom
docs/auto-pr2979-713e1d1

Conversation

@meroreviewer

@meroreviewer meroreviewer Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Automatic Documentation Update

Opened automatically after PR #2979 merged.

Each block shows the documentation change as a diff (added lines in green, removed in red); expand "Why this changed" for the source rationale.

Documentation changes

architecture/crates/tools.html — Replace raw capability bit literals with MemberCapabilities constants

 group
 create (with --parent-group-id), list, get, delete, invite, join, members (add/…
+Member capability flags in set-caps, get-caps, set-default-capabilities, and
+related API responses are encoded using the named constants from
+MemberCapabilities (CAN_CREATE_CONTEXT, CAN_INVITE_MEMBERS,
+CAN_JOIN_OPEN_SUBGROUPS, CAN_CREATE_SUBGROUP, CAN_DELETE_SUBGROUP,
+CAN_MANAGE_VISIBILITY, CAN_MANAGE_METADATA) rather than raw bit-shift literals
+(1 << 0, 1 << 1, etc.).
 call
 Execute a WASM method: meroctl call METHOD --context ID --as KEY --args JSON
Why this changed (source: PR #2979)

All occurrences of 1 << 0, 1 << 1, 1 << 2, 1 << 5, 1 << 6, 1 << 7, and 1 << 8 used to encode or decode capability flags in the meroctl CLI (SetCapabilitiesCommand, CheckAccessCommand, SettingsGetCommand, SetDefaultCapabilitiesCommand, GetMemberCapabilitiesApiResponse) and one governance-store test (capability_zero_means_no_permissions) are replaced with the named constants MemberCapabilities::CAN_CREATE_CONTEXT, CAN_INVITE_MEMBERS, CAN_JOIN_OPEN_SUBGROUPS, CAN_CREATE_SUBGROUP, CAN_DELETE_SUBGROUP, CAN_MANAGE_VISIBILITY, and CAN_MANAGE_METADATA from calimero_context_config.

architecture/local-governance.html — Replace raw capability bit literals with MemberCapabilities constants

 DAG
 causal ordering
-6
+7
 capability bits
 20+

 Full control. Can perform all governance operations, manage members, configure …
 Member
-Standard participant. Can read and write state in joined contexts. Specific
-governance operations require capability bits (e.g. CAN_INVITE_MEMBERS,
-MANAGE_MEMBERS).
+Standard participant. Can read and write state in joined contexts. Specific
+governance operations require capability bits (e.g. CAN_INVITE_MEMBERS,
+MANAGE_MEMBERS). Capability flags are encoded using named constants from
+calimero_context_config::MemberCapabilities — raw bit literals are no longer
+used in the CLI or tests.
 ReadOnly
 Observer. Can join contexts and read state, but state mutations are rejected by…

 Core Governance
 context/primitives/src/local_governance/mod.rs
-Wire types: SignedGroupOp, GroupOp, SignableGroupOp, SignedNamespaceOp,
-NamespaceOp (RootOp/GroupOp). Ed25519 signing/verification, content hashing.
-Schema version: group ops v8, namespace ops v2. The state_hash field has been
-removed from all four structs; sign() no longer accepts a state_hash argument;
-verify_signature returns GovernanceError::SchemaVersion for any op with an older
-version number. Also defines MemberPathAtCut — the at-cut analogue of live
-MembershipPath — and AclView::member_path_at_cut which returns it. Defines the
-AtCutAuthorizer trait (including is_admin_or_capability_at_cut and the new
-membership_path_at_cut), the simplified AtCutMembershipPath enum
-(None/Direct/Inherited) used by that method, LiveFallbackAuthorizer, and
-EphemeralProjectionAuthorizer. The live governance-cut resolver (acl_view_at,
-MembershipStatus, prefix_walk_membership, MembershipTransition, heads_equal,
-MAX_PREFIX_WALK_NODES) has been deleted from governance-
-store/src/membership/status.rs; that file now only contains
-role_from_invited_role and its test. Re-exports of acl_view_at and
-MembershipStatus have been removed from governance-store/src/membership/mod.rs,
-governance-store/src/lib.rs, and the group_store facade in context/src/lib.rs.
+Wire types: SignedGroupOp, GroupOp, SignableGroupOp, SignedNamespaceOp,
Why this changed (source: PR #2979)

All occurrences of 1 << 0, 1 << 1, 1 << 2, 1 << 5, 1 << 6, 1 << 7, and 1 << 8 used to encode or decode capability flags in the meroctl CLI (SetCapabilitiesCommand, CheckAccessCommand, SettingsGetCommand, SetDefaultCapabilitiesCommand, GetMemberCapabilitiesApiResponse) and one governance-store test (capability_zero_means_no_permissions) are replaced with the named constants MemberCapabilities::CAN_CREATE_CONTEXT, CAN_INVITE_MEMBERS, CAN_JOIN_OPEN_SUBGROUPS, CAN_CREATE_SUBGROUP, CAN_DELETE_SUBGROUP, CAN_MANAGE_VISIBILITY, and CAN_MANAGE_METADATA from calimero_context_config.

architecture/auto-follow.html — Replace raw capability bit literals with MemberCapabilities constants

 FIND>>> <<<REPLACE
 crates/context/src/authorizer.rs (or equivalent) — AtCutAuthorizer trait gains …
+Member Capability Constants (MemberCapabilities)
+All raw bit-shift literals previously used to encode or decode capability flags
+(e.g. 1 << 0, 1 << 1, 1 << 2, 1 << 5 … 1 << 8) have been replaced with named
+constants from calimero_context_config::MemberCapabilities. The affected sites
+are: SetCapabilitiesCommand, CheckAccessCommand, SettingsGetCommand,
+SetDefaultCapabilitiesCommand, GetMemberCapabilitiesApiResponse in the meroctl
+CLI, and the capability_zero_means_no_permissions governance-store test.
+MemberCapabilities::CAN_CREATE_CONTEXT — formerly 1 << 0
+MemberCapabilities::CAN_INVITE_MEMBERS — formerly 1 << 1
+MemberCapabilities::CAN_JOIN_OPEN_SUBGROUPS — formerly 1 << 2
+MemberCapabilities::CAN_CREATE_SUBGROUP — formerly 1 << 5
+MemberCapabilities::CAN_DELETE_SUBGROUP — formerly 1 << 6
+MemberCapabilities::CAN_MANAGE_VISIBILITY — formerly 1 << 7
+MemberCapabilities::CAN_MANAGE_METADATA — formerly 1 << 8
+Any tooling or external code that constructed capability bitmasks with raw
+integer literals should be updated to use these named constants. The numeric
+values are unchanged; this is a readability and maintainability refactor only.
 Re-drive Buffered Ops on GroupCreated & Born-Open Subgroups (#2848 / #2771)
 This section documents four related changes that close a permanent-stall window…
Why this changed (source: PR #2979)

All occurrences of 1 << 0, 1 << 1, 1 << 2, 1 << 5, 1 << 6, 1 << 7, and 1 << 8 used to encode or decode capability flags in the meroctl CLI (SetCapabilitiesCommand, CheckAccessCommand, SettingsGetCommand, SetDefaultCapabilitiesCommand, GetMemberCapabilitiesApiResponse) and one governance-store test (capability_zero_means_no_permissions) are replaced with the named constants MemberCapabilities::CAN_CREATE_CONTEXT, CAN_INVITE_MEMBERS, CAN_JOIN_OPEN_SUBGROUPS, CAN_CREATE_SUBGROUP, CAN_DELETE_SUBGROUP, CAN_MANAGE_VISIBILITY, and CAN_MANAGE_METADATA from calimero_context_config.


Generated by ai-reviewer update-docs. Nothing was auto-merged.

@meroreviewer meroreviewer Bot added automated-docs documentation Improvements or additions to documentation labels Jun 27, 2026

@meroreviewer meroreviewer Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Code Reviewer

Reviewed by 1 agents | Quality score: 85% | Review time: 32.1s


✅ No Issues Found

All agents reviewed the code and found no issues. LGTM! 🎉


🤖 Generated by AI Code Reviewer | Review ID: review-16e26e9e

@chefsale chefsale closed this Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-docs documentation Improvements or additions to documentation external

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant