fix: prevent ReWOO replay from mutating cached tool_calls#160
fix: prevent ReWOO replay from mutating cached tool_calls#160
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL 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)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #160 +/- ##
=======================================
Coverage 90.08% 90.09%
=======================================
Files 19 19
Lines 1503 1504 +1
=======================================
+ Hits 1354 1355 +1
Misses 149 149 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
colinfrisch
left a comment
There was a problem hiding this comment.
I like this and I think that we could merge it soon. I'm going to leave @sanika-n review it as she worked on ReWOO more than me. But don't hesitate if you have any questions
Fixes #159
Use copy.copy(self.current_plan) before mutating tool_calls in both plan()
and aplan() so the original plan is preserved across replay steps.
Previously, aliasing self.current_plan caused tool_calls to shrink after
the first replay step, resulting in A->A->A execution instead of A->B->C.
Adds regression tests for both sync and async replay paths.