Repository navigation
Fix: empty metadata conditions and non-integer available flags - #19508
MoonPointer-Byte wants to merge 1 commit into
Conversation
Skip metadata filtering when conditions is empty so retrieval keeps caller document_ids (or None) instead of scoping to "-999", matching Go MetadataConditionToDocIDs. Also return data errors for non-integer available/available_int instead of 500s.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe chunk API now preserves document scope when metadata conditions are empty and returns data errors for non-integer availability flags. Unit tests and route stubs cover both behaviors. ChangesChunk API fixes
Estimated code review effort: 3 (Moderate) | ~20 minutes Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to Empty metadata conditions now allow unfiltered retrieval and preserve requested document IDs, while invalid availability values receive clear data errors without changing stored chunks. No concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. A rabbit checks the chunks with care Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19508 +/- ##
==========================================
- Coverage 37.29% 36.44% -0.85%
==========================================
Files 54 54
Lines 15353 16135 +782
Branches 119 125 +6
==========================================
+ Hits 5726 5881 +155
- Misses 9601 10227 +626
- Partials 26 27 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This reply was generated by Hands-Free-Vibe-for-RAGFlow. LGTM 🚀 What was verified
Verification tier: Python REST runtime change — programmatic drive of every changed route from an authenticated browser session, plus a browser UI pass over the retrieval-testing page and the document chunk view (screenshots captured). Non-blocking notes:
Verification screenshots |



Summary
POST /retrievalso an emptymetadata_condition.conditionslist no longer scopes the search to the sentinel document"-999". Empty conditions now mean no metadata filtering, matching GoMetadataConditionToDocIDs, and explicitdocument_idsare preserved.available/available_inton chunk update and switch routes; non-integer values return a data error instead of a 500.Fixes #19366
Fixes #19479
Test plan
pytest test/testcases/test_web_api/test_chunk_app/test_chunk_routes_unit.py(9 passed)metadata_condition.conditionsretrieval returns unfiltered chunksPATCH .../chunks/<id>with{"available":"abc"}returns a data error{"available_int":"abc"}returns a data error