Skip to content

feat(contracts): polish tests, extract constants from NodeRegistry#3

Merged
mod merged 1 commit intomasterfrom
feat/polish
Mar 5, 2026
Merged

feat(contracts): polish tests, extract constants from NodeRegistry#3
mod merged 1 commit intomasterfrom
feat/polish

Conversation

@nksazonov
Copy link
Collaborator

@nksazonov nksazonov commented Mar 5, 2026

Summary by CodeRabbit

  • Tests
    • Reorganized and renamed many test contracts for clarity; references updated to new test targets.
    • Added expanded voting/delegation tests; removed an older duplicate voting test suite.
  • Refactor
    • Minor contract/constructor alignment and consistency improvements.
  • Chores
    • Small formatting and import organization adjustments.

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 985d235e-4f23-4808-97e5-2f4e4f03e75c

📥 Commits

Reviewing files that changed from the base of the PR and between 17c1ad7 and 21ddefc.

📒 Files selected for processing (7)
  • src/NodeRegistry.sol
  • test/AppRegistry.t.sol
  • test/Faucet.t.sol
  • test/Governor.t.sol
  • test/Locker.t.sol
  • test/NodeRegistry.t.sol
  • test/NodeRegistryVotes.t.sol
💤 Files with no reviewable changes (1)
  • test/NodeRegistryVotes.t.sol
🚧 Files skipped from review as they are similar to previous changes (3)
  • test/Faucet.t.sol
  • test/Governor.t.sol
  • src/NodeRegistry.sol

📝 Walkthrough

Walkthrough

Adds NAME and VERSION constants to NodeRegistry and updates its EIP712 constructor; reorganizes and renames multiple test contracts across AppRegistry and NodeRegistry, consolidates NodeRegistry voting tests into test/NodeRegistry.t.sol, and removes the standalone test/NodeRegistryVotes.t.sol. Minor test import/formatting tweaks elsewhere.

Changes

Cohort / File(s) Summary
NodeRegistry Constants
src/NodeRegistry.sol
Added file-scope constants NAME = "NodeRegistry" and VERSION = "1.0.0"; constructor now calls EIP712(NAME, VERSION) instead of hardcoded domain strings.
AppRegistry Test Refactoring
test/AppRegistry.t.sol
Renamed test contracts (e.g., AppRegistryLockerTestAppRegistryTest_Locker), replaced vault with appRegistry, updated helpers (_vault(), _vaultAddress()), reorganized slash tests and made base setUp() public/virtual.
NodeRegistry Test Consolidation & Renames
test/NodeRegistry.t.sol
Renamed contracts (e.g., NodeRegistryLockerTestNodeRegistryTest_Locker, constructor test renamed), replaced vault with nodeRegistry, adjusted helpers, and added NodeRegistryTest_Votes containing extensive voting/delegation tests (moved from deleted file).
Deleted Tests (consolidated)
test/NodeRegistryVotes.t.sol
Removed entire file; its voting and historical-checkpoint tests were consolidated into test/NodeRegistry.t.sol.
Governor Test Imports
test/Governor.t.sol
Moved/merged duplicate imports for IGovernor, IVotes, and TimelockController to the top of the file (no logic change).
Minor Test Formatting
test/Faucet.t.sol, test/Locker.t.sol
Small formatting edits (blank lines between imports); no behavior changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through code both new and old,

Renamed the tests, made constants bold.
Votes moved home, the files align,
Constructors whisper NAME and VERSION fine.
A joyful hop — the suite looks fine! 🎶

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

@mod mod merged commit c6d63f8 into master Mar 5, 2026
3 checks passed
@mod mod deleted the feat/polish branch March 5, 2026 18:19
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