harbor run -t openthoughts/tasktrove-exp-rpt-pr-pr-0393harbor download openthoughts/tasktrove-exp-rpt-pr-pr-0393This task corresponds to the commit labeled “local-health-check---lightweight-image-processing-benchmark.” The goal is to build a self-contained local benchmark tool that runs in a Linux terminal and mirrors two concepts: a health_check endpoint for a load balancer and a small, multi-threaded batch image-processing CLI pipeline with a tiny training dataset.
Below is a structured instruction set to implement the change without exposing exact code changes. The agent should create new components under /app/ and ensure the solution is self-contained (no external dependencies beyond Python standard library).
Create a self-contained benchmark suite accessible via a local HTTP health check endpoint and a CLI workflow:
Implement a minimal, self-contained codebase under /app/ that uses only the Python standard library (no external dependencies). The design should be simple to run from a Linux terminal and easy to extend.
Ensure clean startup and graceful shutdown behavior for both the health server and the benchmark CLI when invoked separately or together.
The pre-commit file currently contains placeholder content. Use this as the starting point for the new changes.
# Placeholder — original code before the change
pass
Note: Do not reveal or rely on patch diffs here. Use the above as the initial content you will replace with the new implementation under /app/.
Create or modify the following files under /app/ to implement the feature:
app/init.py
app/health_check_server.py
app/benchmark_cli.py
app/manager.py (optional)
app/dataset.py (optional)
(If desired) scripts or entry points:
Notes:
Health endpoint:
Benchmark CLI:
Robustness:
If you implement as described, you will produce a self-contained, Linux-terminal-friendly local benchmark that pairs a lightweight health check with a small, multi-threaded image-like processing pipeline, all under /app/. The resulting tool will be suitable for quick sanity checks or demonstrations of local benchmarking behavior.