Re Ron Debry's question about "Solution Pending" and also re @Ron Clanton's point about "selecting different stars in each iteration":
I made some changes to Linear focus in October 2021, so they would have been released as part of 3.5.6 and later that affected those two things.
Pending: The scheme prints "Pending" on the focus graph once it is in its 2nd pass and has found a position with an HFR that is "good enough to complete" (e.g. within the tolerance of the best HFR from the first pass). It is greedy, though, and keeps sampling positions/HFRs until it stops measuring lower/better HFR values. When it does stop seeing improvement, it will try again in that same position a few times. After a few failures to improve it stops, otherwise it keeps sampling and moving. In this 2nd pass it is using step_size/2, and once it passes the 1st pass' min position it uses step_size/4. Once you see the "Pending", it is guaranteed to stop and not fail.
Selecting different stars. I too wondered if using different stars for HFR comparisons was adding noise to the scheme. Therefore, I made a change such that, when it compares HFR values from two focus images, it only uses stars from the same image coordinates in both images to make that comparison, if at all possible. Note, that the stars displayed on the the focus image, with HFR values reflect the star detections from StellarSolver, but may/may-not be used to compare the HFR values with a previous image.
You can find a more detailed description of the changes and pointers to the code here:
invent.kde.org/education/kstars/-/merge_requests/458