Skip to content

Fix resume-at-line WCS recovery after G53#674

Draft
righteousgambit wants to merge 1 commit into
Carvera-Community:developfrom
righteousgambit:agent/fix-resume-wcs-after-g53
Draft

Fix resume-at-line WCS recovery after G53#674
righteousgambit wants to merge 1 commit into
Carvera-Community:developfrom
righteousgambit:agent/fix-resume-wcs-after-g53

Conversation

@righteousgambit

Copy link
Copy Markdown

Closes #665

Summary

Exclude non-modal G53 from resume-at-line's active-WCS search while preserving the controller's explicit G53 G0 Z-2 recovery move.

Changes

  • Remove G53 from the modal WCS candidates used by playStartLineCommand().
  • Add a regression test with G55 followed by a G53 machine-coordinate move.
  • Add an unreleased changelog entry.

Why

G53 applies machine coordinates to its associated movement; it does not select a persistent coordinate system. Treating it as the most recent WCS can prevent resume-at-line from restoring the program's actual G54-G59.3 state.

This is state-dependent: if the machine already retains the intended WCS, behavior may be unchanged. The fix removes that dependency and makes resume reconstruction deterministic.

Validation

  • Regression against the pinned develop implementation: 1 failed because the preview contained bare buffer G53 and omitted the expected buffer G55.
  • With this change, using the same exact-ref sparse harness: PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=/tmp/carvera-test-stubs:. pytest -q tests/unit/test_resume_wcs.py -> 1 passed.
  • ruff check carveracontroller/Controller.py tests/unit -> passed.
  • git diff --check develop...HEAD -> passed.

Real branch verification

The repository's locked Poetry environment was installed from poetry.lock. The targeted suite passed on real fork commit d989beb58eaa, whose sole parent is pinned upstream develop@2ea66c10e96d88013a04441134d3d4f8e8c88510.

poetry run pytest -q tests/unit/test_resume_wcs.py

Result: 1 passed.

Quality gates on the real branch:

  • Ruff check: passed
  • Ruff format --check: passed
  • git diff --check 2ea66c10e96d88013a04441134d3d4f8e8c88510..d989beb58eaafc7792eead19cff4a89fabb8f3a6: 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.

1 participant