Repository navigation
Fix: get metadata conf - #14250
Fix: get metadata conf #14250
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughMetadata generation in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@rag/svr/task_executor.py`:
- Around line 417-418: The code mutates task["parser_config"]["metadata"]
in-place by calling metadata_conf.extend(...), causing duplicated
built_in_metadata across chunks and cache/hash issues; fix by creating a fresh
list copy per call (e.g., metadata_conf =
list(task["parser_config"].get("metadata") or []) +
list(task["parser_config"].get("built_in_metadata") or [])) instead of extend,
and consider hoisting this computation out of gen_metadata_task so it runs once
per task; ensure you guard against None with "or []" so you never call extend or
plus with None (affecting functions like turn2jsonschema and get_llm_cache).
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d9842107-f901-4094-9192-d50b0cfe4b29
📒 Files selected for processing (1)
rag/svr/task_executor.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14250 +/- ##
=======================================
Coverage 96.66% 96.66%
=======================================
Files 10 10
Lines 690 690
Branches 108 108
=======================================
Hits 667 667
Misses 8 8
Partials 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
### What problem does this PR solve? Get metadata configuration from union of custom metadata and built_in_metadata. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
What problem does this PR solve?
Get metadata configuration from union of custom metadata and built_in_metadata.
Type of change