isOldFormatJobLogName function
sh-7.log — the pre-unique-id job-log name scheme. Every fa build older
than the collision fix starts its background-job counter at 1 per
process, so a file with this shape freshly modified in OUR bash_jobs
directory means a stale fa process is also writing here.
Implementation
bool isOldFormatJobLogName(String name) {
if (!name.startsWith('sh-') || !name.endsWith('.log')) return false;
final n = name.substring(3, name.length - 4);
return n.isNotEmpty && int.tryParse(n) != null;
}