Add exact bounty source filters#736
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)
📝 WalkthroughWalkthroughThis PR adds optional ChangesBounty Source Filtering
Possibly related issues
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 06dd5d1f-1d95-4405-b23d-16239f9dc814
📒 Files selected for processing (9)
app/bounty_api.pyapp/public_routes.pyapp/templates/bounties.htmldocs/agent-guide.mddocs/api-examples.mdtests/test_bounty_api_routes.pytests/test_bounty_pages.pytests/test_docs_public_urls.pytests/test_public_routes.py
|
Maintenance update for the CodeRabbit source-filter label comment:
Validation:
|
Gwani-28
left a comment
There was a problem hiding this comment.
Requesting changes for one UI state-preservation gap.\n\nThe API/list implementation now accepts exact source filters, and the page correctly shows the active source filter plus the JSON results link. But the status navigation in app/templates/bounties.html:27-31 is still built only from q/sort/limit/status. If a user lands on /bounties?repo=ramimbo%2Fmergework&issue_number=649 and then clicks Paid, the rendered link is /bounties?status=paid, so the exact source selector is dropped and the page switches from that GitHub issue to all paid bounties. The same omission applies to the All/Open/Closed links.\n\nFor #712, the main workflow is starting from a precise GitHub issue URL and keeping repo=owner/name plus issue_number=N as the source selector. The HTML surface should preserve those selector params across the status filter links the same way it already preserves q/sort/limit, otherwise /bounties is not consistent with the filtered API/summary surfaces after the first status click.\n\nLocal validation on current head 6423498:\n- .venv/bin/python -m pytest tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py -q -> 63 passed, 1 existing Starlette/httpx warning\n- .venv/bin/ruff check app/bounty_api.py app/public_routes.py tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py -> passed\n- .venv/bin/ruff format --check app/bounty_api.py app/public_routes.py tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py -> 6 files already formatted\n- .venv/bin/python scripts/docs_smoke.py -> docs smoke ok\n- git diff --check origin/main...HEAD -> clean\n- git merge-tree --write-tree origin/main HEAD -> clean tree 5e1fdf93ee26a248b84b2749149b3a2ddf2f6f29\n- gh pr checks 736 --repo ramimbo/mergework -> Quality/readiness/docs/image checks passed; CodeRabbit was still pending at review time\n\nNo private data, credentials, wallet material, production mutation, price/exchange/bridge/off-ramp behavior, or fabricated payout claims were used.
|
Maintenance update for the requested status-link preservation gap:
Validation:
Thanks for catching this; the source selector now survives status navigation on the HTML surface. |
Gwani-28
left a comment
There was a problem hiding this comment.
Reviewed current head 982304e0d7418d14fa1f1f38cd98228d105047d2 after the status-link follow-up.
The previous blocker is resolved. Status filter links are now generated from normalized context and preserve exact repo and issue_number selectors alongside q, sort, and limit. The API/list and summary behavior still filters by normalized repo=owner/name and exact issue_number=N, and the public page keeps the active source filter visible with a matching JSON results link.
Local validation:
.venv/bin/python -m pytest tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py -q-> 63 passed, 1 existing Starlette/httpx warning.venv/bin/ruff check app/bounty_api.py app/public_routes.py tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py-> passed.venv/bin/ruff format --check app/bounty_api.py app/public_routes.py tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py-> 6 files already formatted.venv/bin/python scripts/docs_smoke.py-> docs smoke okgit diff --check origin/main...HEAD-> cleangit merge-tree --write-tree origin/main HEAD-> clean tree6f295192c493ce7a2d7091d35318d82c3b152e60gh pr checks 736 --repo ramimbo/mergework-> CodeRabbit passed/skipped and Quality/readiness/docs/image checks passed
No private data, credentials, wallet material, production mutation, price/exchange/bridge/off-ramp behavior, or fabricated payout claims were used.
xyjk0511
left a comment
There was a problem hiding this comment.
Reviewed PR #736 at current head 982304e0d7418d14fa1f1f38cd98228d105047d2 as a non-author current-head review.
No blocker found in the exact source-filter implementation. I checked the REST API, public /bounties page context, template state preservation, docs, and focused regression tests against source issue #712 / bounty #647.
What I verified:
/api/v1/bountiesand/api/v1/bounties/summarynow compose exactrepo=owner/nameandissue_number=Nfilters with existingstatus,q,sort, andlimithandling.- repo filters are normalized and reject control characters, while
issue_numberuses FastAPI'sge=1validation rather than broad text search semantics. /bountiespasses the same source filters through to the API-backed list, keeps the selected source filter visible, preserves it in status-filter links, and includes it in the JSON results URL.- the prior status-link preservation issue from the earlier review is fixed on this head.
- docs tell agents to use exact source filters when broad
qsearch is ambiguous, without changing payout, proof, wallet, ledger, treasury execution, or price/off-ramp behavior.
Validation run locally:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py -q-> 63 passedpython -m ruff check app/bounty_api.py app/public_routes.py tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py-> passedpython -m ruff format --check app/bounty_api.py app/public_routes.py tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py-> 6 files already formattedpython scripts/docs_smoke.py-> docs smoke okgit diff --check origin/main...HEAD-> cleangit merge-tree --write-tree origin/main HEAD-> clean tree6f295192c493ce7a2d7091d35318d82c3b152e60gh pr checks 736 --repo ramimbo/mergework-> Quality/readiness/docs/image passed; CodeRabbit passed/skipped
No private data, credentials, wallet material, production mutation, payout/proof/ledger/treasury execution, exchange/bridge/cash-out, price behavior, or fabricated payout claims were used.
JONASXZB
left a comment
There was a problem hiding this comment.
Reviewed current head 982304e0d7418d14fa1f1f38cd98228d105047d2 as a non-author.
No blocker found for the exact bounty source-filter slice. Evidence checked:
- inspected
app/bounty_api.pyand confirmed optional exactrepoandissue_numberfilters compose with existingstatus,q,sort, andlimitbehavior; - verified
repois trimmed/lowercased for exact matching, blank repo is ignored, control-character repo input returns 400, andissue_numberuses positive integer query bounds; - checked
app/public_routes.pyandapp/templates/bounties.htmlto confirm the public/bountiespage preserves source filters in JSON-results links, status links, form values, and visible labels; - checked docs in
docs/agent-guide.mdanddocs/api-examples.mdfor exact source-filter examples and the distinction from broadqsearch; - ran
MERGEWORK_DATABASE_URL=sqlite:////tmp/mergework-pr736-review-test.sqlite python -m pytest tests/test_bounty_api_routes.py tests/test_bounty_pages.py tests/test_public_routes.py tests/test_docs_public_urls.py -q-> 63 passed, 1 warning; - ran
python scripts/docs_smoke.py, targeted Ruff check/format,python -m mypy app/bounty_api.py app/public_routes.py, andgit diff --check origin/main...HEAD; - ran a local API/summary/page smoke confirming exact repo+issue filters return only the target bounty, issue-only filters can match across repositories, repo summaries work, page rendering preserves the exact filters, and control-character repo input returns 400;
- checked mergeability with
git merge-tree --write-tree origin/main HEAD-> exit 0.
Hosted status for this head is green (CodeRabbit: success; Quality, readiness, docs, and image checks: success).
Non-blocking follow-up: source-only zero-result /bounties pages currently fall through to the generic No bounties yet. empty state instead of the filtered empty-state copy. I did not treat that as a blocker for #712 because the API/summary exact selectors and positive page filter behavior satisfy the requested source-filter semantics, but it would be a nice small UI polish later.
Bounty #647
Source issue: #712
Summary
repoandissue_numberfilters to/api/v1/bounties./api/v1/bounties/summaryso capacity totals can be scoped to a source repo or exact source issue./bountiesthrough the same source filters and preserves them in the JSON results link/search form state.qsearch.Verification
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_bounty_api_routes.py tests\test_bounty_pages.py tests\test_public_routes.py tests\test_docs_public_urls.py -q-> 63 passed, 1 existing Starlette/httpx warning.\.venv\Scripts\python.exe -m ruff check app\bounty_api.py app\public_routes.py tests\test_bounty_api_routes.py tests\test_bounty_pages.py tests\test_public_routes.py tests\test_docs_public_urls.py-> All checks passed.\.venv\Scripts\python.exe -m ruff format --check app\bounty_api.py app\public_routes.py tests\test_bounty_api_routes.py tests\test_bounty_pages.py tests\test_public_routes.py tests\test_docs_public_urls.py-> 6 files already formatted.\.venv\Scripts\python.exe scripts\docs_smoke.py-> docs smoke okgit diff --check-> passedDuplicate Check
Scope
No payout execution, proof generation, ledger mutation, treasury execution, wallet behavior, balance, exchange, bridge, cash-out, price, private data, or production mutation behavior changed.
Summary by CodeRabbit
New Features
/api/v1/bountiesand/api/v1/bounties/summaryaccept repo and issue_number parameters (issue_number >= 1)Validation
Documentation
Tests