[codex] fix proxy curator governance facade routes#464
Conversation
📝 WalkthroughSummaryThis PR fixes governance routing in the proxy-curator-soroban contract's facade for two critical operations: Key Changescontract/proxy-curator-soroban/src/contract.rs:
contract/proxy-curator-soroban/src/lib.rs:
contract/proxy-curator-soroban/src/tests.rs:
.gitignore:
Critical Review Points
WalkthroughThe PR migrates the curator proxy's ChangesCurator Proxy Governance Submission Semantics
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@contract/proxy-curator-soroban/src/tests.rs`:
- Around line 623-649: The test only verifies a single SupplyQueueProposalEntry
and can miss truncation/reordering bugs; update the test that calls
SorobanCuratorProxyContract::set_supply_queue to use at least two
SupplyQueueProposalEntry elements when constructing supply_entries (the
Vec::from_array call), then after retrieving supply_queue_call via
MockGovernanceContract::last_set_supply_queue assert entries.len() == 2 and
assert the returned entries vector is equal to the original supply_entries (or
perform element-wise equality checks using entries.get_unchecked(i) ==
supply_entries.get_unchecked(i) for both indices) to ensure full-vector equality
and order is preserved.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 10c6e3c6-0cf1-412e-afce-1bd54d106d67
📒 Files selected for processing (4)
.gitignorecontract/proxy-curator-soroban/src/contract.rscontract/proxy-curator-soroban/src/lib.rscontract/proxy-curator-soroban/src/tests.rs
Summary
proxy-curator-sorobanset_supply_queueto forwardSupplyQueueProposalEntryvalues with target ids and adapter addressescancel_migrationthrough governancesubmit_cancel_migrationinstead of direct vault executionRoot cause
The new curator proxy facade exposed helper signatures that did not match the underlying governance/vault contracts.
set_supply_queueforwarded only market ids, andcancel_migrationbypassed the governance contract even though the vault only accepts that command from governance.Validation
cargo test -p templar-curator-proxy-soroban -- --nocaptureThis change is