Skip to content

Fix: Restrict the parser operator so that it can only be followed by a chunker, and a chunker cannot be followed by another chunker. - #19833

Merged
wangq8 merged 2 commits into
infiniflow:mainfrom
cike8899:fix-pip-parser
Sep 18, 2026

Conversation

@cike8899

Copy link
Copy Markdown
Contributor

Summary

Fix: Restrict the parser operator so that it can only be followed by a chunker, and a chunker cannot be followed by another chunker.

@cike8899
cike8899 requested a review from wangq8 September 18, 2026 06:41
@cike8899 cike8899 added the ci Continue Integration label Sep 18, 2026
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3cc966ba-f184-4a1f-bfd8-fc58cdabc8d2

📥 Commits

Reviewing files that changed from the base of the PR and between ec09023 and e1c7341.

📒 Files selected for processing (5)
  • web/src/pages/agent/canvas/node/dropdown/accordion-operators.tsx
  • web/src/pages/agent/constant/pipeline.tsx
  • web/src/pages/agent/hooks.tsx
  • web/src/pages/agent/utils/pipeline-connection.test.ts
  • web/src/pages/agent/utils/pipeline-connection.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Go pipeline chunker definitions and topology validation. Go pipelines now restrict Parser and chunker connections. Pipeline operator dropdowns apply matching source-operator filters.

Changes

Go pipeline topology

Layer / File(s) Summary
Chunker rules and tests
web/src/pages/agent/constant/pipeline.tsx, web/src/pages/agent/utils/pipeline-connection.ts, web/src/pages/agent/utils/pipeline-connection.test.ts
Defines TokenChunker and TitleChunker as Go chunkers. Validates Parser and chunker connections. Tests cover accepted and rejected operator pairs.
Canvas connection validation
web/src/pages/agent/hooks.tsx
Applies Go topology validation when the Go backend and pipeline canvas are active. Existing connection checks remain in place.
Pipeline operator dropdown filtering
web/src/pages/agent/canvas/node/dropdown/accordion-operators.tsx
Uses the shared chunker list. Parser sources show only chunker options on Go pipelines. Chunker, Extractor, and Compiler sources hide incompatible groups.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Canvas
  participant useValidateConnection
  participant isValidGoPipelineConnection
  Canvas->>useValidateConnection: validate source and target operators
  useValidateConnection->>isValidGoPipelineConnection: check Go pipeline topology
  isValidGoPipelineConnection-->>useValidateConnection: return topology result
  useValidateConnection-->>Canvas: accept or reject connection
Loading

Merge Risk: ⚪ Minimal · up to e1c73

The Go pipeline UI now consistently restricts parser and chunker connections as intended, with no actionable current-head risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: it restricts parser-to-chunker connections and prevents chunker-to-chunker connections. It is somewhat long but remains specific and relevant.
Description check ✅ Passed The description includes the required Summary section and clearly states the purpose of the change. It does not include additional background context, but the required information is substantially com…
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.
  • Fix all pre-merge checks with AI

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

I hop through Go pipelines bright,
Chunkers line up left and right.
Parsers choose the paths they need,
Two chunkers never interbreed.
The canvas checks each link with care.

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

@wangq8
wangq8 merged commit faa0d8c into infiniflow:main Sep 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants