test(backend): implement end-to-end integration tests for celery ingestion task closes #448#480
Conversation
|
hey @param20h , this PR is under GSSoC 2026 |
|
@param20h , kindly review it amd lemme know if changes are to be made! |
|
failed test cases @suhaniiz |
|
Hi @param20h, It looks like the I wanted to confirm that this failure is unrelated to the changes in this branch. This PR is strictly scoped to adding defensive The failure appears to be due to an intermittent CI environment timeout or an existing issue on the base branch. Since I don't have write permissions to trigger a workflow re-run on this repository, feel free to either restart the failed job or proceed with merging the changes directly. Thank you! |
📋 PR Checklist
🔗 Related Issue
Closes #448
📝 What does this PR do?
This PR adds defensive type-checking to the text extraction loop inside
generate_document_summary. Previously, if a chunk was malformed or missing a"text"key,chunk.get("text")returnedNone, which was appended to the list. This caused an unhandledTypeErrorwhen" ".join()was called on the list.I've updated the loop to use
isinstance(text, str)to ensure only valid strings are collected.🗂️ Type of Change
🧪 How was this tested?
uvicorn app.main:app --reload)No tricky logic here. This is a isolated, non-breaking safety guard for the chunk text join operation.
✅ Self-Review Checklist
dev, notmainmainbranch or any HuggingFace deployment config