Sort os.scandir() results by entry.name instead of comparing DirEntry objects directly, which don't support < operator. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>