Outcome: done Changed: none Verified by: make verify -> exit_code 0, "Ran 199 tests in 2.168s OK verification passed" (only pre-existing StarletteDeprecationWarning from fastapi/testclient.py:1, not from the research package) Findings: - C1 PASS: grep non-rsearch URLs in research/*.py -> 0 lines; live tests.test_research_integration -> 1 OK, asserts all requested URLs start with https://rsearch.app.molodetz.nl - C2 PASS: tests.test_research_scheduling -> 22 OK; peak == max_concurrency == 8 and pool bound asserted - C3 PASS: web/images/describe/chat single _request mechanism + one pipeline tests OK; test_research_client -> 36 OK; engine probe round content_types {web:1,images:1,chat:1} - C4 PASS: tests.test_research_dedup -> 36 OK; 64 concurrent same-query pushes -> 1 enqueued, 63 skipped; URL+content dedup asserted - C5 PASS: TestClosureDecision -> 6 OK; ResearchEngine.run("closure probe") with NullClient -> closed=true, total_rounds=1, new_urls=0, new_queries=0, 3 calls - C6 PASS: ast check over 9 modules -> 0 annotation problems; 21 logger.info + 10 logger.debug calls; 7 modules with logger; retoor header on all 9 files - C7 PASS: grep TODO|FIXME|placeholder|stub -> 0 hits - C8 PASS: make verify -> exit 0, "Ran 199 tests in 2.168s OK verification passed", no new warning - Adversarial: ResearchEngine().run(" \n\t") -> ValueError "research subject must not be empty", no request issued, no hang Open: none Confidence: high - all 8 engine acceptance criteria executed with reco Typosaurus-Run: 4e2afb673c7f4578a12276d9181b982d Typosaurus-Node: f7f10c648a7d4b7fb65256acdaf7770a Typosaurus-Agent: @tanya Refs: #31
retoor retoor@molodetz.nl
typosaurus-sandbox
Sandbox for Typosaurus end-to-end verification.
A FastAPI application serving arithmetic operations over HTTP with JSON request/response bodies.
Configuration
The application uses a single .env.json file at the project root as its central point of truth
for configuration. Defaults are plug-and-play and require no setup:
{
"host": "127.0.0.1",
"port": 8000
}
When no .env.json is present, the application starts with these defaults. To customise, create
.env.json in the project root and populate only the keys that differ.
Usage
Start the server
python -m typosaurus_sandbox
The server listens on http://127.0.0.1:8000 by default.
Health check
GET /health
Response:
{"status": "ok"}
API endpoints
All calculator endpoints accept POST requests with a JSON body and return a JSON response.
POST /api/v1/calculator/add
Add two integers.
Request:
{"left": 3, "right": 5}
Response:
{"result": 8}
POST /api/v1/calculator/subtract
Subtract the right integer from the left.
Request:
{"left": 10, "right": 3}
Response:
{"result": 7}
POST /api/v1/calculator/clamp
Clamp a value between a low and high bound.
Request:
{"value": 15, "low": 0, "high": 10}
Response:
{"result": 10}
Boundaries are inclusive. A low > high combination produces a 422 validation response.
POST /api/v1/calculator/clamp-to-byte
Clamp an integer to the byte range [0, 255].
Request:
{"value": 300}
Response:
{"result": 255}
POST /api/v1/calculator/average
Compute the arithmetic mean of a list of values.
Request:
{"values": [1, 2, 3, 4, 5]}
Response:
{"result": 3.0}
An empty list produces a 422 validation response.
POST /api/v1/calculator/median
Compute the median of a list of values. Values are sorted internally; an even-length list returns the average of the two middle values as a float.
Request:
{"values": [1, 3, 5]}
Response:
{"result": 3.0}
Request (even length):
{"values": [1, 2, 3, 4]}
Response:
{"result": 2.5}
An empty list produces a 422 validation response.
POST /api/v1/calculator/variance
Compute the population variance of a list of values.
Request:
{"values": [1, 2, 3, 4, 5]}
Response:
{"result": 2.0}
An empty list produces a 422 validation response.
POST /api/v1/calculator/percentage
Compute what percentage value is of total.
Request:
{"value": 50, "total": 100}
Response:
{"result": 50.0}
A zero total produces a 422 validation response.
Verification
make verify
Runs compile-all checks against all source and test files, then executes the full test suite. Zero warnings are tolerated.