Repository navigation
build(planning): freeze byte-exact G-code goldens from the current planner - #276
Merged
Merged
Conversation
…anner Prework for the Motion IR epic (#136): establish a trustworthy byte baseline before the IR refactor, since the committed examples/rocketry goldens were stale and reproduced from no current code path. The old goldens did NOT reproduce from their .wind under the current planner: - the mandrel A-axis sign was flipped (negative/decreasing) vs the planner's long-standing positive/increasing convention (`far_mandrel`/`mandrel_position` have been positive since the initial commit); and - on top of the sign, an accumulating 120deg-per-circuit (360/patternNumber) divergence from intentional pattern-coverage fixes made AFTER the goldens were last cut (f73386a "mvp of working tests on cyclone"; f4c1204 "validate lockDegrees coverage compatibility"); and - AvBay(470mm)triple.wind had been edited after its gcode was cut (different line count); AvBay(470mm)single had no committed gcode at all. Regenerate every example golden from its .wind with the current (cyclone-validated) planner at verbose=False, and add the four missing ones. The A-axis sign is frozen as the planner's current positive direction (confirmed). Output is deterministic and every .wind reproduces its .gcode byte-for-byte. Frozen (regenerable via `fiberpath plan <wind> -o <gcode>`): examples/rocketry/{CarbonMotorTube(1295mm),MainChute(585mm), AvBay(470mm)triple,AvBay(470mm)single}.gcode examples/{multi_layer,simple_cylinder,sized_simple_cylinder}/expected.gcode Part of #136. Closes #270.
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 #136 (Motion IR epic). Closes #270. Prework slice P0 — establish a trustworthy byte baseline before the IR refactor.
Why this was needed (critical finding)
The committed
examples/rocketry/*.gcodewere stale — they reproduce from no current code path:A-540, A-0.75…); the planner has produced positive/increasing A since the initial commit (far_mandrel/mandrel_positiononly ever increment). X and B were byte-identical.360/patternNumber) growing offset — from intentional coverage fixes made after the goldens were last cut:f73386a("mvp of working tests on cyclone", introducedstart_position_increment/pattern_step_degrees) andf4c1204("validate lockDegrees coverage compatibility"). So the current planner is the corrected, cyclone-validated engine; the old goldens encode pre-fix output.AvBay(470mm)triple.windwas edited after its gcode was cut (different line count);AvBay(470mm)singlehad no committed gcode.What this does
Regenerates every example golden from its
.windwith the current planner (verbose=False) and adds the four missing ones:examples/rocketry/CarbonMotorTube(1295mm).gcodeexamples/rocketry/MainChute(585mm).gcodeexamples/rocketry/AvBay(470mm)triple.gcodeexamples/rocketry/AvBay(470mm)single.gcodeexamples/{multi_layer,simple_cylinder,sized_simple_cylinder}/expected.gcodeexpected.gcodematches the existingdocs/guides/visualization.mdreference)A-axis sign decision (recorded per #270)
Frozen at the planner's current positive-A direction. Rationale: the byte-equal gate must capture what the planner actually emits today (the IR refactor in #274 must reproduce it); positive-A is the long-standing structural behavior since the first commit; and the divergence traces to deliberate, cyclone-validated coverage fixes. If the physical machine ever needs the opposite mandrel spin, that is a separate, deliberate sign-convention change with its own golden refresh — not a reason to freeze a non-reproducible artifact. (Confirmed with the maintainer.)
Verification
.wind; output layer counts match; opcodes are only{G0, G92, comment}; no NaN/inf; X spans0→windLength..windviafiberpath plan <wind> -o <gcode>..gitattributesalready marks*.gcode linguist-generated+eol=lf, so GitHub collapses these large generated diffs.Only non-verbose goldens are frozen (verbose is a debug overlay, not a regression target). The parametrized byte-equal harness + regenerator lands next in #271.