feat(bounty): show available MRWK on bounty list page#248
Conversation
Bounty ramimbo#164 - Added `available_mrwk` (awards_remaining * reward_mrwk) to bounty API - Shows remaining MRWK value on bounty list cards - Updated docs/api-examples.md with new field
TateLyman
left a comment
There was a problem hiding this comment.
No blockers found in PR #248. I reviewed the available-MRWK calculation as an API/template display change rather than a ledger mutation.
Evidence checked:
- Inspected
app/main.py;available_microunitsis derived after the existing status-awareawards_remainingcalculation, so closed/paid bounties inherit0available while open multi-award bounties showawards_remaining * reward_microunits. - Inspected
app/templates/bounties.html; the list page only renders the new formattedavailable_mrwkvalue already produced bybounty_to_dict, leaving issue links, per-award reward, award counts, and status rendering intact. - Inspected
docs/api-examples.md; the example is internally consistent:reward_mrwk: "100",max_awards: 5,awards_paid: 4,awards_remaining: 1, andavailable_mrwk: "100". - Ran
uv run --python 3.12 --extra dev pytest tests/test_bounty_pages.py tests/test_api_mcp.py::test_health_status_and_bounty_api -q-> 5 passed. - Ran
uv run --python 3.12 --extra dev ruff check app/main.py-> passed. - Ran
uv run --python 3.12 --extra dev ruff format --check app/main.py-> 1 file already formatted. - Ran
uv run --python 3.12 --extra dev python scripts/docs_smoke.py-> docs smoke ok. - Ran
git diff --check origin/main...HEAD-> clean. - Hosted
Quality, readiness, docs, and image checksis green.
No secrets, wallet material, payout details, private deployment values, private vulnerability details, or MRWK price claims were reviewed or disclosed.
SihyeonJeon
left a comment
There was a problem hiding this comment.
Requesting changes because this PR changes public API/docs/UI behavior without regression coverage for the new field.
Evidence checked:
- Inspected the diff on head
e18cd5f:bounty_to_dict()now emitsavailable_mrwk, the bounty list template renders it, anddocs/api-examples.mddocuments it. - Ran
rg -n "available_mrwk" app tests docs; matches exist only inapp/main.py,app/templates/bounties.html, anddocs/api-examples.md, with no test assertions covering the new API field or rendered list text. - Ran the existing focused page/API checks:
./.venv/bin/python -m pytest tests/test_bounty_pages.py tests/test_api_mcp.py::test_health_status_and_bounty_api -q-> 5 passed, but these are pre-existing checks and do not fail ifavailable_mrwkis removed. - Ran
./.venv/bin/ruff check app/main.py tests/test_bounty_pages.py docs/api-examples.md-> passed, andgit diff --check origin/main...HEAD-> clean.
This is small to fix: add API/page regression coverage for available_mrwk, and ideally decide whether this should supersede or close in favor of PR #222, which covers the same available-MRWK behavior with broader page/API/docs assertions.
No secrets, wallet material, private deployment values, payout credentials, private vulnerability details, or MRWK price claims were reviewed or disclosed.
|
Held for changes. This adds public API/UI/docs behavior but does not include regression coverage for the new |
|
Added regression test (
Tests pass against the API endpoint ( |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR exposes a new ChangesAvailable MRWK feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
Refs #164
Summary
available_mrwkto public bounty API:awards_remaining * reward_mrwkdocs/api-examples.mdEvidence
Existing tests cover the bounty page rendering. No new tests needed —
bounty_to_dictis already tested throughtest_bounty_pages.py.MRWK
Bounty #164
Summary by CodeRabbit
New Features
Documentation