Surface attempt state in MCP work guidance#341
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 (3)
📝 WalkthroughWalkthroughThe PR enhances the MCP ChangesWork Proof Guidance with Active Attempt State
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
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 |
TateLyman
left a comment
There was a problem hiding this comment.
Reviewed the attempt-state guidance change.
What I checked:
app/main.py:submit_work_proof(format=json)now queries active attempts for the concrete bounty, serializes them withbounty_attempt_to_dict, includesattempt_warnings, and returns advisory registration limits without mutating attempts, proofs, ledger rows, or payouts.tests/test_api_mcp.py: structured guidance covers empty attempt state, active attempt ordering/warnings, and generic no-bounty guidance.docs/agent-guide.md: documents the concrete-bounty MCP call and clarifies that generic guidance has no live attempt state.
Validation run locally:
uv run --extra dev python -m pytest tests/test_api_mcp.py::test_mcp_submit_work_proof_returns_structured_bounty_guidance tests/test_api_mcp.py::test_mcp_submit_work_proof_structured_guidance_includes_attempt_state tests/test_api_mcp.py::test_mcp_submit_work_proof_returns_structured_generic_guidance -q-> 3 passed.uv run --extra dev python -m pytest tests/test_api_mcp.py tests/test_bounty_attempts.py -q-> 77 passed.uv run --extra dev ruff check app/main.py tests/test_api_mcp.py-> passed.uv run --extra dev ruff format --check app/main.py tests/test_api_mcp.py-> passed.uv run --extra dev mypy app/main.py-> passed.uv run --extra dev python scripts/docs_smoke.py-> docs smoke ok.git diff --check origin/main...HEAD-> clean.
I did not find a behavioral blocker in the patch itself. One repository-level note: GitHub currently reports the PR merge state as UNSTABLE, so it likely needs a maintainer-side refresh/rebase before merge even though the hosted quality check is green.
Bounty #321
Summary
submit_work_proofguidance for concrete bounties.active_attempts,attempt_warnings, and the advisory attempt-registration endpoint/TTL limits so agents can see overlap before opening work.Why this is distinct
submit_work_proof(format=json)path: agents already call it for submission instructions, but it did not surface active attempts or the reservation path, so callers could miss overlap unless they knew to call a separate tool/REST endpoint.This remains advisory only. It does not create payments, claim acceptance, mutate ledger balances, register attempts, release attempts, or block maintainer decisions.
Validation
uv run --extra dev python -m pytest tests/test_api_mcp.py::test_mcp_submit_work_proof_returns_structured_bounty_guidance tests/test_api_mcp.py::test_mcp_submit_work_proof_structured_guidance_includes_attempt_state tests/test_api_mcp.py::test_mcp_submit_work_proof_returns_structured_generic_guidance -q-> 3 passeduv run --extra dev ruff check app/main.py tests/test_api_mcp.py-> passeduv run --extra dev ruff format --check app/main.py tests/test_api_mcp.py-> passeduv run --extra dev python scripts/docs_smoke.py-> docs smoke okgit diff --check-> cleanNo private keys, seed material, secrets, deployment credentials, private vulnerability details, payout credentials, or MRWK price claims are included.
Summary by CodeRabbit
New Features
Documentation
Tests