fix(resolver): make resolution cache values immutable to prevent corr…#1095
fix(resolver): make resolution cache values immutable to prevent corr…#1095mergify[bot] merged 1 commit intomainfrom
Conversation
…uption Store session-level cache values as tuples instead of lists so that callers cannot accidentally mutate shared cache state. Return defensive list copies from resolve() and resolve_versions() to keep the public API unchanged. Add tests verifying that cached values are immutable and that repeated resolve() calls return independent lists. Closes: #1021 Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Shanmukh Pawan <smoparth@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe change converts the internal cache in Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
fix(resolver): make resolution cache values immutable to prevent corruption
Store session-level cache values as tuples instead of lists so that callers cannot accidentally mutate shared cache state. Return defensive list copies from resolve() and resolve_versions() to keep the public API unchanged.
Add tests verifying that cached values are immutable and that repeated resolve() calls return independent lists.
Closes: #1021
Pull Request Description
What
Why