Skip to content

Fix cannot run raptor - #16694

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
wangq8:bugfix/fix-run-raptor
Jul 7, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
wangq8:bugfix/fix-run-raptor

Conversation

@wangq8

@wangq8 wangq8 commented Jul 7, 2026 •

Copy link
Copy Markdown
Collaborator

Follow on PR #16515

@wangq8 wangq8 added the ci Continue Integration label Jul 7, 2026
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

TaskHandler.handle() now includes an explicit branch for task_type == "raptor" that invokes _run_raptor(), preventing raptor tasks from falling through to the graphrag/mindmap/etc. checks and standard chunking fallback. The graphrag branch is now an elif following this new case.

Changes

Task Dispatch Routing

Layer / File(s) Summary
Add raptor dispatch branch
rag/svr/task_executor_refactor/task_handler.py
Adds explicit task_type == "raptor" branch calling _run_raptor(...), with the existing graphrag check now an elif after it.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A hop, a skip, a routing tweak,
Raptor tasks no longer leak.
Straight to their path, quick and neat,
This bunny's code review complete! 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided, so the required Summary section and context are missing. Add a Summary section that explains the bug, the root cause, and how this change fixes raptor execution.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main change: adding the RAPTOR execution path so raptor tasks can run.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: LGTM ✅

Summary: This fixes a bug where task_type == "raptor" tasks would fall through all routing branches without being handled, effectively doing nothing.

What was missing

The routing block only handled graphrag, mindmap, artifact, and dataflow. RAPTOR tasks had no matching branch.

What the fix does

  • Adds if task_type == "raptor": before the existing branches
  • Changes the existing if task_type == "graphrag": to elif to maintain a proper chain

Verification

  • embedding_model and vector_size are both initialized at line 229 (before the routing block) ✅
  • _run_raptor() signature is (self, embedding_model: LLMBundle, vector_size: int, mark_done: bool = True) — the call passes those two positional args correctly ✅

Risk assessment

  • Regression risk: Very low. Only adds a new branch; existing behavior untouched.
  • Security/performance: No concerns. Single await call, no new imports or data flow changes.

Nice catch and minimal fix — lands cleanly.

@wangq8
wangq8 marked this pull request as draft July 7, 2026 07:28
@wangq8
wangq8 marked this pull request as ready for review July 7, 2026 07:28
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (9eba452) to head (36239e7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16694   +/-   ##
=======================================
  Coverage   93.16%   93.16%           
=======================================
  Files          10       10           
  Lines         717      717           
  Branches      118      118           
=======================================
  Hits          668      668           
  Misses         29       29           
  Partials       20       20           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wangq8
wangq8 merged commit 2de5940 into infiniflow:main Jul 7, 2026
9 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant