Skip to content

Accept G53 machine retracts in mill audit - #153

Merged
mountainarcwelding merged 2 commits into
mountainarcwelding:mainfrom
DarkBiscuits:codex/145-mill-audit-g53
Nov 10, 2026
Merged

mountainarcwelding merged 2 commits into
mountainarcwelding:mainfrom
DarkBiscuits:codex/145-mill-audit-g53

Conversation

@DarkBiscuits

@DarkBiscuits DarkBiscuits commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

A custom mill tool-change template containing G53 G0 Z0 posts and passes read-back, but mill audit rejects it as unsupported G53.

Accept G53 in mill audit as a non-modal machine-coordinate move, excluded from part-frame motions. Preserve the preceding part position, motion mode and plane so a machine retract does not corrupt subsequent modal lines or arcs. Validate the block's words before skipping its machine-coordinate motion. This follows the existing read-back/five-axis treatment and does not model a machine-to-work transform or verify the physical retract path.

Regression coverage includes a posted custom tool-change template with IR round-trip, modal arcs following retracts (including reordered words and plane words), malformed-word rejection, and randomized machine coordinates followed by a partially specified modal feed move. The three positive regression tests failed with unsupported G53 before the fix.

Validation on Linux (Rust 1.95):

  • All four focused mill_g53 tests passed, including the property test.
  • Complete unmodified scripts/check.sh passed: formatting, workspace Clippy with warnings denied, workspace tests, wasm library checks, and licenses.
  • Re-ran the original synthetic ring-pocket CLI case and audited/read back both the built-in Mach3 output and custom G53 output successfully, with identical part-motion counts.

AI disclosure: implementation, regression tests, review, and validation were performed with AI assistance using CAMpanion's own sources and synthetic inputs, following the clean-room contribution rules. No physical controller testing was performed.

This branch starts from upstream main and is independent of #152.

Fixes #145.

@mountainarcwelding

Copy link
Copy Markdown
Owner

Thanks for these, really appreciate the quick turnaround and the tests. I've kicked off CI and will review once it's green. One small ask: could you change "Fixes #145" to "Refs #145"? I keep issues open until a fix has been run on a real machine, so I'd rather they not auto-close on merge.

Resolve changelog, post README, and audit.rs docs so both the G91.1 and
G53 notes remain. Keep the 91.1/90.1 match arms above the integer G parse,
then the G53 early return.

Co-authored-by: DarkBiscuits <darkbiscuitstuff@gmail.com>
@mountainarcwelding
mountainarcwelding merged commit e15846e into mountainarcwelding:main Nov 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

audit rejects G53 in a mill program that read-back accepts ("unsupported G53")

2 participants