refactor: update registry initialization in CompiledGraph to use Maps for improved immutability#17
Conversation
… for improved immutability and add test for graph immutability after compilation
|
📝 WalkthroughWalkthroughThe PR modifies CompiledGraph's constructor to clone registries (nodeRegistry, edgeRegistry, subgraphRegistry) into new Map instances instead of assigning them directly, preventing shared mutable references. Corresponding immutability tests are added to verify that mutations to the original graph after compilation do not affect the compiled graph. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary by CodeRabbit
Bug Fixes
Tests