fix: Fix mixed signer/non-signer handling in post-delegation actions - #187
fix: Fix mixed signer/non-signer handling in post-delegation actions#187snawaz wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated cleartext compaction to preserve signer-storage indexing when insertable pubkeys are reused. Delegated-action validation now requires signer metas to resolve to signer storage while allowing non-signer metas to reference signer storage. Added signer security-model documentation and tests covering these cases. Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
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 `@dlp-api/src/compact/mod.rs`:
- Around line 307-318: Document the invariant in the index_of_signer closure
before the signers.iter().position(...).unwrap() call, explicitly stating that
every non-skipped signer is inserted into signers before this closure runs. Keep
the existing lookup behavior unchanged while making the unwrap’s safety
assumption clear, matching the explanatory style of the sibling index_of
closure.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: d1f8eadb-d198-4bc8-9385-c589825de971
📒 Files selected for processing (1)
dlp-api/src/compact/mod.rs

cleartext_with_insertableconstruction so an inserted non-signer reused later as a signer gets a signer slot, while inserted signers can still be reused by later non-signer metas. Now the construction ensures that:ref: https://explorer.solana.com/tx/2Kkr1hazsZXJ92qi8xL3cXLbx3f2gYr7c6iHcTvu2fH65pE45uqJ5P7UXpVAAhRGGVemPFvJNoGxBoS9AKksJ7ej
Summary by CodeRabbit