chore(code-review): address doc traceability, model_validate robustness, and tidy deps#14
chore(code-review): address doc traceability, model_validate robustness, and tidy deps#14diogooliveira-math merged 11 commits intomainfrom
Conversation
…actor API payload handling; add review follow-ups
… deprecation warnings
…ck, and clean pyproject dev deps
… conflict handling; add update/delete tests; update sprint-status and story file
|
Code-review summary (automated, adversarial):\n\nContext:\n- Story: docs/sprint-artifacts/1-3-api-scaffold-and-core-crud.md (Story ID: 1.3)\n- Branch: pr/code-review\n- Commits included: 9e8a968, b382a4b\n\nIssues found (pre-fix):\n1) HIGH: Missing endpoints required by AC — PUT & DELETE not implemented (AC: Task 3).\n2) HIGH: List response shape did not match required wrapper {items, limit, offset, total} (AC: Acceptance Criteria #2).\n3) MEDIUM: Story File List vs git reality mismatch (untracked story file; sprint-status not updated).\n4) MEDIUM: Tests missing for PUT/DELETE, list wrapper, 409 checksum_conflict behavior.\n5) LOW: 409 checksum_conflict handling not explicit in API surface.\n\nFixes applied (in this branch):\n- Implemented PUT /v1/exercises/{id} and DELETE /v1/exercises/{id} (src/to_exercises/api/v1/exercises.py).\n- Changed list endpoint to return wrapper {items, limit, offset, total} (src/to_exercises/api/v1/exercises.py).\n- Added IntegrityError -> HTTP 409 mapping with detail {"error":"checksum_conflict", ...} (src/to_exercises/api/v1/exercises.py).\n- Added tests for update/delete: tests/test_api.py (test_update_and_delete).\n- Created story file: docs/sprint-artifacts/1-3-api-scaffold-and-core-crud.md and updated sprint-status.yaml to mark story done.\n\nValidation:\n- Full test suite: 12 passed, 0 failed (python -m pytest -q).\n\nFiles changed (high level):\n- src/to_exercises/api/v1/exercises.py\n- tests/test_api.py\n- docs/sprint-artifacts/1-3-api-scaffold-and-core-crud.md\n- docs/sprint-artifacts/sprint-status.yaml\n\nNext recommended actions:\n1) Review the implementation diffs for style/edge-cases (I can run a deeper adversarial pass if you want).\n2) Consider adding contract tests for list wrapper & checksum_conflict payload (automated).\n3) Merge PR when ready.\n\nIf you want, I can: (A) run a deeper adversarial review now, (B) add contract tests, or (C) prepare a concise release note. Reply with A, B, or C and I will proceed. |
$(cat <<'EOF'