Add MCP bounty attempt inspection#334
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a new MCP tool ChangesMCP list_bounty_attempts tool
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/api-examples.md`:
- Around line 450-457: The example JSON-RPC request for the "tools/call" method
invoking "list_bounty_attempts" uses a specific "id" value (e.g., 5) but the
later sample responses show different JSON-RPC "id" values (e.g., 6 or 5
mismatched after renumbering); update the response examples so their top-level
"id" fields exactly match the corresponding request "id" values for each sample
request (ensure the responses for the "list_bounty_attempts" request and the
other renamed calls use the same numeric id as their request entries).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 08e734e7-2316-4154-a78e-3e00e5281ed5
📒 Files selected for processing (5)
app/main.pyapp/mcp.pydocs/agent-guide.mddocs/api-examples.mdtests/test_api_mcp.py
|
Fixed the CodeRabbit docs id mismatch in commit 65bcceb. Changed the MCP example responses so:
Validation:
Note: ruff format --check docs/api-examples.md is not applicable here because Ruff markdown formatting is still preview/experimental; no whitespace issues were present. |
artylobos
left a comment
There was a problem hiding this comment.
Reviewed Add MCP bounty attempt inspection.
What I checked:
- Inspected
app/main.py,app/mcp.py,docs/agent-guide.md,docs/api-examples.md, andtests/test_api_mcp.py. - Verified the new
list_bounty_attemptsMCP tool is wired into_call_mcp_tool, exposed inMCP_TOOLS, and documented in both guides. - Verified the endpoint behavior is consistent with the existing REST
/api/v1/bounties/{bounty_id}/attemptspath for active vs expired filtering, warnings, and argument rejection.
Validation:
uv run --extra dev python -m pytest tests/test_api_mcp.py::test_mcp_tools_list_and_call tests/test_api_mcp.py::test_mcp_list_bounty_attempts_reports_active_and_expired tests/test_api_mcp.py::test_mcp_list_bounty_attempts_rejects_invalid_arguments tests/test_bounty_attempts.py -q-> 6 passed.uv run --extra dev python -m pytest tests/test_api_mcp.py tests/test_bounty_attempts.py -q-> 78 passed.uv run --extra dev ruff check app/main.py app/mcp.py tests/test_api_mcp.py-> passed.uv run --extra dev ruff format --check app/main.py app/mcp.py tests/test_api_mcp.py-> passed.uv run --extra dev python -m mypy app/main.py app/mcp.py-> success.uv run --extra dev python scripts/docs_smoke.py-> docs smoke ok.git diff --check origin/main...HEAD-> clean.
No blockers found.
Bounty #321
/claim #321
Summary
list_bounty_attemptstool so agents can inspect active advisory attempts for a bounty before opening overlapping work.include_expiredandlimitsupport audit views without changing REST registration/release behavior.Validation
uv run --extra dev python -m pytest tests/test_api_mcp.py::test_mcp_tools_list_and_call tests/test_api_mcp.py::test_mcp_list_bounty_attempts_reports_active_and_expired tests/test_api_mcp.py::test_mcp_list_bounty_attempts_rejects_invalid_arguments tests/test_bounty_attempts.py -q-> 6 passeduv run --extra dev python -m pytest tests/test_api_mcp.py tests/test_bounty_attempts.py -q-> 78 passeduv run --extra dev ruff check app/main.py app/mcp.py tests/test_api_mcp.py-> passeduv run --extra dev ruff format --check app/main.py app/mcp.py tests/test_api_mcp.py-> passeduv run --extra dev python -m mypy app/main.py app/mcp.py-> successuv run --extra dev python scripts/docs_smoke.py-> docs smoke okgit diff --check-> cleanNo private keys, seed material, secrets, private vulnerability details, deployment credentials, or price claims are included.
Summary by CodeRabbit
New Features
Documentation
Tests