Skip to content

Fix NatSpec inconsistency in GovernorVotesSuperQuorumFraction#6507

Open
ernestognw wants to merge 1 commit into
OpenZeppelin:masterfrom
ernestognw:fix/super-quorum-natspec-inconsistency
Open

Fix NatSpec inconsistency in GovernorVotesSuperQuorumFraction#6507
ernestognw wants to merge 1 commit into
OpenZeppelin:masterfrom
ernestognw:fix/super-quorum-natspec-inconsistency

Conversation

@ernestognw
Copy link
Copy Markdown
Member

Summary

  • The constructor docstring and GovernorInvalidSuperQuorumTooSmall error description claim a strict inequality between super quorum and quorum, but the validation logic (in both _updateSuperQuorumNumerator and _updateQuorumNumerator) accepts equal values, matching the requirements lists on the public/internal updaters.
  • Update the constructor docstring (greater thangreater than or equal to) and the error description (smaller or equal tosmaller than) so the NatSpec consistently reflects actual behavior.
  • Docs-only; no behavior or ABI change.

Test plan

  • No code change — existing tests still pass.
  • prettier and solhint run via pre-commit hook.

🤖 Generated with Claude Code

The constructor docstring and `GovernorInvalidSuperQuorumTooSmall` error
description both implied a strict inequality between super quorum and
quorum, but the validation accepts equal values (matching the
requirements lists on `updateSuperQuorumNumerator` and
`_updateSuperQuorumNumerator`). Align the constructor and error
descriptions with the actual behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ernestognw ernestognw requested a review from a team as a code owner May 11, 2026 00:57
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 11, 2026

⚠️ No Changeset found

Latest commit: 2c1ed54

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
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 94075bba-bb74-4d4d-af56-1485020411f6

📥 Commits

Reviewing files that changed from the base of the PR and between 8b010f9 and 2c1ed54.

📒 Files selected for processing (1)
  • contracts/governance/extensions/GovernorVotesSuperQuorumFraction.sol

Walkthrough

This PR updates documentation in GovernorVotesSuperQuorumFraction to clarify validation conditions. The error message for GovernorInvalidSuperQuorumTooSmall is tightened from "smaller or equal to the quorum" to "smaller" than the quorum. Correspondingly, the constructor documentation is updated from requiring the super quorum numerator to be "greater than the quorum" to "greater than or equal to" the quorum. No executable logic or public interfaces were modified; the runtime validation behavior remains unchanged.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change—fixing NatSpec documentation inconsistencies in GovernorVotesSuperQuorumFraction.
Description check ✅ Passed The description clearly explains the inconsistency between NatSpec claims and actual validation logic, the specific changes made, and confirms no behavioral changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

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.

1 participant