Repository navigation
fix(planning): reject helical lead-in >= mandrel wind length - #167
Merged
Merged
Conversation
A helical layer with leadInMM >= the mandrel windLength passed all validation but produced G-code that ran the carriage off the end of the mandrel into negative coordinates and inverted the main-pass mandrel rotation, risking an end-stop collision. Add an explicit check in validate_helical_layer with a regression test.
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.
Bug B2 from the latent-bug audit (verified by execution — produced
X-1 … X-50G-code).Problem
No validator checked
leadInMMagainstwindLength. A helical layer withleadInMM >= windLengthpassed validation, then generated G-code that drove the carriage off the end of the mandrel into negative coordinates and inverted the main-pass mandrel rotation — a real end-stop-collision risk on hardware.Fix
Add an explicit
leadInMM >= windLengthcheck tovalidate_helical_layer, raising the standardLayerValidationError(→ HTTP 400 / clean CLI error).TDD
test_validate_helical_layer_rejects_lead_in_exceeding_wind_length(leadInMM=150, windLength=100) failed ("DID NOT RAISE") before the fix.