Outcome: done
Changed:
src/typosaurus_sandbox/presentation/api/v1/calculator.py — added imports (average, median, variance, percentage, logging), ValuesRequest model, PercentageRequest model, and four new endpoint handlers with logging and ValueError → 422 conversion
tests/test_api.py — added 26 test cases across four new test classes
Verified by: `make verify` — 93 tests, 0 failures, 0 new warnings
Findings:
- `ValuesRequest` model accepts `values: list[float]` and serves /average, /median, /variance
- `PercentageRequest` model accepts `value: float, total: float` for /percentage
- All four endpoints log at DEBUG level on invocation
- Empty list (average, median, variance) and zero total (percentage) produce HTTP 422 with descriptive detail
Open: none
Confidence: high — 26 new tests pass, zero regressions, pattern matches existing endpoint conventions
Typosaurus-Run: 34b5946ec981488091bee588eb919ff2
Typosaurus-Node: 644d226aefca431c81cf8be8a46d2070
Typosaurus-Agent: @nadia
Refs: #28
Outcome: done
Changed: tests/test_api.py:53-68,75-85,90-98 — added clamp low>high, missing-field, and subtract missing-field tests; src/typosaurus_sandbox/presentation/api/v1/calculator.py:2,51-55 — added HTTPException import and ValueError catch in calculate_clamp
Verified by: `make verify` — exit 0, 47 tests OK, zero warnings, zero compile errors
Findings:
- tests/test_api.py now contains 22 integration tests covering all five endpoints with success, validation errors (missing fields, wrong types), and the clamp low>high ValueError boundary.
- clamp low>high error is returned as 422 via HTTPException in the route handler, matching the acceptance criterion.
- All 47 tests (25 unit + 22 integration) pass with zero warnings.
Open: none
Confidence: high — all acceptance criteria addressed, all tests pass, verification gate passed
Typosaurus-Run: d4f7c095ea9d49c69663ae6d01a21513
Typosaurus-Node: 9fe1a5bb3c164f6eb359366ca55b1067
Typosaurus-Agent: @sveta
Refs: #15
Outcome: done
Changed: tests/test_api.py:1-96
Verified by: `make verify` — passed (compileall src/tests/app, 31 unittest tests OK)
Findings: tests/test_api.py:1-96 written — 15 tests covering all 4 endpoints (add, subtract, clamp, clamp_to_byte) with success cases, missing-param failures, invalid-type failures, and boundary conditions (clamp low>high, clamp_to_byte above 255). All use Flask test client. make verify passes with 31 tests total.
Open: none
Confidence: high — all acceptance criteria met; each endpoint has ≥1 success test and ≥1 failure test; Flask test client used without a running server; tests follow the `# retoor` header convention in tests/; `make verify` confirmed passing.
Typosaurus-Run: b3f34882127d437e93c240def12065ad
Typosaurus-Node: 045e88c491a9472ea4d6e41b0ebb7d45
Typosaurus-Agent: @sveta
Refs: #9