/**
 * @param {import("node:fs").Stats} stats
 * @returns {"755"|"644"}
 */
export function canonicalSourceMode(stats) {
  if (stats.isDirectory() || (stats.mode & 0o111) !== 0) {
    return "755";
  }
  return "644";
}
