fix(gui): wait for hw lock before auto-centering after mount #243

Closed
duan_j wants to merge 3 commits from fix/auto-center-after-mount-wait-idle into main
pull from: fix/auto-center-after-mount-wait-idle
3 Commits
Author SHA1 Message Date
duan_jandClaude Opus 5.5 039c56a9e9 fix(gui): gate mount auto-centering on in-flight /scan/auto, not queue flag
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Failing after 31s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Failing after 32s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Failing after 31s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Failing after 30s
CI / test (3.14) (pull_request) Failing after 32s
CI / test-with-coverage (pull_request) Failing after 35s
CI / coverage-analysis (pull_request) Skipped
CI / test (3.13) (pull_request) Failing after 40s
CI / test (3.12) (pull_request) Successful in 1m19s
Pause flips the queue's running flag while the current sample is still
being processed, so a mount seen after Pause armed a centering on an
already handled sample. Track the /scan/auto request instead; a counter
because the queue sends the next scan before the done signal reaches us.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 11:25:11 +02:00
duan_jandClaude Opus 5.5 f49f34cd27 fix(gui): skip mount auto-centering during queue automation
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Successful in 1m18s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m41s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m44s
CI / test (3.12) (pull_request) Successful in 1m46s
CI / test (3.13) (pull_request) Successful in 1m45s
CI / test (3.14) (pull_request) Failing after 1m45s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m49s
CI / test-with-coverage (pull_request) Successful in 1m58s
CI / coverage-analysis (pull_request) Successful in 4s
Automation centers each sample itself and frees the hw lock between
samples; waiting for idle made the GUI fire center_loop in that gap,
which could steal the lock from the next /scan/auto and stop the queue.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 11:19:24 +02:00
duan_jandClaude Opus 5.5 43054dc0e8 fix(gui): wait for hw lock before auto-centering after mount
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Failing after 1m1s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m26s
CI / lint (pull_request) Successful in 1m35s
CI / test (3.12) (pull_request) Successful in 1m37s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m40s
CI / test-with-coverage (pull_request) Successful in 1m42s
CI / test (3.13) (pull_request) Successful in 1m45s
CI / test (3.14) (pull_request) Successful in 1m47s
CI / coverage-analysis (pull_request) Successful in 3s
The server publishes the new sample while the mount still holds the hw
lock, and /alc/center_loop takes that lock non-blocking, so the click
fired on the sample-id change was rejected as busy and never retried.
Arm on mount, fire on the first non-busy status tick instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 11:14:45 +02:00