harbor run -t openthoughts/tasktrove-exp-rpt-stack-dockerfile-gpt5mini-v3-stack-dockerfile-gpt4o-3406harbor download openthoughts/tasktrove-exp-rpt-stack-dockerfile-gpt5mini-v3-stack-dockerfile-gpt4o-3406Create a small Python 3 web application and tests under /app that implements a simple persistent TODO list API. Use only the Python standard library (no external packages). Your solution must run with the Python interpreter already installed in the environment (Python 3.6.11).
Place all source files in /app. The deliverable should include a starting command and unit tests.
Requirements
Implement a REST-like HTTP JSON API served on 0.0.0.0:8000. Start the server with: python /app/server.py
The server must use only the Python standard library (http.server, socketserver, threading, json, datetime, os, etc.). Do not require pip installs.
Use a thread-per-request HTTP server (ThreadingMixIn + HTTPServer or equivalent) so concurrent requests work.
Persist the todo list to a JSON file at /app/data.json so data survives across server restarts. The file format is an array of todo objects.
Implement the following endpoints and behavior:
GET /todos
GET /todos/
POST /todos
PUT /todos/
DELETE /todos/
Validation & errors:
Concurrency safety:
Tests:
CLI helper (optional but recommended):
Documentation:
Acceptance criteria (what will be checked)
Notes / constraints