docs: document bounty sort and limit filters#457
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 (2)
📝 WalkthroughWalkthroughThis PR updates the public bounty API documentation and tests to document and validate query parameters for filtering and limiting results. The open bounties summary examples now include ChangesBounty API Query Parameter Documentation and Tests
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 |
weilixiong
left a comment
There was a problem hiding this comment.
LGTM — docs and tests only, zero risk.
Verified:
- git diff --check clean
- tests/test_docs_public_urls.py: 17/17 passed (0.10s)
- Changes: +20 lines across 2 files (docs/api-examples.md + tests/test_docs_public_urls.py)
- Documents
sortandlimitquery params for /api/v1/bounties and /api/v1/bounties/summary - Test assertions match documented examples exactly
yannickvilleneuve-hash
left a comment
There was a problem hiding this comment.
Reviewed current head e45298bff9c857886b6f6137e41b2e024b1b1cb0.
No blockers found. The docs change is narrowly scoped to docs/api-examples.md and tests/test_docs_public_urls.py, and it matches the current bounty API contract:
app/bounty_api.pyaccepts optionalstatus,q,sort, andlimitfor both/api/v1/bountiesand/api/v1/bounties/summary.limitis constrained to1..200and applied after filtering/sorting.app/bounty_sorting.pydefinesnewest,reward,available, andawardswith the same meanings documented here.- The updated docs test pins the new examples and wording, while existing API/page tests cover the underlying behavior.
Validation:
uv run --extra dev python -m pytest tests/test_docs_public_urls.py::test_api_examples_document_bounty_list_response_shape tests/test_bounty_api_routes.py::test_bounty_api_limit_caps_filtered_rows tests/test_bounty_api_routes.py::test_bounty_api_limit_rejects_out_of_range_values tests/test_bounty_pages.py::test_bounties_page_and_api_sort_public_rows -q-> 4 passeduv run --extra dev python -m pytest tests/test_docs_public_urls.py tests/test_bounty_api_routes.py::test_bounty_api_limit_caps_filtered_rows tests/test_bounty_api_routes.py::test_bounty_api_limit_rejects_out_of_range_values tests/test_bounty_pages.py::test_bounties_page_and_api_sort_public_rows -q-> 25 passeduv run --extra dev python scripts/docs_smoke.py-> docs smoke okuv run --extra dev ruff check docs/api-examples.md tests/test_docs_public_urls.py-> passedgit diff --check origin/main...HEAD-> clean- Live API check:
GET /api/v1/bounties?status=open&sort=available&limit=2returned two rows ordered byavailable_mrwkdescending (920, then800) at review time. - GitHub commit status for
e45298bff9c857886b6f6137e41b2e024b1b1cb0-> success (CodeRabbit).
No public artifact hygiene issues found; this is API docs/test coverage only and does not add price, exchange, liquidity, or off-ramp claims.
/claim #426
Refs #426
Summary
/api/v1/bountiessortandlimitquery parameters indocs/api-examples.md.sortandlimit.Evidence
app/bounty_sorting.pydefines the current sort contract:newest,reward,available, andawards.app/bounty_api.pyacceptslimitfrom 1 to 200 and applies it after filtering/sorting for both list and summary responses.Validation
python3 scripts/docs_smoke.py-> docs smoke okuv run --extra dev python -m pytest tests/test_docs_public_urls.py::test_api_examples_document_bounty_list_response_shape -q-> 1 passeduv run --extra dev python -m pytest tests/test_docs_public_urls.py -q-> 22 passeduv run --extra dev python -m pytest -q-> 413 passeduv run --extra dev ruff check .-> passeduv run --extra dev ruff format --check .-> 79 files already formatteduv run --extra dev mypy app-> success, no issues in 30 source filesgit diff --check-> cleangitleaks detect --no-banner --redact --source . --exit-code 1-> no leaks foundNo private keys, wallet material, cookies, OAuth state, access tokens, signatures, secrets, price claims, liquidity claims, exchange claims, bridge promises, off-ramp promises, or fabricated payout claims are included.
Summary by CodeRabbit
Documentation
Tests