Skip to content

test: concurrent GrantRole/RevokeRole vs AddOwner/RemoveOwner matrix - #734

Merged
thegreatfeez merged 1 commit into
Ac0rdP:mainfrom
ppaker119:test/concurrent-role-owner-matrix
Oct 1, 2026
Merged

thegreatfeez merged 1 commit into
Ac0rdP:mainfrom
ppaker119:test/concurrent-role-owner-matrix

Conversation

@ppaker119

@ppaker119 ppaker119 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #596

Summary

  • Adds a combinatorial test matrix pairing GrantRole/RevokeRole proposals against AddOwner/RemoveOwner proposals, executed in both orders, to the setup_matrix quorum-combination suite in contracts/accord/src/test.rs.
  • Asserts deterministic final owner/role state for each pairing, including that a removed owner always ends up holding zero roles.
  • Along the way, fixes several pre-existing issues in test.rs that were blocking cargo test from compiling at all on main: a missing closing brace, a few call sites using stale/outdated method signatures, two duplicate test function names, and a couple of env.events()/Symbol calls using an API shape the pinned soroban-sdk version doesn't expose. None of these are related to the role/owner matrix itself — they were just in the way.

Notable findings surfaced by the new matrix

  • GrantRole executing after a target's RemoveOwner still succeeds (roles aren't owner-gated — Viewer is explicitly grantable to non-owners elsewhere in the suite), so a removed owner can end up holding a role again if a role proposal targeting it resolves afterward. This is covered and asserted as current, deterministic behavior rather than treated as a bug fix.
  • AddOwner's execute path assigns the default role set by full overwrite rather than merge, so a GrantRole that lands before a target becomes an owner is silently lost once AddOwner executes, whereas the reverse order keeps it. Both orders are covered explicitly.

Test plan

  • cargo check --tests passes for contracts/accord.
  • cargo test (not run in this environment — please confirm in CI).

Fixes a handful of pre-existing test.rs bugs blocking compilation
(missing brace, stale call signatures, duplicate test names, a
testutils API mismatch) and adds a combinatorial test matrix covering
GrantRole/RevokeRole proposals against AddOwner/RemoveOwner in both
execution orders, asserting deterministic final role/owner state and
that removed owners end up holding no roles.
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

@ppaker119 is attempting to deploy a commit to the thegreatfeez's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 1, 2026

Copy link
Copy Markdown

@ppaker119 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! 🚀

Learn more about application limits

@thegreatfeez
thegreatfeez merged commit 156e9e6 into Ac0rdP:main Oct 1, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a combinatorial test matrix for concurrent role and owner changes

2 participants