test initialize semantics: typed-overload reverts and re-init protection#443
test initialize semantics: typed-overload reverts and re-init protection#443thedavidmeister wants to merge 1 commit intomainfrom
Conversation
Four invariants pinned: 1. `Flow.initialize(EvaluableConfigV3[])` (the typed overload) reverts with `ICloneableV2.InitializeSignatureFn` on the implementation. 2. Same overload reverts on a successfully initialized clone. 3. `_disableInitializers()` in the implementation constructor blocks any direct `initialize(bytes)` on the implementation. 4. A successfully initialized clone rejects a second `initialize(bytes)`. OZ Initializable v4 reverts with the string `"Initializable: contract is already initialized"`. Mutation verified: removing the `initializer` modifier from `initialize(bytes)` makes both re-init tests fail; reverting passes. Closes #322 #323. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ 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 |
Summary
Pins four
initializeinvariants onFlow:Flow.initialize(EvaluableConfigV3[])(the typed overload mandated byICloneableV2) reverts withICloneableV2.InitializeSignatureFnon the implementation._disableInitializers()in the implementation constructor blocks any directinitialize(bytes)call on the implementation.initialize(bytes).OZ Initializable v4 reverts with
"Initializable: contract is already initialized".Mutation verified: removing the
initializermodifier frominitialize(bytes)makes both re-init tests fail; reverting passes.Closes #322 #323.
Test plan
initializermodifier → re-init tests fail🤖 Generated with Claude Code