feat(ci): add changeset validation to solidity analysis workflows#7801
feat(ci): add changeset validation to solidity analysis workflows#7801paulbalaji merged 8 commits intomainfrom
Conversation
- Add check-solidity-changeset.sh to validate @hyperlane-xyz/core changesets - Add check-diff-changeset.sh to classify diffs and check appropriate changeset level - Bytecode changes require patch+ changeset - Interface/storage additions require minor+ changeset - Interface/storage removals require major changeset - Update solidity/README.md with changeset requirements table - Add skip condition for changeset-release/main to storage-analysis workflow
|
|
Claude encountered an error after 1m 3s —— View job Reviewing PR #7801
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughThis PR introduces centralized shell scripts to validate that Solidity contract changes include appropriate changesets (patch, minor, or major) based on change type. The scripts are integrated into CI workflows for bytecode, interface, and storage analysis, replacing inline validation logic with reusable, scriptable checks. Documentation is added to guide contributors on changeset requirements. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
c55f770 to
550e8df
Compare
|
Claude finished @yorhodes's task in 1m 25s —— View job Reviewing PR #7801
SummaryThis PR adds changeset validation to Solidity analysis CI workflows, ensuring developers include appropriate version bumps when modifying contracts. The implementation is well-structured and ready to merge. Security ReviewShell Script Security ✅ The scripts follow security best practices:
Minor observations (non-blocking):
Workflow ReviewChanges are correct and well-designed:
Changeset requirements matrix is sensible:
Code Quality
Note on Changesets for this PRThis PR itself modifies CI scripts (not Solidity contracts), so it does not require a Verdict: Approve 👍 The implementation is clean, follows shell best practices, and the validation logic correctly maps semantic versioning to contract change types. |
Handle 'Only in <dir>' lines from diff output to properly classify file additions and removals, not just line-level changes.
New contract ABIs should trigger exit code 2 (additions) so they require a minor changeset, not silently pass with exit code 0.
|
Claude finished @yorhodes's task in 1m 42s —— View job Trail of Bits Security Review — PR #7801
Security Analysis SummaryThis PR adds changeset validation to Solidity analysis CI workflows. Overall, the implementation is secure and follows shell scripting best practices. Shell Script Security ✅
Note on YAML parsing ( Codex Feedback — Now Addressed ✅Both concerns raised by codex have been fixed in recent commits:
Workflow Security ✅
Bypass AnalysisQ: Can a malicious PR bypass changeset requirements? No practical bypass vectors exist:
Minor Observations (Informational)
Hyperlane-Specific Security ReviewThis PR modifies CI/infrastructure only, not smart contracts. However, the changeset policy correctly maps semantic versioning to contract change types:
This policy aligns with Hyperlane's upgrade safety requirements. Verdict: APPROVE ✅The implementation is secure, addresses prior review feedback, and correctly enforces semver for contract changes.
No blocking issues. Ready to merge. |
paulbalaji
left a comment
There was a problem hiding this comment.
ci will go green once you pull the latest commit on main which fixes it
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 13
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7801 +/- ##
=======================================
Coverage 77.02% 77.02%
=======================================
Files 117 117
Lines 2651 2651
Branches 244 244
=======================================
Hits 2042 2042
Misses 593 593
Partials 16 16
🚀 New features to boost your workflow:
|
- check-diff-changeset.sh: verify BASE_DIR and HEAD_DIR exist before running diff to avoid silent success on missing directories - interface-analysis.yml: explicitly handle exit codes 0, 1, 2 and treat any other exit code as an error instead of assuming removals
|
Claude finished @yorhodes's task in 1m 2s —— View job Reviewing PR #7801
Trail of Bits Security Review SummaryThis PR adds changeset validation to Solidity analysis CI workflows. The implementation is secure and all previous review feedback has been addressed. Cursor Bugbot Feedback — Addressed ✅Both issues raised by Cursor Bugbot have been fixed in commit
Shell Script Security Analysis ✅
Workflow Security ✅
Changeset Requirements PolicyThe semver mapping is correct for smart contract changes:
Minor Observations (Informational)
Verdict: APPROVE ✅
All blocking issues have been addressed. CI is running and no further changes are required. |
|
Claude finished @yorhodes's task in 55s —— View job Reviewing PR #7801
Trail of Bits Security Review SummaryThis PR adds changeset validation to Solidity analysis CI workflows. The implementation is secure and follows shell scripting best practices. Shell Script Security Analysis ✅
All Review Feedback Addressed ✅
Workflow Security ✅
Changeset Requirements PolicyThe semver mapping is correct for smart contract changes:
Minor Observations (Informational)
Note on This PR's ChangesetThis PR modifies CI scripts only (not Solidity contracts), so it does not require a Verdict: APPROVE ✅
All blocking issues have been addressed. The implementation is clean, follows shell best practices, and the validation logic correctly maps semantic versioning to contract change types. Ready to merge. |
|
Claude encountered an error after 1m 38s —— View job Reviewing PR #7801
|

Summary
Add changeset validation to the Solidity bytecode, interface, and storage analysis CI workflows. This ensures developers include appropriate changesets when modifying contracts.
Changeset Requirements
patchor higherminoror highermajorminoror highermajorChanges
.github/scripts/check-solidity-changeset.sh- validates@hyperlane-xyz/corechangesets at required bump level.github/scripts/check-diff-changeset.sh- classifies diffs (additions/removals) and calls changeset validatorbytecode-analysis.ymlto use shared scriptinterface-analysis.ymlto check changeset based on change typestorage-analysis.ymlto use shared script and add skip condition for changeset-release PRssolidity/interface.shto return exit code 2 for additions-only (distinguishing from removals)solidity/README.mdwith changeset requirements tableManual Testing
check-solidity-changeset.sh tests
check-diff-changeset.sh tests
Related
This will fix the bytecode check failure on #7796 once a changeset is added.
Note
Introduces centralized changeset validation for Solidity contract modifications and wires it into CI.
./.github/scripts/check-solidity-changeset.shto verify@hyperlane-xyz/corebump level and./.github/scripts/check-diff-changeset.shto classify diffs (additions/removals) forbytecodeandstoragebytecode-analysis.yml,interface-analysis.yml, andstorage-analysis.ymlto use shared validation, requirepatch|minor|majorbumps as appropriate, and skip onchangeset-release/mainsolidity/interface.shto distinguish additions (exit code2) vs removals (exit code1) and improve output messagingsolidity/test/interface.test.tsto assert new exit codes and messages; documents requirements insolidity/README.mdWritten by Cursor Bugbot for commit 1c141df. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.