fix(tests): Optimize filling of MIP-8 tests#31
Merged
Conversation
Replace 32 in the 6 size axes with 2 for the combinatoric matrix and move full-page (128-slot) coverage into dedicated low-cardinality tests. Co-Authored-By: Claude <claude-opus-4-8>
Replace the full 3x4 call_op x child_exit product with the union of all call_op under STOP and all child_exit under CALL (8748 -> 4374). Co-Authored-By: Claude <claude-opus-4-8>
Sweep only up to the farthest slot the params reach instead of a full page, dropping the per-case cost ~10x for the small-value variants. Co-Authored-By: Claude <claude-opus-4-8>
mijovic
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes ENG-1130
Two tests were culprit of excessive feature release generation. The reason was two-fold:
This PR solves both - splits the largest parameters set, which used to cover the full page store (4x32 slots) into a separate test, and also splits the remaining test cases into parametrizations which are sections of the original parameter space.
Greptile Summary
This PR refactors two expensive test functions in the MIP-8 pageified storage test suite by extracting the logic into private helpers (
_state_growth_counters_inside_subcalland_state_growth_counters_after_subcall) and splitting each into a small-value parametric test and a dedicated full-page test, while also shrinking the measurement sweep from a full page to exactly the slots actually touched.[0, 1, 32]to[0, 1, 2], with the 32-slot scenario moved to separate*_full_pagetests (3 and 12 cases respectively).measured_slotsoptimization: instead of always sweeping allSLOTS_PER_PAGE(128) slots, a formula is used to sweep only as far as the farthest slot actually written, with a runtimeassertto guard the page boundary.after_subcallcross-product: the(call_op × child_exit)product is replaced with 6 hand-picked pairs (allcall_ops underSTOP, allchild_exits underCALL), droppingDELEGATECALL/CREATE × {REVERT,INVALID,SELFDESTRUCT}combinations from the parametric sweep.Confidence Score: 4/5
Safe to merge; the refactor correctly reduces test generation cost without breaking the logic of the measurement sweep or the full-page boundary test.
The measured_slots formula accurately covers exactly the slots written by the setup prefix, the runtime assert guards the page boundary, and the full-page tests preserve all original call_op x child_exit combinations. The only gap is that DELEGATECALL and CREATE paired with non-STOP exits are no longer exercised under the small-value parametric sweep, so a defect that only appears with slot counts of 0, 1, or 2 in those paths would be missed.
The cross-product reduction logic in test_state_growth_counters_after_subcall (lines 1760-1778) deserves a second look to confirm the intentional coverage trade-off is acceptable.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["test_state_growth_counters_inside_subcall"] --> H1["_state_growth_counters_inside_subcall"] B["test_state_growth_counters_inside_subcall_full_page"] --> H1 C["test_state_growth_counters_after_subcall"] --> H2["_state_growth_counters_after_subcall"] D["test_state_growth_counters_after_subcall_full_page"] --> H2%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A["test_state_growth_counters_inside_subcall"] --> H1["_state_growth_counters_inside_subcall"] B["test_state_growth_counters_inside_subcall_full_page"] --> H1 C["test_state_growth_counters_after_subcall"] --> H2["_state_growth_counters_after_subcall"] D["test_state_growth_counters_after_subcall_full_page"] --> H2Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "cap state growth measurement sweep to sl..." | Re-trigger Greptile