Skip to content

fix(ingestion): remove broken built-in Resume pipeline - #18173

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
euvre:remove-resume-builtin-parser
Aug 12, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
euvre:remove-resume-builtin-parser

Conversation

@euvre

@euvre euvre commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

The built-in Resume ingestion pipeline template (internal/ingestion/pipeline/template/ingestion_pipeline_resume.json) hardcoded a deployment-specific LLM in its Extractor component (llm_id: THUDM/GLM-4.1V-9B-Thinking@SILICONFLOW, tenant_llm_id: 29). On any other deployment, parsing a file (e.g. a PDF) with the Resume chunk method deterministically fails at the Extractor stage:

extractor: resolve model "THUDM/GLM-4.1V-9B-Thinking@SILICONFLOW": instance "default" lookup failed: record not found
[NodeRunError] canvas: component "Extractor:ThreeDrinksAct" invoke: ...

Reproduced on a fresh deployment: upload a PDF to a dataset using the built-in Resume method, run parsing, and the task always fails with the error above. The template is an internally customized pipeline (a deployment-specific model id plus a resume-specific extraction prompt) that cannot work as a generic built-in, so this PR removes it along with its references:

  • Drop ingestion_pipeline_resume.json from the embedded builtin registry. This also removes Resume from the front-end built-in chunk-method list, which is driven by GET /api/v1/pipelines.
  • Drop the unused ParserTypeResume constant, the resume:Resume entries in the default tenant parser_ids lists (admin/user services), and the resume entry in the default parser config map.
  • Remove the resume-specific golden test and integration test pinned to the deleted template (the all-templates smoke test globs the template dir, so it adapts automatically).

Verification:

  • After the removal, the built-in chunk-method list no longer offers Resume (checked via the web UI and the /api/v1/pipelines response).
  • The same PDF parses successfully with the General method (1 chunk produced, task succeeds).
  • build.sh --test passes for the touched packages (internal/ingestion/..., internal/common, internal/admin, internal/service).

The built-in Resume ingestion pipeline template hardcoded a
deployment-specific LLM in its Extractor component
(llm_id: THUDM/GLM-4.1V-9B-Thinking@SILICONFLOW, tenant_llm_id: 29).
On any other deployment, parsing a file (e.g. PDF) with the Resume
chunk method deterministically fails at the Extractor stage with:

  extractor: resolve model "THUDM/GLM-4.1V-9B-Thinking@SILICONFLOW":
  instance "default" lookup failed: record not found

The template is an internally customized pipeline (deployment-specific
model id plus a resume-specific extraction prompt) that cannot work as
a generic built-in, so remove it along with its references:

- drop template/ingestion_pipeline_resume.json from the embedded
  builtin registry, which also removes Resume from the front-end
  built-in chunk-method list (driven by GET /api/v1/pipelines)
- drop ParserTypeResume from entity, the resume entries from the
  default tenant parser_ids lists, and the resume default parser config
- remove resume-specific golden/integration tests pinned to the
  deleted template

Verified: after the removal the built-in chunk-method list no longer
offers Resume, and the same PDF parses successfully with the General
method.
@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 Aug 12, 2026
@euvre euvre added the ci Continue Integration label Aug 12, 2026
@euvre
euvre requested a review from wangq8 August 12, 2026 09:48
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The resume parser type, default tenant mappings, built-in pipeline template, registry entry, and related integration and coverage tests were removed. The default user configuration retains the qa:Q&A mapping.

Changes

Resume parser removal

Layer / File(s) Summary
Remove resume parser configuration and implementation
internal/entity/dataset.go, internal/common/parser_config.go, internal/admin/service.go, internal/service/user.go, internal/ingestion/pipeline/template/ingestion_pipeline_resume.json, internal/ingestion/pipeline/builtin_registry_test.go
The resume parser type, default mappings, built-in registry entry, and resume ingestion pipeline template were removed.
Remove resume pipeline validation
internal/ingestion/pipeline/template_integration_test.go, internal/ingestion/task/pipeline_executor_defaults_test.go
The real resume pipeline integration test and resume template coverage were removed. Remaining template tests cover qa and table.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

Suggested reviewers: yuzhichang

Poem

I’m a rabbit pruning parser vines,
Resume hops away from the lines.
QA stays in the burrow bright,
Tests grow smaller, clean, and light.
Thump, thump—the pipeline’s right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the removal of the broken built-in Resume ingestion pipeline.
Description check ✅ Passed The description includes the required Summary section, explains the failure, lists the changes, and documents verification results.
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.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/admin/service.go`:
- Line 255: Remove the resume:Resume entry from the fallback parser
configuration in common/settings.py, alongside the default parser mapping used
when llm_settings["parsers"] is unset. Keep the remaining parser defaults
unchanged so all default configuration paths no longer register Resume.
🪄 Autofix

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 Plus

Run ID: d6e1d477-a841-4e57-bcb3-89c04095a069

📥 Commits

Reviewing files that changed from the base of the PR and between c677e9a and 52666de.

📒 Files selected for processing (8)
  • internal/admin/service.go
  • internal/common/parser_config.go
  • internal/entity/dataset.go
  • internal/ingestion/pipeline/builtin_registry_test.go
  • internal/ingestion/pipeline/template/ingestion_pipeline_resume.json
  • internal/ingestion/pipeline/template_integration_test.go
  • internal/ingestion/task/pipeline_executor_defaults_test.go
  • internal/service/user.go
💤 Files with no reviewable changes (5)
  • internal/ingestion/pipeline/builtin_registry_test.go
  • internal/common/parser_config.go
  • internal/ingestion/pipeline/template/ingestion_pipeline_resume.json
  • internal/entity/dataset.go
  • internal/ingestion/pipeline/template_integration_test.go

Comment thread internal/admin/service.go
var ttsModel *string = nil
var ocrModel *string = nil
parserIDs := "naive:General,qa:Q&A,resume:Resume,manual:Manual,table:Table,paper:Paper,book:Book,laws:Laws,presentation:Presentation,picture:Picture,one:One,audio:Audio,email:Email"
parserIDs := "naive:General,qa:Q&A,manual:Manual,table:Table,paper:Paper,book:Book,laws:Laws,presentation:Presentation,picture:Picture,one:One,audio:Audio,email:Email"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Remove resume:Resume from the remaining default configuration.

Line 255 removes Resume from the Go-created tenant configuration, but the supplied common/settings.py:260-263 fallback still contains resume:Resume. When llm_settings["parsers"] is unset, that fallback can still register Resume and expose the broken parser.

Remove the same entry from common/settings.py so all default configuration paths satisfy the PR objective.

Suggested fix
-        "parsers", "naive:General,qa:Q&A,resume:Resume,manual:Manual,table:Table,paper:Paper,book:Book,laws:Laws,presentation:Presentation,picture:Picture,one:One,audio:Audio,email:Email,tag:Tag"
+        "parsers", "naive:General,qa:Q&A,manual:Manual,table:Table,paper:Paper,book:Book,laws:Laws,presentation:Presentation,picture:Picture,one:One,audio:Audio,email:Email,tag:Tag"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/admin/service.go` at line 255, Remove the resume:Resume entry from
the fallback parser configuration in common/settings.py, alongside the default
parser mapping used when llm_settings["parsers"] is unset. Keep the remaining
parser defaults unchanged so all default configuration paths no longer register
Resume.

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for catching and cleaning this up. The hardcoded deployment-specific LLM (THUDM/GLM-4.1V-9B-Thinking@SILICONFLOW + tenant_llm_id: 29) makes the built-in Resume template a guaranteed failure on any deployment without that exact model — this is a real bug and removing it is the right call.

Cleanup is thorough:

  • Template JSON deleted
  • ParserTypeResume constant removed from dataset.go
  • "resume" entry removed from parser config map
  • resume:Resume stripped from both admin/service.go (CreateUser) and service/user.go (Register) parser ID lists
  • Builtin registry test golden updated
  • Integration test + golden component params test removed
  • The all-templates smoke test globs the template dir, so it adapts automatically — no coverage gap

One thing to note (not blocking): Existing tenants/datasets that had parser_id="resume" will now get a "method not found" error instead of the confusing LLM resolution error. This is strictly better (actionable failure vs silent confusion), but might be worth a brief mention in release notes so self-hosted deployments know to switch affected datasets to the General method.

Nice clean PR — LGTM.

@wangq8
wangq8 merged commit 3d64f8d into infiniflow:main Aug 12, 2026
9 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.

2 participants