chore: minor changes from audit tool#3165
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThis pull request upgrades the mapstructure dependency from mitchellh/mapstructure v1.5.0 to go-viper/mapstructure/v2 v2.4.0 across the codebase, updates the import statement in the config package, optimizes proposer address comparison to use byte slices instead of strings, and introduces fuzz tests for serialization functions. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip Migrating from UI to YAML configuration.Use the |
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
|
Claude finished @julienrbrt's task in 1m 48s —— View job Code Review
Overall this is a clean, well-scoped PR. The reverts address the valid concerns raised by @julienrbrt. Here are my findings across each change:
|
| Change | Assessment |
|---|---|
assert.go: bytes.Equal |
✅ Correct fix |
serialization_fuzz_test.go |
✅ Good addition, minor naming nit |
go.mod / config.go: mapstructure v2 |
✅ Clean dependency upgrade |
| Reverted syncer.go changes | ✅ Appropriate reverts |
The only actionable item is renaming FuzzDAEnvelopeUnmarshalBinary / the sh variable, which is a clarity improvement. The PR is otherwise ready to merge.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3165 +/- ##
==========================================
+ Coverage 60.24% 60.41% +0.17%
==========================================
Files 115 115
Lines 11902 11902
==========================================
+ Hits 7170 7191 +21
+ Misses 3921 3903 -18
+ Partials 811 808 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
types/serialization_fuzz_test.go (1)
75-85: Consider renaming for clarity.The function
FuzzDAEnvelopeUnmarshalBinaryoperates onSignedHeadertype rather than a dedicatedDAEnvelopetype. While functionally correct (testingUnmarshalDAEnvelopeandMarshalDAEnvelopemethods), the variable nameshand typeSignedHeadercould be confusing to readers expecting a separate envelope type.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@types/serialization_fuzz_test.go` around lines 75 - 85, Rename the fuzz test and local variable to reflect it operates on SignedHeader: update the test function name FuzzDAEnvelopeUnmarshalBinary to something like FuzzSignedHeaderUnmarshalDAEnvelope (or FuzzSignedHeaderDAEnvelope) and rename the local variable sh to a clearer name such as signedHeader; keep calling SignedHeader.UnmarshalDAEnvelope and SignedHeader.MarshalDAEnvelope as-is so the test behavior is unchanged but the intent is clearer.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@types/serialization_fuzz_test.go`:
- Around line 75-85: Rename the fuzz test and local variable to reflect it
operates on SignedHeader: update the test function name
FuzzDAEnvelopeUnmarshalBinary to something like
FuzzSignedHeaderUnmarshalDAEnvelope (or FuzzSignedHeaderDAEnvelope) and rename
the local variable sh to a clearer name such as signedHeader; keep calling
SignedHeader.UnmarshalDAEnvelope and SignedHeader.MarshalDAEnvelope as-is so the
test behavior is unchanged but the intent is clearer.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a24d85d2-edf9-4954-be1d-3682cd38fa19
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (5)
block/internal/syncing/assert.goblock/internal/syncing/syncer.gogo.modpkg/config/config.gotypes/serialization_fuzz_test.go
Overview
Testing out an audit tool and it found these items.
Summary by CodeRabbit
Chores
Tests