Fix governance queue, migration freeze, and revocation scope#437
Fix governance queue, migration freeze, and revocation scope#437carrion256 wants to merge 2 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
3837cf4 to
c9a0eae
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
c9a0eae to
12a94c0
Compare
|
fixed on #457 |
Summary
2ebfb469-1ead-41a7-b58b-9d11224efa3b: skip pending-queue schedule/save for immediately accepted governance submissions; immediate proposals now rely on submitted/accepted events and only persist the queue when replacing an existing pending same-key proposal.Fixes three medium governance-control-plane findings in one cohesive Soroban governance/runtime patch:
ed860a7d-48be-4376-bdae-09f87e737446: add an explicit pending proposal cap before scheduling new timelocked proposals, while preserving replacement and immediate-action behavior.05cb8c51-e843-4f72-aadc-3a3ef9f73115: reject governance command execution while the vault migration flag is active via a centralized command-boundary guard.fed4779d-4d92-4f47-92d0-9f06052ca303: replace broad revoker authorization with role-scoped revocation checks derived from the proposal kind.Verification
RED before fix:
cargo test -p templar-soroban-governance pending_queue_cap -- --nocapturefailed on queue overflow returningOk(65)instead ofErr(InvalidInput).cargo test -p templar-soroban-governance guardian_cannot -- --nocapturefailed with guardian revoking fee proposals by id/kind.cargo test -p templar-soroban-governance sentinel_cannot -- --nocapturefailed with sentinel revoking Other/Governance proposals.cargo test -p templar-soroban-runtime test_execute_governance_config_rejected_while_migration_in_progress -- --nocapturefailed with governance config mutation succeeding during migration.cargo test -p templar-soroban-runtime test_execute_governance_skim_rejected_while_migration_in_progress -- --nocapturefailed without the typed migration guard.GREEN after fix:
cargo test -p templar-soroban-governance pending_queue_cap -- --nocapturecargo test -p templar-soroban-governance guardian_cannot -- --nocapturecargo test -p templar-soroban-governance sentinel_cannot -- --nocapturecargo test -p templar-soroban-runtime test_execute_governance_config_rejected_while_migration_in_progress -- --nocapturecargo test -p templar-soroban-runtime test_execute_governance_skim_rejected_while_migration_in_progress -- --nocapturecargo fmt --all -- --checkcargo test -p templar-soroban-governance -- --nocapturecargo test -p templar-soroban-runtime --lib -- --nocapturegit diff --checkjust -f contract/vault/soroban/justfile buildjust -f contract/vault/soroban/justfile size-budget-check— runtime deploy WASM94425bytes <=131072bytesPost-commit hook also re-ran
size-budget-checksuccessfully at94425bytes.A-102 verification
cargo test -p templar-soroban-governance pause_immediate_unpause_timelocked -- --nocapturecargo test -p templar-soroban-governance pending_queue_cap_does_not_block_immediate_pause -- --nocapturecargo test -p templar-soroban-governance -- --nocapture— 34 passedgit diff --checkjust -f contract/vault/soroban/justfile size-budget-check— deploy WASM94145 <= 1310723837cf4(fix: skip immediate governance queue persistence)This change is