Repository navigation
fix(tests): cover the helpers the drift check never saw - #440
Merged
Merged
Conversation
check_helper_drift.py only knew five helper names, so copies kept under other names drifted unseen: 15 hull_collider bodies, 75 setup_bake_image bodies, and the uv_stats, face_area, bake_normal, zfight_pairs and wire_normal families. - List those seven helpers in CANONICAL with measured variant counts and the reason each extra variant exists. - A helper marked "literals" is hashed with string constants and ALL_CAPS names blanked, so a per-piece image name or material index is not a new body. setup_bake_image goes from 75 variants to 3 and wire_normal from 11 to 10, without editing 76 scripts. - Any function calling bmesh.ops.convex_hull must be listed, so a hull copied under a new name is reported. The hull_collider copies hull bare points, so the source-edge bug fixed in #386 does not apply to them, and their single delete call over a deduplicated vertex list needs no is_valid guard. Closes #361 Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
CI evidence before merge: all checks pass ( 13 pass ). Blender Smoke on PR head: Blender 5.2.2 LTS / Blender 4.5.14 LTS. Summaries (happy path; falsifiers) per leg: 141 passed, 3 skipped, 0 failed;136 passed, 7 skipped, 0 failed;143 passed, 1 skipped, 0 failed;143 passed, 0 skipped, 0 failed; |
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 #361.
What changed
In
tests/check_helper_drift.py:CANONICAL:hull_collider,setup_bake_image,bake_normal,face_area,uv_stats,zfight_pairsandwire_normal. Each has its measured variant count and the reason each extra variant exists, written from reading the variant diffs.literalsflag. Flagged helpers are hashed with string constants and ALL_CAPS names blanked, so a per-piece image name ('AnvilNrm'vs'HoopNrm') or material index (WOOD_IDXvsSTEEL_IDX) does not count as a new body. This replaces the issue's "parameterise the image name" without editing 76 scripts.bmesh.ops.convex_hullmust be inCANONICAL, so a hull copied under a new name is reported as drift.Not changed
is_validguard inhull_collider: not ported. All 15 copies callbmesh.ops.deleteonce, over a deduplicated list of verts that all still exist, so no vert can be invalid when the guard would run.uv_stats' bucketed-grid variant returns(..., 0.0, 0)on a mesh with no UVs.Evidence (local runs)
check_helper_drift.py --strictexits 0 with all 12 helpersok.hull_colliderremoved fromCANONICAL,unlisted_hull_callers()reports the 15 copies and--strictexits 1.literalsflag,setup_bake_imagehas 75 variants andwire_normal11; with it, 3 and 10.convex_hull_collider(60 pieces) andhull_collider(15) callbmesh.ops.convex_hulltoday.Inspection only: the variant rationales come from reading the AST diffs, not from runs.
🤖 Generated with Claude Code