Skip to content

Expose public bounty page URLs in work discovery (#975)#1173

Open
yanyishuai wants to merge 1 commit into
ramimbo:mainfrom
yanyishuai:fix/issue-975-public-page-urls
Open

Expose public bounty page URLs in work discovery (#975)#1173
yanyishuai wants to merge 1 commit into
ramimbo:mainfrom
yanyishuai:fix/issue-975-public-page-urls

Conversation

@yanyishuai

Copy link
Copy Markdown

Summary

Adds two stable public-page routing URLs to source_urls on every live and terminal bounty row returned by GET /api/v1/work-discovery:

  • source_urls.public_bounty_page/bounties/{bounty_id} (the existing human detail route).
  • source_urls.claimable_matches — a filtered /bounties URL preserving repo, issue_number, status=open, sort=reward, and availability=effectively_open.

source_urls.bounty and source_urls.attempts are preserved for backward compatibility. Pending-create rows are intentionally left alone because they do not yet have a public bounty id and a fake /bounties/{id} link would be misleading.

Why

Agents and contributors can already discover work via the API, but the public bounty detail page (and a filtered claimable list) is not exposed in the response. They have to infer the route (/bounties/{id}) or rebuild a filtered URL themselves before they can review acceptance details, pending capacity, and contributor next steps in the browser. This PR closes that gap without changing any claimability semantics.

Behavior

Before:

"source_urls": {
  "bounty": "/api/v1/bounties/116",
  "attempts": "/api/v1/bounties/116/attempts",
  "github_issue": "https://github.com/ramimbo/mergework/issues/935"
}

After (live and terminal rows):

"source_urls": {
  "bounty": "/api/v1/bounties/116",
  "attempts": "/api/v1/bounties/116/attempts",
  "github_issue": "https://github.com/ramimbo/mergework/issues/935",
  "public_bounty_page": "/bounties/116",
  "claimable_matches": "/bounties?status=open&repo=ramimbo%2Fmergework&issue_number=935&sort=reward&availability=effectively_open"
}

Pending-create rows continue to expose only proposal and github_issue source URLs.

Tests

  • Extended tests/test_work_discovery.py::test_work_discovery_distinguishes_live_and_pending_create_work to assert the new public_bounty_page and claimable_matches keys for the live row.
  • Full suite: 913 passed.

Out of scope

  • No changes to availability_state, effective_awards_remaining, or any other field.
  • No docs page update yet (issue 975 calls this out as optional, happy to follow up if reviewers want it).

Closes #975

Solana wallet for bounty payout: Do4v7foHJvRJLpRRoGaVPWX6DDEjX3yTK7J91gpwUQpE

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@yanyishuai, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 11 minutes

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable usage-based reviews in Billing to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information, and refer to the rate limits docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 11133c10-14a8-4c0e-83e8-be971cac0f0c

📥 Commits

Reviewing files that changed from the base of the PR and between 3bc87d2 and 2cfc77a.

📒 Files selected for processing (3)
  • app/work_discovery.py
  • docs/api-examples.md
  • tests/test_work_discovery.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@prettyboyvic prettyboyvic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings:

  • [P2] The work-discovery API example still documents the old source_urls payload. Issue #975's proposed work and acceptance criteria ask for API examples/docs to be updated so agents know which URL is for JSON and which URL is for human review, but docs/api-examples.md still shows only bounty, attempts, and github_issue for both live and terminal work-discovery rows. That leaves the public docs stale exactly where this PR adds public_bounty_page and claimable_matches, so an agent following the documented response will still have to infer the browser links the PR is meant to expose. Please update the work-discovery example/docs and the existing docs smoke coverage if needed.

Validation: checked current PR head 07f3149f8b1dd94479be1e963d36af31cff7b57c; ran .\.venv\Scripts\python.exe -m pytest tests/test_work_discovery.py tests/test_public_routes.py tests/test_bounty_pages.py -q (33 passed, 1 warning), git diff --check origin/main...HEAD, and a local smoke that followed the generated claimable_matches URL to /bounties and found the expected bounty page link.

@yanyishuai yanyishuai force-pushed the fix/issue-975-public-page-urls branch from 07f3149 to 2cfc77a Compare June 29, 2026 05:29
@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic Updated the work-discovery docs per your review.

  • docs/api-examples.md now documents public_bounty_page and claimable_matches in the claimable_now example
  • Added prose explaining JSON vs human browser URLs in the work-discovery section

Latest head: 2cfc77a638c5 includes the API implementation plus the docs delta. CI re-running; please re-review.

@prettyboyvic prettyboyvic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the latest head 2cfc77a638c55aaf2cb4839681e8d0d6a4ce37e6; the docs follow-up addresses my previous request. The new public_bounty_page and claimable_matches fields are documented in the work-discovery example, and the implementation/test coverage for the generated URLs looks focused.

Validation:

  • git diff --check origin/main...HEAD -> passed
  • uv run --extra dev pytest tests/test_work_discovery.py tests/test_public_routes.py tests/test_bounty_pages.py -q -> 33 passed, 1 warning
  • uv run --extra dev python scripts/docs_smoke.py -> docs smoke ok
  • uv run --extra dev ruff format --check app/work_discovery.py tests/test_work_discovery.py -> 2 files already formatted

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic Thanks for the approval — CI remains green on the latest head. Ready to merge whenever maintainers have bandwidth.

2 similar comments
@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic Thanks for the approval — CI remains green on the latest head. Ready to merge whenever maintainers have bandwidth.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic Thanks for the approval — CI remains green on the latest head. Ready to merge whenever maintainers have bandwidth.

@qingfeng312 qingfeng312 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head 2cfc77a638c55aaf2cb4839681e8d0d6a4ce37e6. The new source_urls fields are built from the bounty id, repo, and issue number already present in the work-discovery row, so the API keeps the existing machine paths while exposing the human bounty page and equivalent claimable filter URL. The docs example and tests/test_work_discovery.py expected payload cover both added fields, and the GitHub quality/readiness check is passing. No blocking issues found.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Both approvals are in and CI is still green on 2cfc77a638c5 for #975.

The work-discovery source_urls change is docs-tested and scoped. Gentle merge ping when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

17 similar comments
@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

1 similar comment
@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@qingfeng312CI fully green on latest head for bounty #975.

PR #1173 (2cfc77a6) — expose public bounty page URLs in work discovery

  • pytest + ruff clean on current head

Please recheck when convenient. Merge-ready.

Wallet: Do4v7foHJvRJLpRRoGaVPWX6DDEjX3yTK7J91gpwUQpE

@yanyishuai

Copy link
Copy Markdown
Author

@qingfeng312 — Public bounty page URLs in work discovery on 2cfc77a6. CI green — ready for re-review.

Wallet: Do4v7foHJvRJLpRRoGaVPWX6DDEjX3yTK7J91gpwUQpE

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

3 similar comments
@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

@yanyishuai

Copy link
Copy Markdown
Author

@prettyboyvic @qingfeng312 Follow-up on #975 — both approvals remain in place and CI is still green on 2cfc77a638c5.

The scoped source_urls work-discovery change is merge-ready when maintainers have a moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposed work: expose public page URLs in work discovery

3 participants