[codex] Reject oversized API integer strings#312
Conversation
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughThe ChangesInteger Parsing Validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
TateLyman
left a comment
There was a problem hiding this comment.
Requesting changes because the branch currently fails the repository format gate.
Evidence checked:
- Inspected
app/main.pyandtests/test_security.py; the intent is focused on catching Pythonint()digit-limitValueErrorfor oversized integer strings before admin bounty creation. - Ran
uv run pytest tests/test_security.py::test_admin_bounty_api_rejects_fractional_integer_fields -q-> 1 passed. - Ran
uv run ruff check app/main.py tests/test_security.py-> passed. - Ran
uv run ruff format --check app/main.py tests/test_security.py-> failed withWould reformat: app/main.py.
Please run Ruff format on app/main.py and push the formatted diff; after that this should be ready for the rest of the usual checks.
weilixiong
left a comment
There was a problem hiding this comment.
✅ Reviewed:
Files: app/main.py (try/except int() for oversized strings in _parse_int, same HTTP 400), tests/test_security.py (oversized string regression tests)
Checked: 9*5000 string→int overflow now caught by ValueError→400 instead of 500. Existing fractional tests preserved. Both issue_number and max_awards paths covered.
CI: ✅ quality/readiness/docs/image
Risk: LOW — 2 files, input validation hardening, +20/−1
ef5bb7c to
4e77ce6
Compare
|
Rebased PR #312 onto current Conflict resolution:
Validation:
|
|
Pushed a formatting-only update for the hosted CI failure. Root cause: CI passed tests but failed Validation after formatting:
|
Summary
Bounty #292
Validation
Summary by CodeRabbit
Bug Fixes
Tests