https://bugs.kde.org/show_bug.cgi?id=527912

            Bug ID: 527912
           Summary: Ekos Scheduler forgets successful manual autofocus
                    while paused and may re-enter startup on Resume
    Classification: Applications
           Product: kstars
      Version First git
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 197728
  --> https://bugs.kde.org/attachment.cgi?id=197728&action=edit
Sanitized Log File

SUMMARY

Ekos Scheduler does not retain a successful manual autofocus result received
while Scheduler is paused. Resuming can also route through the general
Scheduler start path rather than continuing from the paused job’s current live
state.

USE CASE

An operator pauses an active Scheduler job because autofocus requires manual
intervention. While Scheduler remains paused, the operator adjusts Focus
settings and completes autofocus successfully. The operator then presses Resume
and expects Scheduler to continue from the now-satisfied focus stage.

ACTUAL BEHAVIOR

`SchedulerProcess::setFocusStatus()` returns immediately when the Scheduler
state is `SCHEDULER_PAUSED`.

Consequently, a successful autofocus completion received while paused is not
recorded by Scheduler:

- the train’s autofocus-completed state is not updated;
- the job is not advanced to `SCHEDSTAGE_FOCUS_COMPLETE`; and
- Resume does not reliably recognize that Focus is already satisfied.

The Start/Resume UI path may also route the paused Scheduler through the
general `process()->start()` path. In an observatory workflow, that can
re-enter startup-state processing instead of performing a lightweight
continuation from the paused state.

EXPECTED BEHAVIOR

Pause should suspend Scheduler decision-making without discarding valid state
changes from manually operated subsystems.

When autofocus completes successfully while Scheduler is paused, Scheduler
should:

1. record autofocus completion for the applicable train;
2. mark the job’s focus stage complete;
3. remain paused without automatically advancing the job; and
4. continue from the first unsatisfied stage only after the operator presses
Resume.

A failed or aborted manual autofocus may be recorded, but it should not
initiate an automatic retry loop while the operator has deliberately paused
Scheduler.

Resume should reconcile the current job stage with live subsystem state and
continue the existing Scheduler session. It should not unnecessarily repeat
observatory startup operations.

REPRODUCTION OUTLINE

1. Start a Scheduler job that includes autofocus as a startup step.
2. Allow the job to reach its Focus stage.
3. Press Pause.
4. Manually change Focus settings and run autofocus successfully while
Scheduler remains paused.
5. Press Resume.
6. Observe that Scheduler did not retain the successful focus completion and
may route through broader Scheduler startup processing rather than continuing
from the satisfied Focus stage.

RELEVANT CODE PATHS

- `SchedulerProcess::setFocusStatus()`
- `SchedulerProcess::setPaused()`
- `SchedulerProcess::execute()`
- the UI Start/Resume path that invokes `process()->start()`

DESIRED STATE TRANSITION

`FOCUS_COMPLETE while paused`
→ remember autofocus completion
→ mark the focus stage complete
→ remain paused
→ Resume continues to the next required stage

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to