Fix governance queue, migration freeze, and revocation scope#437
Draft
carrion256 wants to merge 2 commits into
Draft
Fix governance queue, migration freeze, and revocation scope#437carrion256 wants to merge 2 commits into
carrion256 wants to merge 2 commits into
Conversation
Contributor
|
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
Collaborator
Author
|
@coderabbitai review |
Contributor
✅ Actions performedReview triggered.
|
c9a0eae to
12a94c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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