feat(sdk): add SocietyRole + RoleAssignment (Sprint 50 T1)#185
Merged
Conversation
Resolves Sprint 49 audit P1 (CRITICAL: SocietyRole missing), P2 (HIGH: role-LCT binding), P3 (HIGH: solo-founder genesis). New web4/role.py module: - SocietyRole enum: 7 base-mandatory + 2 context-mandatory roles - RoleAssignment dataclass: role-LCT binding, T3/V3 per role, rotate(), add_holder(), is_authorized(), to_dict()/from_dict() - bootstrap_society_roles(): solo-founder genesis per inter-society- protocol.md §2.1 — creates 7 role assignments with founder filling all 4 new exports (368 total), 43 new tests (2656 total), 1 new module (23 total). mypy --strict clean, ruff lint/format clean. Cross-language parity with web4-core/src/role.rs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
|
APPROVED Reviewed against criteria:
Merging via squash with --admin. |
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.
Summary
SocietyRolemissing), P2 (HIGH: role-LCT binding), P3 (HIGH: solo-founder genesis)web4/role.pymodule withSocietyRoleenum (7 base-mandatory + 2 context-mandatory roles),RoleAssignmentdataclass (role-LCT binding, T3/V3, rotation, multi-holder, serialization), andbootstrap_society_roles()(solo-founder genesis perinter-society-protocol.md§2.1)web4-core/src/role.rsTest plan
test_role.pycovering enum, construction, rotation, multi-holder, serialization, bootstrapmypy --strict: 0 errors across 26 source filesruff check+ruff format --check: cleanfrom web4 import SocietyRole, RoleAssignment, bootstrap_society_roles🤖 Generated with Claude Code