Centralize task mode check to avoid string comparisons
Centralize task mode check to avoid string comparisons: a task in LegoFlow-SWE (Harbor dataset). Task configuration mode checks are currently implemented as raw string literal comparisons ( mode == "forbidden" or mode != "forbidden" ) throughout the codebase. This leads to code duplication…
The task
Task configuration mode checks are currently implemented as raw string literal comparisons (`mode == "forbidden"` or `mode != "forbidden"`) throughout the codebase. This leads to code duplication, reduces readability, and makes it harder to change the logic later (e.g., if new modes are added).
Part of Lego-X/LegoFlow-SWE.