harbor run -t openthoughts/tasktrove-exp-rpt-scaffold-v2-scaffold-0678harbor download openthoughts/tasktrove-exp-rpt-scaffold-v2-scaffold-0678You are to fill in all NotImplementedError stubs across the provided scaffolded modules. The tests (executed with pytest) will exercise these functions and rely on their documented behavior. Implementations should be robust, well-typed, and handle common edge cases (missing files, invalid input, IO errors) gracefully.
What needs to be implemented
read_problems() -> ProblemsList
compute_memory_unit(memory_limit: int) -> MemoryUnitDict
write_memory_units(problems: ProblemsList, output_path: Optional[Path] = None) -> None
main() -> int
read_memory_units(path: Optional[Path] = None) -> List[Dict[str, Any]]
format_table(problems: List[Dict[str, Any]]) -> str
hide_problem(index: int) -> None
show_problem(index: int) -> None
main() -> int
validate_image_path(path_str: str) -> bool
copy_image_to_uploads(src_path: Path) -> Path
main(argv: Optional[List[str]] = None) -> int
Files to modify (in /app/)
Testing and execution
Notes and guidance
Summary
You will replace all NotImplementedError stubs with robust, well-documented implementations that align with the docstrings and expected test behavior. Place all code under /app/ following the described behavior for each function, and ensure pytest can validate correctness.