[Testing] Harden EVM UUID partition-0 test coverage - #8651
[Testing] Harden EVM UUID partition-0 test coverage#8651janezpodhostnik wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
FVM review3 findings, 1 of them important. Test-only diff ( Important
The guard's stated purpose is to "fail loudly instead of silently passing via the non-zero-partition branch if the block forcing ever breaks." But it re-derives the identical predicate that was used to pick the block:
Concrete failure scenario: To be non-tautological the check has to observe the production behaviour rather than restate the test's own arithmetic. _, legacy := state.WriteSet[flow.UUIDRegisterID(0)]
if legacy {
expected--
}and Nits
Verified correct
I was not able to execute Automated FVM review (Claude, trial mode) — findings only, no approval. |
|
Applied in 25fefe8:
Not applied:
All divergence paths were negative-tested (sabotaged formula/fixture → guard, cross-check, and assertion each fire as expected). |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Follow-up hardening of the forced UUID-partition-0 tests introduced in #8637,
addressing the actionable findings from the reviews on #8634 and #8637.
Changes
requireUUIDPartitionZero, so theyfail loudly instead of silently testing the common branch if the block forcing
ever stops selecting partition 0
blockFixtureWithUUIDPartitionZeroand fail viat.Fatalfinstead of hanging if the block fixture stops being randomTestCOADryCall_UUIDPartitionZeroandTestCOADryCallWithSigAndArgs_UUIDPartitionZero, giving the partition-0 branchof
assertUpdatedRegisterCount(one register fewer) deterministic coverage;the shared COA setup is extracted into
createCOAAndRunEVMTxusesLegacyUUIDPartition, stating thesha256(blockID)[0]+txnIndex 0assumption in one placeVerified: full package passes with
-race, 5x with-shuffle=on, and thechanged tests 20x repeated without flakes.
Related: #8629, #8634, #8637
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.