Treat blank bounty status filters as unfiltered#463
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR updates bounty listing status filtering to treat empty or whitespace-only ChangesEmpty status filter normalization
Possibly related PRs
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
GHX5T-SOL
left a comment
There was a problem hiding this comment.
Reviewed current head f013c22860aa005009c1590bbce948bec7bf6843.
The change is narrowly scoped and matches the #406 bug-report class: blank or whitespace-only status query values are normalized to the same behavior as an omitted status filter for /api/v1/bounties, /api/v1/bounties/summary, and the public /bounties page. Non-empty invalid values still return the existing 400 validation error, and the public page no longer renders an impossible blank selected status.
Validation run locally:
uv run --extra dev python -m pytest tests/test_bounty_pages.py::test_bounties_page_renders_and_filters_by_status tests/test_bounty_pages.py::test_bounties_summary_api_matches_public_list_filters tests/test_public_routes.py::test_public_bounties_context_normalizes_filter_state -q-> 3 passeduv run --extra dev python -m pytest -q-> 413 passeduv run --extra dev python scripts/docs_smoke.py-> docs smoke okuv run --extra dev ruff check app/bounty_api.py app/public_routes.py tests/test_bounty_pages.py tests/test_public_routes.py-> passeduv run --extra dev ruff format --check app/bounty_api.py app/public_routes.py tests/test_bounty_pages.py tests/test_public_routes.py-> 4 files already formatteduv run --extra dev mypy app-> successgit diff --check origin/main...HEAD-> cleangitleaks detect --no-banner --redact --source . --log-opts origin/main..HEAD --exit-code 1-> no leaks found
GitHub quality/docs/image check is successful and CodeRabbit reports no actionable comments. No inline comments.
jtc268
left a comment
There was a problem hiding this comment.
Approved.
I reviewed head f013c22. The blank status handling stays scoped across public page context and API summary/list logic; empty status now behaves like no filter while invalid non-empty values remain validated. Regression tests cover the page, summary API, and context helper.
Validation I ran:
- tests/test_bounty_pages.py tests/test_public_routes.py with isolated sqlite: 8 passed
- full pytest with isolated sqlite: 413 passed
- ruff check app/bounty_api.py app/public_routes.py tests/test_bounty_pages.py tests/test_public_routes.py passed
- ruff format --check app/bounty_api.py app/public_routes.py tests/test_bounty_pages.py tests/test_public_routes.py: 4 files already formatted
- mypy app passed
- docs smoke passed
- git diff --check origin/main...HEAD clean
|
Reviewed current head No blocker found. Evidence checked:
Validation: No private data, credentials, wallet material, payout guarantees, price/liquidity/exchange/off-ramp claims, or production mutation were used. |
eliasx45
left a comment
There was a problem hiding this comment.
Reviewed PR #463 at current head f013c22860aa005009c1590bbce948bec7bf6843.
No blocker found. Blank or whitespace-only status values now behave like an omitted status filter on the public /bounties page and summary/list API paths, while non-empty invalid statuses still keep the existing validation failure. The public page also returns the All filter state for ?status= instead of rendering a blank selected status.
I also checked current mergeability against origin/main: git merge --no-commit --no-ff origin/main auto-merged cleanly, then I aborted the probe to leave the branch unchanged.
Validation run locally:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_bounty_pages.py::test_bounties_page_renders_and_filters_by_status tests\test_bounty_pages.py::test_bounties_summary_api_matches_public_list_filters tests\test_public_routes.py::test_public_bounties_context_normalizes_filter_state -q-> 3 passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_bounty_pages.py tests\test_public_routes.py -q-> 8 passed.\.venv\Scripts\python.exe -m ruff check app\bounty_api.py app\public_routes.py tests\test_bounty_pages.py tests\test_public_routes.py-> all checks passed.\.venv\Scripts\python.exe -m ruff format --check app\bounty_api.py app\public_routes.py tests\test_bounty_pages.py tests\test_public_routes.py-> 4 files already formattedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m mypy app\bounty_api.py app\public_routes.py-> successPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe scripts\docs_smoke.py-> docs smoke okgit diff --check origin/main...HEAD-> clean
Bounty #406
Summary
statusquery values as no bounty status filter.Why
Copied or form-generated URLs can include
?status=. Before this change, that empty value was stripped and then validated as an invalid status, producing a400instead of showing the unfiltered bounty list. Non-empty invalid status values still return the existing validation error.Validation
./.venv312/bin/python -m pytest -q-> 413 passed./.venv312/bin/python -m ruff format --check .-> 79 files already formatted./.venv312/bin/python -m ruff check .-> All checks passed./.venv312/bin/python -m mypy app-> Success: no issues found in 30 source filesgit diff --check-> cleanSummary by CodeRabbit
Bug Fixes
?status=) now behave like no filter is applied instead of returning a validation error. Valid status values (open, paid, closed) remain validated and filter results correctly.Tests