Governance Integration Points ​
Status: Placeholder implementations Priority: Future Epic Last Updated: 2026-02-13
This document lists all locations where governance integration is planned but currently uses placeholder implementations (controller-only access).
Treasury Canister Integration Points ​
1. Escrow Release Authorization ​
File: treasury/src/lib.rs:1931-1932
ReleaseAuthority::Governance => {
return Err("Governance-authorized escrows not yet supported".to_string());
}Current Behavior: Returns error if escrow has ReleaseAuthority::Governance
Future Behavior: Should verify that a governance proposal has been passed to authorize the escrow release.
2. Milestone Approval ​
File: treasury/src/lib.rs:1468-1470
ReleaseAuthority::Governance => {
// Governance authorization not yet implemented
return Err("Governance-authorized milestone approval not yet supported".to_string());
}Current Behavior: Returns error for governance-authorized milestones
Future Behavior: Should check if a governance proposal approved this specific milestone.
3. Milestone Release ​
File: treasury/src/lib.rs:1583-1584
ReleaseAuthority::Governance => {
return Err("Governance-authorized milestone release not yet supported".to_string());
}Current Behavior: Returns error for governance-authorized releases
Future Behavior: Should verify governance approval before releasing milestone funds.
4. Escrow Authorization Check ​
File: treasury/src/lib.rs:1910
ReleaseAuthority::Governance => false, // Not yet implementedCurrent Behavior: Returns false (not authorized) for governance releases
Future Behavior: Should query governance canister to check if release is authorized.
5. Milestone Dispute Resolution ​
File: treasury/src/treasury.did:288, treasury/src/lib.rs:1767-1777
// Resolve a disputed milestone (controllers only - governance placeholder)Current Behavior: Only controllers can resolve disputes
Future Behavior: Governance proposals should be able to resolve milestone disputes.
6. Profit Sharing Authorization ​
File: treasury/src/lib.rs:2275-2281
/// Authorization: Only canister controllers (governance placeholder)
...
// Verify caller is a controller (governance placeholder)Current Behavior: Controllers approve profit distributions
Future Behavior: Governance vote should authorize annual profit distributions.
Governance Canister Integration Points ​
7. Treasury Proposal Execution ​
File: governance/src/execution.rs:211-232
fn execute_treasury(proposal: &Proposal) -> Result<(), String> {
// Currently only logs allocation details
// Future: Integrate with treasury canister for actual fund transfers
Ok(())
}Current Behavior: Logs treasury proposal execution data but performs no inter-canister call. Always returns Ok(()).
Future Behavior: Should call treasury canister to execute the authorized action (escrow release, milestone approval, profit distribution, etc.) using the proposal's execution_data payload.
8. Treasury Proposal Category ​
File: governance/src/types.rs:21-22
/// Treasury-related proposals (spending, allocations)
Treasury,Current Behavior: ProposalCategory::Treasury exists as an enum variant but has no associated action sub-types. All treasury proposals are treated generically.
Future Behavior: Should include typed action variants (e.g., EscrowRelease, MilestoneApproval, ProfitDistribution) to enable specific treasury canister calls on execution.
Integration Requirements ​
When implementing governance integration, the following will be needed:
1. Governance Canister Interface ​
// Inter-canister call to check proposal status
async fn is_proposal_executed(proposal_id: u64) -> bool;
// Check if caller voted on and proposal passed
async fn is_authorized_by_proposal(proposal_id: u64, action_type: ActionType) -> bool;2. Treasury Updates ​
- Add
governance_canister_idconfiguration - Implement inter-canister calls to governance
- Add proposal ID to
ReleaseAuthority::Governancevariant - Update all placeholder locations to make inter-canister calls
3. Governance Proposal Types ​
New proposal categories needed:
EscrowRelease(escrow_id)MilestoneApproval(escrow_id, milestone_id)MilestoneDispute(escrow_id, milestone_id, resolution)ProfitDistribution(fiscal_year, amount)
Test Coverage ​
The following test files verify placeholder behavior:
treasury/tests/escrow_tests.rs:655-662- Governance escrow rejectiontreasury/tests/escrow_tests.rs:901-907- Governance authority enum
Implementation Priority ​
| Integration Point | Impact | Priority |
|---|---|---|
| Profit Sharing Authorization | HIGH | P1 |
| Escrow Release | MEDIUM | P2 |
| Milestone Approval | MEDIUM | P2 |
| Milestone Dispute Resolution | LOW | P3 |
Notes ​
- All governance placeholders currently fail safely (deny access)
- No security risk from placeholder implementations
- Integration should be done in a dedicated epic
- Consider batching all governance integrations together