Cleanup: interest leads endpoint QA nits from PR #187 #188
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Cleanup
Lineage
QA nits from PR #187 (POST /public/interest). Non-blocking, discovered scope.
Repo
forgejo_admin/basketball-apiUser Story
As a developer maintaining the interest leads endpoint
I want input validation to be tight and consistent with existing patterns
So that edge cases (empty strings, whitespace, PII logging) don't cause data quality issues
Context
QA review of PR #187 flagged 5 non-blocking nits. All are validation tightening and consistency fixes — the endpoint works correctly but could be more defensive.
File Targets
Files the agent should modify:
src/basketball_api/models.py— addindex=TrueonInterestLead.tenant_idsrc/basketball_api/routes/public.py— addmin_length,max_length, whitespace stripping on Pydantic fields; reduce PII logging leveltests/test_interest.py— add tests for min_length and whitespace strippingFiles the agent should NOT touch:
Acceptance Criteria
InterestLead.tenant_idhasindex=True+ new Alembic migration for the indexplayer_nameandage_gradehavemin_length=1— empty strings return 422max_lengthmatches DB column constraints (200, 100, 254, 30, 20)parent_emailnot logged at INFO — use DEBUG or redactplayer_nameandage_gradestripped of leading/trailing whitespace (likeparent_emailalready is)Test Expectations
player_name→ 422age_grade→ 422player_name→ 422 or strippedplayer_nameConstraints
Checklist
Related
basketball-api#186(parent issue)project-westside-basketballScope Review: READY (already completed)
Review note:
review-462-2026-03-27All 5 acceptance criteria verified against the current codebase — PR #194 merged successfully. Board item #462 should move from
todotodone.