Repository navigation
docs(ir): Motion IR as a secondary versioned format + irVersion - #319
Merged
Merged
Conversation
Document the Motion IR (docs/reference/motion-ir.md) as a secondary,
independently-versioned interchange format with explicitly weaker stability
guarantees than .wind (it tracks engine internals). Add IR_VERSION ("1.0") in
ir.py and an ir_version field on ProgramMeta, emit it as the leading irVersion
key in the serialized "; Parameters" header, and round-trip it in read_program
(absent reads as "1.0").
The header gains one field, so the cylinder example goldens are regenerated:
each changes by exactly one line; all motion (G0/G92) bytes are unchanged. The
cone example stays equivalence-gated (no byte golden).
Slice C of #141 (open-format epic). Closes #316.
4 tasks done
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.
Summary
Open-format slice C (#316) of epic #141 — document the Motion IR as a secondary, independently-versioned format and add an
irVersion. Self-contained (no corpus/hosting — B/D).What's here
docs/reference/motion-ir.md(+ nav entry): documents the IR vocabulary (MoveKind/Move/Program/ProgramMeta, logical axes, post-segmentation "one Move == one line"), its serialized form (the emitted G-code;; Parametersheader), and its versioning policy — versioned independently of the.windschemaVersion, with explicitly weaker stability guarantees (the IR tracks engine internals).irVersion:IR_VERSION = "1.0"constant inir.py;ProgramMeta.ir_versionfield (default); emitted as the leadingirVersionkey in the; Parametersheader; round-tripped byread_program(absent →"1.0", tolerant).Byte impact (deliberate, verified)
The header gains one field, so the 7 cylinder example goldens are regenerated — each differs by exactly one line (the header), with all motion bytes unchanged (reviewer confirmed
numstat = 1 1per file). The cone example stays equivalence-gated (no byte golden).Verification
pytest214 passed (incl. reader round-trip + golden byte-equality on the regenerated headers);ruff+mypyclean.; Parameters/ProgramMetaconsumer affected (GUI/wire/sim/plot read the IR viaread_program, not the raw header), doc matchesir.py.Closes #316.