Replace naive sort with explicit timestamp extraction that works for both the new timestamp_sha format and legacy sha_timestamp format. Extract log filename parsing into a reusable function for consistency.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>