After all that work defining EFFORT_LEVELS as the single source of truth, this function just... writes them out again. The includeMax branching is the tell — whoever wrote this didn't think to reach for EFFORT_LEVELS.slice(0, -1) vs EFFORT_LEVELS.
const levels = EFFORT_LEVELS.slice(0, includeMax ? undefined : -1);