feat: RBAC wave — role validation, grant idempotency, role-based gating, dep audit - #869
Open
nekwasar wants to merge 5 commits into
Open
feat: RBAC wave — role validation, grant idempotency, role-based gating, dep audit#869nekwasar wants to merge 5 commits into
nekwasar wants to merge 5 commits into
Conversation
added 4 commits
August 31, 2026 10:54
grant_role now reverts with the new AdminError::RoleAlreadyGranted when the target address already holds the role, instead of silently no-op'ing the bitmask OR. Adds the error variant (code 22), updates the error-code docs and the PascalCase variant test, and converts the grant-idempotency fuzz test into one that asserts the repeat grant reverts. Closes BCPathway#768
Role is a contracttype enum serialized by case-name symbol, so an unrecognized discriminant fails to decode in try_from_val before the contract's require_valid_role guard runs. Locks that boundary with a round-trip test for every defined variant plus an unknown-name rejection case, and extends the error-code variant test to the new RoleAlreadyGranted (also carries the Admin-vs-Pauser role-separation test that shares this file). Closes BCPathway#761
Replaces the legacy caller != get_admin() address-equality checks in pause/unpause with the new admin::is_admin_or_pauser role-mask helper. The admin always holds the Admin role bit, so behavior is unchanged while the gate is now role-based and survives admin-entry changes. Closes BCPathway#769
Resolves the workspace with cargo metadata and walks the full dependency graph with all features via cargo tree, so manifest cycles, malformed feature declarations and feature-isolation breakage fail CI instead of surfacing at deploy time. Closes BCPathway#770
|
@nekwasar Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stellar Wave RBAC epic (Wave 2) — four issues:
discriminants (contracttype decode errors) with round-trip + unknown-name
tests; contract-side
require_valid_roleguard already covered grant /revoke / require paths.
grant_rolenow reverts with the newRoleAlreadyGranted(code 22) when the role is already held, and the fuzztest asserts the revert.
pause/unpausenow gate on theis_admin_or_pauserrole-mask helper instead ofcaller == get_admin()address equality; role-separation test included.
full all-features dependency graph, catching cycles / feature-isolation
breakage.
Closes #761
Closes #768
Closes #769
Closes #770