Repository navigation
Conversation
_resolve_manual_filter mutated flt["value"] in place. The filters list
passed in is the live self._param.meta_data_filter["manual"], so once
the first iteration resolved a variable reference like
{IterationItem:abc@item}, the param dict permanently held the resolved
value and every subsequent iteration reused it — Retrieval kept
matching the first item's value for the entire loop.
Return a shallow copy with the resolved value instead, leaving the
original filter dict (and the variable reference) untouched.
Closes infiniflow#12582.
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesFilter Resolution Fix
🎯 2 (Simple) | ⏱️ ~8 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ 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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14849 +/- ##
==========================================
- Coverage 95.59% 94.16% -1.43%
==========================================
Files 10 10
Lines 703 703
Branches 112 112
==========================================
- Hits 672 662 -10
- Misses 21 25 +4
- Partials 10 16 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
Closes #12582.
When a Retrieval component sits inside an Iteration with a manual metadata filter that references the iteration variable (e.g.
{IterationItem:abc@item}), every iteration reuses the value resolved on the first pass.Root cause:
_resolve_manual_filterinagent/tools/retrieval.pymutatedflt["value"]in place. Thefilterslist passed in is the liveself._param.meta_data_filter["manual"](seeapply_meta_data_filterincommon/metadata_utils.py:257-261), so after the first iteration the param dict permanently held the resolved string instead of the original variable reference.This PR returns a shallow copy with the resolved value instead, leaving the original filter (and its variable reference) intact for the next iteration.
Type of change
Test plan
Agent (structured output → list of areas) → Iteration → Retrieval (manual filter: Area = {IterationItem/Item}) → Message. Run with a multi-area query and confirm each iteration's Retrieval result matches its own item, not the first item.auto/semi_autofilters behave unchanged.