Thank you, Hsin-Fang Chiang, that was helpful.
I've tagged three other tickets that are directly related to this: the fundamental problem is that PsfCandidate has static members, so candidates near the border are forced to have the same size as all the others, and thus sometimes get rejected because the box goes off the edge. The tickets I marked "related" discuss various aspects of this point, and why it might be non-trivial to fix. We don't have a ticket/epic to redo PsfCandidate from the ground up, but we probably should: there's a lot of very old code in it, and some questionable design choices.
The reason this warning started appearing after
DM-14102 is that Chris Morrison [X] and I changed the log.debug statement in the except block to log.warn: if an exception is being caught, we thought it should probably be logged in a more visible manner, given that it was a blanket "catch everything". One approach to handling this exception in a less visible manner would be to have makePsfCandidate either throw a custom exception when the candidate falls off of the image, or treat the LengthError that is currently raised at PsfCandidate.cc::182 as said custom exception, and log that message at a lower level. I'm not extremely keen on the latter, given that there are a variety of ways that other can throw LengthError, but making custom C++ exceptions that python understands for the former isn't as simple as I'd hope. Suggested approaches welcome.
I'll leave it to John Swinbank to decide which of the above "relates" should be "duplicates", etc.