Skip to content

Conversation

@lisenokdonbassenok
Copy link

Update NatSpec comments in GovernorVotesSuperQuorumFraction so they accurately describe the super quorum invariant. The previous wording implied that the super quorum must be strictly greater than the quorum, while the implementation allows it to be equal (>=).

@lisenokdonbassenok lisenokdonbassenok requested a review from a team as a code owner December 13, 2025 13:06
@changeset-bot
Copy link

changeset-bot bot commented Dec 13, 2025

⚠️ No Changeset found

Latest commit: 66756d2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 13, 2025

Walkthrough

Documentation updates were made to GovernorVotesSuperQuorumFraction.sol to align with existing code logic. The error message for GovernorInvalidSuperQuorumTooSmall was clarified to specify that the super quorum must be smaller than the quorum. The constructor documentation was also updated to indicate that the super quorum can be greater than or equal to the quorum. These are documentation-only changes with no modifications to the underlying code logic or control flow.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: fix super quorum fraction NatSpec' directly and specifically describes the main change: fixing documentation for super quorum fraction.
Description check ✅ Passed The description clearly explains the purpose of the changes: updating NatSpec comments to accurately reflect the implementation's handling of super quorum values.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0e19973 and 66756d2.

📒 Files selected for processing (1)
  • contracts/governance/extensions/GovernorVotesSuperQuorumFraction.sol (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - solidity-contracts
  • GitHub Check: Header rules - solidity-contracts
  • GitHub Check: Pages changed - solidity-contracts
🔇 Additional comments (2)
contracts/governance/extensions/GovernorVotesSuperQuorumFraction.sol (2)

31-31: LGTM! Documentation now accurately reflects the implementation.

The error is thrown at line 105 when newSuperQuorumNumerator < quorumNumerator (strictly less than), so stating "smaller than" is correct. The previous wording "smaller or equal to" was inaccurate.


44-44: LGTM! Documentation now accurately reflects the implementation.

The validation at lines 104-105 rejects only when newSuperQuorumNumerator < quorumNumerator, which means equality is allowed. Stating "greater than or equal to" is correct and consistent with other documentation in the file (lines 81, 95, 116). The previous wording "greater than" incorrectly excluded the equality case.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Amxx Amxx changed the base branch from master to typo-fixes December 15, 2025 14:02
@Amxx Amxx added this to the typo-fixes milestone Dec 15, 2025
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.

2 participants