Overview
Workflow voting is the community governance mechanism in SFLUV. Voters review pending workflow proposals and approve or deny them based on merit, budget allocation, and community needs.Voting Process
- Proposal Submission - Proposer creates workflow → status
pending - Quorum - 50% of voters must participate
- Countdown - 24 hours after quorum reached
- Early Finalization - If >50% of total voter body agrees before countdown
- Decision - Workflow becomes
approvedorrejected
Vote Calculation Logic
Get Voter Workflows
GET /voters/workflows
Auth: Voter role required
Description: Returns all pending workflow proposals awaiting votes. The endpoint:
- Expires proposals pending over 14 days (status →
expired) - Evaluates vote state and checks faucet balance for approval eligibility
- Includes authenticated voter’s decision in
votes.my_decision - Sends outcome emails if workflow transitions from pending to approved/rejected
Workflow objects with status pending
Vote on Workflow
POST /workflows/{workflow_id}/votes
Auth: Voter role required
Path Parameters:
Workflow UUID
Vote decision:
approve or denyOptional comment explaining the vote
- Records vote in database
- Evaluates vote state immediately:
- Checks if quorum reached (≥50% of voters)
- Checks if early finalization possible (>50% majority)
- Validates faucet balance if workflow would be approved
- Updates workflow status if finalized
- Sends proposer notification email if workflow approved/rejected
- Returns updated workflow with current vote counts
200- Vote recorded successfully400- Invalid decision value404- Workflow not found409- Workflow no longer pending (returned with current workflow state)500- Server error
Admin Force Approve Workflow
POST /admin/workflows/{workflow_id}/force-approve
Auth: Admin role required
Path Parameters:
Workflow UUID
- Bypasses normal voting process to immediately approve a workflow
- Sets
vote_decision: "admin_approve"(distinct from voter approval) - Still validates faucet balance (will fail if insufficient funds)
- Sends proposer notification email
200- Workflow force approved404- Workflow not found409- Workflow no longer pending, or insufficient faucet balance403- Not authenticated as admin500- Server error
Workflow Deletion Proposals
Approved or in-progress workflows cannot be directly deleted. Instead, voters must create and vote on deletion proposals.Create Deletion Proposal
POST /proposers/workflow-deletion-proposals or POST /voters/workflow-deletion-proposals
Auth: Proposer or Voter role required
Request Body:
Workflow UUID to delete
Deletion scope:
workflow (single instance) or series (all recurring instances)Explanation for deletion request
- Proposers can only create proposals for their own workflows
- Cannot create proposals for workflows that are already
deletedorpaid_out - Only one pending proposal per workflow/series allowed
201- Deletion proposal created400- Invalid target type, workflow not found, or duplicate proposal exists403- Not authorized to delete workflow (not owner)404- Workflow not found500- Server error
Get Deletion Proposals
GET /voters/workflow-deletion-proposals
Auth: Voter role required
Response: Array of WorkflowDeletionProposal objects with status pending
Vote on Deletion Proposal
POST /workflow-deletion-proposals/{proposal_id}/votes
Auth: Voter role required
Path Parameters:
Deletion proposal UUID
Vote decision:
approve or denyOptional comment
- Same voting logic as workflow proposals (quorum, countdown, early finalization)
- If approved: target workflow(s) status →
deleted - If denied: proposal closed, workflow(s) remain active
200- Vote recorded400- Invalid decision404- Proposal not found409- Proposal no longer pending500- Server error
Schema Reference
WorkflowDeletionProposal Object
Vote Decision Types
approve- Voted yes (standard voter)deny- Voted no (standard voter)admin_approve- Force approved by admin (bypasses voting)
Related Endpoints
- Workflows - Create and view workflows
- Voting Guide - How to vote on proposals
- Workflows API - Workflow management