Skip to content

Show capacity reduction counters on bounty list#895

Open
szx19970521 wants to merge 2 commits into
ramimbo:mainfrom
szx19970521:codex/845-bounty-summary-capacity-20260605032141
Open

Show capacity reduction counters on bounty list#895
szx19970521 wants to merge 2 commits into
ramimbo:mainfrom
szx19970521:codex/845-bounty-summary-capacity-20260605032141

Conversation

@szx19970521
Copy link
Copy Markdown

@szx19970521 szx19970521 commented Jun 4, 2026

Summary

  • Surface existing bounty summary counters for reduced capacity and effectively unavailable rows on the public /bounties page.
  • Add regression coverage for pending payout and pending close cases so contributors can see when visible capacity differs from effective capacity.

Bounty

Refs #845

Validation

  • ..venv\Scripts\python.exe -m pytest tests/test_bounty_pages.py -q -> 18 passed, 1 existing Starlette/httpx warning.
  • ..venv\Scripts\python.exe -m ruff check tests/test_bounty_pages.py -> passed.
  • ..venv\Scripts\python.exe -m ruff format --check tests/test_bounty_pages.py -> 1 file already formatted.

Scope

No ledger, wallet, treasury execution, payout execution, admin-token, exchange, bridge, cash-out, MRWK price, private data, credentials, or secrets behavior changed.

Summary by CodeRabbit

  • New Features
    • The bounties page now provides enhanced visibility into bounty capacity status. Two new summary metrics have been added: one displaying reduced capacity bounties and another showing effectively unavailable bounties. This allows users to better understand bounty availability at a glance.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 05edfc0f-139e-49bf-9101-0dbc9ee21f58

📥 Commits

Reviewing files that changed from the base of the PR and between d4d0e48 and 95e63c6.

📒 Files selected for processing (2)
  • app/templates/bounties.html
  • tests/test_bounty_pages.py

📝 Walkthrough

Walkthrough

The PR adds two capacity-related summary metrics to the bounties list view and updates corresponding page tests. The template now displays counts for reduced-capacity and effectively-unavailable bounties, and the tests validate those displays using regex patterns instead of exact string matching.

Changes

Capacity availability summary display

Layer / File(s) Summary
Template summary metrics display
app/templates/bounties.html
Bounty list summary section adds two new article blocks that display reduced_capacity_bounties and effectively_unavailable_bounties counts.
Capacity page test assertions
tests/test_bounty_pages.py
Test file imports re module and updates pending-payout and pending-close capacity tests to use regex-based assertions for validating "Capacity reduced" and "Effectively unavailable" metrics in rendered HTML.

Possibly related issues

Possibly related PRs

  • ramimbo/mergework#705: The template and test updates render and assert the reduced_capacity_bounties and effectively_unavailable_bounties fields that were added to bounty_list_summary() in that PR.
  • ramimbo/mergework#657: The template and test updates extend the effective capacity summary metrics and corresponding capacity page assertions related to effective availability logic.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Show capacity reduction counters on bounty list' directly names the changed surface and accurately reflects the main change: displaying capacity-related summary metrics on the bounties page.
Description check ✅ Passed The description includes a clear summary of changes, explicit issue reference (Refs #845), validation evidence for tests and linting, and scope clarification. All critical sections are present and substantive.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Mergework Public Artifact Hygiene ✅ Passed PR contains no investment claims, price claims, cash-out/off-ramp claims, fabricated payout claims, or private security details. MRWK description in codebase aligns with policy.
Bounty Pr Focus ✅ Passed PR changes match stated objectives: surfaces pre-existing backend capacity counter fields in template (2 files, 15 total lines). Tests add regression coverage as described.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Copy link
Copy Markdown

@xiefuzheng713-alt xiefuzheng713-alt left a comment

Choose a reason for hiding this comment

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

Approved current head 95e63c611623c42855d3d418df8dd3759d3c9764.

Evidence checked:

  • inspected app/templates/bounties.html and confirmed the new cards only render existing bounty_list_summary() fields: reduced_capacity_bounties and effectively_unavailable_bounties;
  • inspected tests/test_bounty_pages.py and confirmed the pending-payout case asserts reduced capacity without effective unavailability, while the pending-close case asserts both reduced capacity and effective unavailability;
  • confirmed no backend, serializer, ledger, wallet, treasury, payout, admin-token, private-data, exchange, bridge, cash-out, or MRWK price behavior changed;
  • checked hosted Quality/readiness/docs/image and CodeRabbit are both successful, and the PR is mergeStateStatus CLEAN.

Validation run locally on the current head:

  • uv run --python 3.12 --extra dev python -m pytest tests/test_bounty_pages.py -q -> 18 passed, 1 existing Starlette/httpx warning
  • uv run --python 3.12 --extra dev ruff check tests/test_bounty_pages.py -> passed
  • uv run --python 3.12 --extra dev ruff format --check tests/test_bounty_pages.py -> 1 file already formatted
  • uv run --python 3.12 --extra dev python scripts/docs_smoke.py -> docs smoke ok
  • git diff --check origin/main...HEAD -> clean
  • git merge-tree --write-tree origin/main HEAD -> clean tree 30db722f4359dbe5a4ed5c53c61d205b6448a61f
  • merge-tree against PR #894's current head also clean: 63ec130818e69bfac37cf71570f6984134eb89db

Verdict: the change is a focused public bounty clarity improvement and I did not find a blocker.

Copy link
Copy Markdown

@mauricemohr88-debug mauricemohr88-debug left a comment

Choose a reason for hiding this comment

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

Current-head review for #838 on 95e63c611623c42855d3d418df8dd3759d3c9764.

Evidence checked:

  • Inspected app/templates/bounties.html; the bounty list summary now surfaces existing summary.reduced_capacity_bounties and summary.effectively_unavailable_bounties counters without changing bounty data, capacity computation, treasury state, or payout behavior.
  • Inspected tests/test_bounty_pages.py; the added assertions cover both pending payout and pending close paths, including the reduced-capacity and effectively-unavailable counter values.
  • Confirmed GitHub reports PR #895 open, current head 95e63c611623c42855d3d418df8dd3759d3c9764, merge state clean, and both visible checks successful.
  • Ran uv run --python 3.12 --extra dev python -m pytest tests/test_bounty_pages.py -q: 18 passed, 1 existing Starlette warning.
  • Ran uv run --python 3.12 --extra dev ruff check tests/test_bounty_pages.py: passed.
  • Ran uv run --python 3.12 --extra dev ruff format --check tests/test_bounty_pages.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 and git merge-tree --write-tree origin/main HEAD: clean.

No blocker found. The change is narrow, public-safe, and makes existing effective-capacity signals visible on the public bounty list.

Copy link
Copy Markdown

@stmr stmr left a comment

Choose a reason for hiding this comment

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

Reviewed current head 95e63c611623c42855d3d418df8dd3759d3c9764.

Checks I ran:

  • .venv/bin/python -m ruff check tests/test_bounty_pages.py - pass
  • .venv/bin/python -m ruff format --check tests/test_bounty_pages.py - pass
  • .venv/bin/python scripts/docs_smoke.py - pass
  • git diff --check origin/main...HEAD - pass
  • git merge-tree --write-tree origin/main HEAD - clean merge tree produced

I attempted pytest tests/test_bounty_pages.py -q, but it stayed silent in my sandbox and did not finish in a useful time window, so I am not counting pytest as passing here.

Diff review notes:

  • The template only displays summary.reduced_capacity_bounties and summary.effectively_unavailable_bounties, both of which are already returned by bounty_list_summary() and covered by existing API/page context shapes.
  • The added assertions cover both partial-capacity pending payout state and effectively unavailable pending close state, which are the two user-facing cases the new counters are meant to clarify.
  • No bounty lifecycle, ledger, wallet, treasury, payout, admin, exchange, bridge, cash-out, private data, or MRWK price behavior changes are present in this diff.

No blocker found in the reviewed diff.

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.

4 participants