Remove isInit guards in Signer - #761
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughSigner guards and views no longer require initialization. Unconfigured state uses an empty registry and zero threshold. Tests cover rejected authorization, zero-threshold behavior, zero-valued views, and manual setup. ChangesSigner guard behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 17: Update the changelog entry for Signer’s initialization guard removal
to replace the empty `(#)` reference with `(`#761`)`, preserving the rest of the
entry unchanged.
In `@contracts/src/multisig/Signer.compact`:
- Around line 274-280: Update contracts/src/multisig/Signer.compact lines
274-280 in assertThresholdMet to reject approvalCount values greater than
_signerCount, preserving successful authorization only when the approval count
is within the registered signer count. Add a regression test in
contracts/src/multisig/test/Signer.test.ts lines 426-442 that sets a threshold
above the current signer count, verifies assertThresholdMet rejects, and
confirms it succeeds after enough signers are registered.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 802bd286-6acf-4b74-84b7-ab8236796f4c
📒 Files selected for processing (3)
CHANGELOG.mdcontracts/src/multisig/Signer.compactcontracts/src/multisig/test/Signer.test.ts
pepebndc
left a comment
There was a problem hiding this comment.
LGTM. The module-doc rationale for diverging from the library-wide init-guard pattern is exactly what I want to see when we knowingly break convention. Following up on a couple of small things over Slack.
Relaxes the in-circuit isInitialized assertions to prevent lockouts with post-deployment setups
This PR also proposes to clarify
_setThreshold's behaviorSummary by CodeRabbit
New Features
Bug Fixes
Documentation