Skip to content

Implement milestone payouts#611

Closed
codebestia wants to merge 2 commits intoSolFoundry:mainfrom
codebestia:feat/milestone-payouts
Closed

Implement milestone payouts#611
codebestia wants to merge 2 commits intoSolFoundry:mainfrom
codebestia:feat/milestone-payouts

Conversation

@codebestia
Copy link
Copy Markdown
Contributor

Description

Implement milestone-based payouts for T3 bounties to enable partial payments at defined checkpoints throughout large-scale projects. This PR introduces the core models, backend services, API endpoints, and frontend components required for milestone management and automated reward distribution.

Closes #494

Solana Wallet for Payout

Wallet: 4QhseKvBuaCQhdkP248iXoUxohPzVC5m8pE9hAv4nMYw

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • ✅ Test addition/update
  • 🎨 Style/UI update
  • ♻️ Code refactoring

Checklist

  • Code is clean and follows the issue spec exactly
  • One PR per bounty (no multiple bounties in one PR)
  • Tests included for new functionality
  • All existing tests pass
  • No console.log or debugging code left behind
  • No hardcoded secrets or API keys

Testing

  • Manual testing performed (Milestone creation, submission, and approval flows)
  • Unit tests added/updated (backend/tests/test_milestones.py)
  • Integration tests added/updated (Verified API endpoints with mock DB session)

Screenshots (if applicable)

Additional Notes

  • Sequential Approval: The system enforces that milestones must be approved in numerical order (N+1 cannot be approved before N).
  • Proportional Payouts: Payouts are automatically triggered via payout_service using the milestone's defined percentage of the total bounty reward.
  • Telegram Notifications: Bounty creators are notified via the Telegram service whenever a milestone is submitted for review.
  • Database Migration: Includes Alembic migration 003_milestones for the new bounties_milestones table.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 22, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Adds milestone support for T3 bounties across backend and frontend. Includes an Alembic migration to create bounties_milestones, new ORM (MilestoneTable) and Pydantic models, a MilestoneService with create/submit/approve flows (with sequential enforcement and payout-on-approval), persistence/load helpers, Telegram notifications, async lifecycle changes and claim fields, API endpoints for milestones, frontend UI for milestone creation and progress, and unit/integration tests covering lifecycle and validation.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

Possibly related PRs

Suggested labels

changes-requested

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR addresses most requirements from issue #494: models, API endpoints, percentage validation, sequential approval, Telegram notifications, and migration are implemented. However, the integration test coverage appears incomplete per reviewer feedback—a 3-milestone scenario with payout verification is noted as missing or insufficient. Add a comprehensive 3-milestone integration test that creates a T3 bounty, claims it, submits and approves each milestone sequentially, and explicitly verifies payout records/transactions match expected proportional amounts totaling the full reward.
Out of Scope Changes check ❓ Inconclusive The PR includes baseline changes (lifecycle service async conversion, claim fields on bounties table) that support the core milestone feature but may extend beyond the strict scope of #494 requirements for milestone-only payouts. Verify that claim-tracking fields and async lifecycle refactoring are necessary preconditions for milestone payouts or separate out those changes into a dedicated preparatory PR to isolate the milestone feature scope.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Implement milestone payouts' is clear, concise, and accurately describes the primary change—introducing milestone-based payout functionality for T3 bounties.
Description check ✅ Passed The description is related to the changeset, explaining the motivation (partial payments at checkpoints), key features (sequential approval, proportional payouts, Telegram notifications), and testing approach.
Docstring Coverage ✅ Passed Docstring coverage is 83.72% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@codebestia
Copy link
Copy Markdown
Contributor Author

Fixing this now one second

Okay

@codebestia codebestia closed this Mar 22, 2026
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.

1 participant