Repository navigation
refactor(planning): unify skip + delete per-pattern wrappers (S4) - #304
Merged
Merged
Conversation
Stage 2 / S4 (#298). Cut skip over to build_skip_developed_path (a non-laying reposition: the prologue move + G92, no waypoints, no closing zero_axes) and delete the three thin wrappers plan_hoop_layer/plan_helical_layer/plan_skip_layer. dispatch_layer now builds the PatternSpec and selects the per-type developed-path builder, then lowers through the one lower_developed_path -- a single code path for all three pattern types. Update _generate_fixtures and the layer-strategy tests to drive dispatch_layer directly. Byte-identical to the prior emitters (skip fixture + all goldens unchanged). Refs #137.
4 tasks
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.
Part of the Stage 2 epic #137 (slice S4, #298). Cuts skip over and consolidates all three pattern types onto the single developed-surface lowering.
What's here
build_skip_developed_path— a skip is a non-laying reposition: it reuses the prologue framing (initial move carrying the reposition angle +G92), with no laying waypoints and no closingzero_axes(terminal=True). Byte-identical to the legacyplan_skip_layer.plan_hoop_layer/plan_helical_layer/plan_skip_layer.dispatch_layernow builds thePatternSpec, selects the per-type developed-path builder (hoop / helical / skip), and lowers through the onelower_developed_path. Single code path for all three._generate_fixtures.pyandtest_layer_strategies.pyto drivedispatch_layerdirectly; repurposedtest_developed.py's high-angle test (it referenced the deleted helical wrapper) to a wind-angle geometry assertion. Added skip unit tests (byte-identity + structural).Byte-clean (goldens unchanged)
Byte-identical to the prior emitters across all three types — skip fixture, all per-layer fixtures, and every example golden unchanged. Byte-equality retained (consistent with S2/S3). An adversarial review confirmed skip byte-identity holds by construction and found no blockers (two nits; one addressed, one is mypy-required defense).
Verification
ruff format/ruff check/mypyclean.git grepconfirms no remaining references to the deleted wrappers.Next
S5 (#299) — validators become spec type-checkers over the primitive + docs/roadmap.