feat: increase MAX_LIMIT to 1000 for plays batting/fielding/pitching (#111) #113
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#113
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "issue/111-feat-increase-max-limit-to-1000-for-plays-fielding"
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?
Closes #111
Increases the maximum allowed
limitquery parameter from 500 (MAX_LIMIT) to 1000 for the three play-level stat endpoints:GET /api/v3/plays/battingGET /api/v3/plays/fieldingGET /api/v3/plays/pitchingAll other endpoints retain
le=MAX_LIMIT(500).Changes
app/routers_v3/stratplay/batting.py:le=MAX_LIMIT→le=1000, removed unusedMAX_LIMITimportapp/routers_v3/stratplay/fielding.py: sameapp/routers_v3/stratplay/pitching.py: sameThis matches the existing pattern in
stratgame.pywhich already usesle=1000directly.Tests
No test suite for this repo. Changes verified by reading back modified files — the only functional change is the raised upper bound on the
limitparameter validator.AI Code Review
Files Reviewed
app/routers_v3/stratplay/batting.py(modified)app/routers_v3/stratplay/fielding.py(modified)app/routers_v3/stratplay/pitching.py(modified)Findings
Correctness
le=1000is applied consistently across all three play-level stat endpoints.MAX_LIMITimport removal is correct in all three files — after the change,MAX_LIMITis unused in each.plays.py(general play queries) intentionally retainsle=MAX_LIMIT(500) per the PR description.DEFAULT_LIMIT = 200is still within the new upper bound, so the default remains valid.stratgame.py:63confirmed to already usele=1000directly — the stated precedent is accurate.Security
Style & Conventions
1000rather than a new named constant (e.g.PLAYS_MAX_LIMIT) is consistent with the existingstratgame.pyprecedent and is acceptable given only four endpoints would ever use it.Suggestions
Verdict: COMMENT
Clean, minimal change. Logic is correct, imports are cleaned up appropriately, and the pattern matches the existing
stratgame.pyprecedent. The existing integration test (limit=500intest_stratplay_routes.py) remains valid since 500 ≤ 1000. Approved.Automated review by Claude PR Reviewer