Skip to content

feat(agent): Go ingestion pipeline progress mirroring and DeepDOC parser hardening - #16795

Merged
yuzhichang merged 3 commits into
infiniflow:mainfrom
yuzhichang:agent-go-port
Jul 10, 2026
Merged

yuzhichang merged 3 commits into
infiniflow:mainfrom
yuzhichang:agent-go-port

Conversation

@yuzhichang

Copy link
Copy Markdown
Member

feat(ingestion): mirror Go pipeline progress into the document table; harden resume guards

  • pipeline: bind the owning document via WithDocumentID; after each TrackProgress event aggregate ingestion_task_log progress and mirror progress/run/progress_msg back into the document table, so GET /api/v1/datasets/{dataset_id}/documents reflects live Go pipeline progress without a bespoke endpoint.
  • canvas: extend the S3 resume guard to reject legacy no-op nodes (e.g. ExitLoop) so component_total equals the count of progress-reporting components and the aggregate percent can reach 100%.
  • runtime/canvas: route progress through TrackProgress; add interrupt test coverage (r3_interrupt_test.go).
  • dao/entity: add IngestionTask.DocumentID column and AggregateProgress support used by the mirror; IngestionTaskLog keeps a Checkpoint column alongside the progress fields.

feat(deepdoc): cache DocAnalyzer inference results in Redis (1h TTL)

  • Redis-backed DocAnalyzerCache decorator over inference.Client; cache key = "ddoc:cache::" + sha256 of the JPEG-encoded image bytes (deterministic).
  • TTL = 1h; hits skip the inner HTTP call and return cached JSON; inner errors are not cached.

refactor(deepdoc): align figure cropping with Python cropout + bounded page caches

  • CropSectionByDLA mirrors Python cropout: best-overlap DLA figure/equation region, fallback to section bbox per page, vertical concat on gray background.
  • sliding-window page-image cache bounds peak memory to the recent window instead of the whole PDF.
  • rename DLADebug -> DLARegions across parser/chunker/tests.

refactor(parser): drop lib_type selector; align NewXxxParser with NewPDFParser

  • remove config["lib_type"] lookup and the libType param/field/switch from all nine constructors; surface the CGO-required error at ParseWithResult time instead of construction time; drop resolveLibType, its test, and the four lib_type constants.

feat(utility): add a reusable workerpool for bounded concurrent execution

  • internal/utility/workerpool.go (+ tests).

refactor: translate Chinese prose comments to English in non-harness Go files.

chore: upgrade github.com/cloudwego/eino from v0.9.9 to v0.9.12.

…ser hardening

Squashed agent-go-port work, grouped by area:

feat(ingestion): mirror Go pipeline progress into the document table; harden resume guards
- pipeline: bind the owning document via WithDocumentID; after each TrackProgress event
  aggregate ingestion_task_log progress and mirror progress/run/progress_msg back into
  the document table, so GET /api/v1/datasets/{dataset_id}/documents reflects live Go
  pipeline progress without a bespoke endpoint.
- canvas: extend the S3 resume guard to reject legacy no-op nodes (e.g. ExitLoop) so
  component_total equals the count of progress-reporting components and the aggregate
  percent can reach 100%.
- runtime/canvas: route progress through TrackProgress; add interrupt test coverage
  (r3_interrupt_test.go).
- dao/entity: add IngestionTask.DocumentID column and AggregateProgress support used by
  the mirror; IngestionTaskLog keeps a Checkpoint column alongside the progress fields.

feat(deepdoc): cache DocAnalyzer inference results in Redis (1h TTL)
- Redis-backed DocAnalyzerCache decorator over inference.Client; cache key =
  "ddoc:cache:<method>:" + sha256 of the JPEG-encoded image bytes (deterministic).
- TTL = 1h; hits skip the inner HTTP call and return cached JSON; inner errors are not
  cached.

refactor(deepdoc): align figure cropping with Python cropout + bounded page caches
- CropSectionByDLA mirrors Python cropout: best-overlap DLA figure/equation region,
  fallback to section bbox per page, vertical concat on gray background.
- sliding-window page-image cache bounds peak memory to the recent window instead of
  the whole PDF.
- rename DLADebug -> DLARegions across parser/chunker/tests.

refactor(parser): drop lib_type selector; align NewXxxParser with NewPDFParser
- remove config["lib_type"] lookup and the libType param/field/switch from all nine
  constructors; surface the CGO-required error at ParseWithResult time instead of
  construction time; drop resolveLibType, its test, and the four lib_type constants.

feat(utility): add a reusable workerpool for bounded concurrent execution
- internal/utility/workerpool.go (+ tests).

refactor: translate Chinese prose comments to English in non-harness Go files.

chore: upgrade github.com/cloudwego/eino from v0.9.9 to v0.9.12.
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e351cba9-51c7-4844-9700-340f6d1ed434

📥 Commits

Reviewing files that changed from the base of the PR and between 1a7fbc7 and 169e705.

📒 Files selected for processing (1)
  • AGENTS.md
✅ Files skipped from review due to trivial changes (1)
  • AGENTS.md

📝 Walkthrough

Walkthrough

This pull request adds resumable canvas execution, structured progress logging, concurrent PDF parsing, shared native PDF synchronization, analyzer caching, multi-page cropping, fixed parser routing, and a generic worker pool, with corresponding API and test updates.

Changes

Execution and progress

Layer / File(s) Summary
Checkpointed pipeline execution
internal/agent/canvas/*, internal/ingestion/pipeline/*
Canvas compilation and pipeline execution support stable checkpoints, automatic interrupts, persisted interrupt IDs, and resume loops.
Structured progress persistence
internal/agent/runtime/*, internal/dao/ingestion.go, internal/entity/ingestion_task.go
Progress uses typed lifecycle events and persists component metadata for SQL aggregation.
Generic worker pool
internal/utility/workerpool.go
A typed worker pool supports futures, cancellation, resizing, shutdown, and statistics.

PDF processing

Layer / File(s) Summary
Concurrent parser pipeline
internal/deepdoc/parser/pdf/parser.go, parser_concurrency.go, parser_ocr.go, table_extract.go
Page workers, bounded inference, OCR wrappers, retry rendering, and deterministic document assembly are introduced.
Native lifecycle and synchronization
internal/deepdoc/parser/pdf/pdfsync/*, pdfium/*, pdfoxide/*
Native PDF calls share a process-wide mutex; parse results retain engines until explicit closure.
Caching and cropping
internal/deepdoc/parser/pdf/inference/*, internal/deepdoc/parser/pdf/util/crop.go, internal/ingestion/component/chunker/*
Analyzer results are cached and image/table crops support position matrices and multiple pages.

Parser integration

Layer / File(s) Summary
Fixed parser selection
internal/parser/parser/*, internal/ingestion/component/parser*.go
Parser constructors and routing no longer accept library-selection configuration.
Ingestion contracts
internal/ingestion/component/document_storage.go, schema/chunker.go
Storage helpers are exported and upstream chunk metadata carries document storage references.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested labels: 💞 feature, ☯️ refactor, 🧪 test

Suggested reviewers: yingfeng, JinHai-CN

Poem

A rabbit hops through checkpoints bright,
While pages race in worker flight.
Redis keeps each trail in view,
Cropped figures bloom anew.
Thump, thump—the pipeline’s right!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 67.68% which is insufficient. The required threshold is 80.00%. 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 summarizes the main changes: ingestion progress mirroring and DeepDOC parser hardening.
Description check ✅ Passed The description provides a useful summary of the PR’s goals and major change areas, though it doesn’t use the template heading.
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: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/parser/parser/pdf_parser_common.go (1)

650-673: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Native PDF engine leaks on unsupported outputFormat.

When opts.outputFormat is neither "json" nor "markdown", the default branch returns an error without calling parsed.Close(). At that point parseFn has already succeeded, so parsed.Engine holds a live native PDF backend (file descriptors, memory) that is never released. The JSON and Markdown branches both close the engine via processed.Close(), but the error path does not.

🔧 Proposed fix: close engine before returning error
 	default:
+		parsed.Close()
 		return ParseResult{Err: fmt.Errorf("parser: unsupported PDF output_format %q", opts.outputFormat)}
 	}
🤖 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/parser/parser/pdf_parser_common.go` around lines 650 - 673, Ensure
parsePDFWithDeepDocOptions releases the successfully parsed native engine when
outputFormat is unsupported: in the default branch, close parsed (or its engine)
before returning the error, matching the cleanup performed by the JSON and
Markdown processing paths.
🧹 Nitpick comments (4)
internal/deepdoc/parser/pdf/inference/cache.go (1)

156-171: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Compute cache key once to avoid double JPEG encoding on cache miss.

cacheKeyOrEmpty is called twice per method invocation — once before the lookup and once before the store. Each call encodes the image to JPEG and hashes it. On a cache miss this doubles the encoding cost for every page image. Compute the key once and reuse it for both paths.

The same pattern repeats in TSR (174–189), OCRDetect (192–207), and OCRRecognize (210–225).

♻️ Proposed refactor for DLA (apply same pattern to TSR/OCRDetect/OCRRecognize)
 func (c *DocAnalyzerCache) DLA(ctx context.Context, img image.Image) ([]doctype.DLARegion, error) {
-	if key := cacheKeyOrEmpty("dla", img); key != "" && c.store.Enabled() {
+	key := cacheKeyOrEmpty("dla", img)
+	if key != "" && c.store.Enabled() {
 		var cached []doctype.DLARegion
 		if c.store.GetObj(key, &cached) {
 			return cached, nil
 		}
 	}
 	out, err := c.inner.DLA(ctx, img)
 	if err != nil || img == nil {
 		return out, err
 	}
-	if key := cacheKeyOrEmpty("dla", img); key != "" && c.store.Enabled() {
+	if key != "" && c.store.Enabled() {
 		c.store.SetObj(key, out, c.ttl)
 	}
 	return out, nil
 }
🤖 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/deepdoc/parser/pdf/inference/cache.go` around lines 156 - 171,
Compute the cache key once at the start of each method—DLA, TSR, OCRDetect, and
OCRRecognize—when caching is enabled, store it in a local variable, and reuse it
for both cache lookup and result storage. Remove the repeated cacheKeyOrEmpty
calls so each invocation encodes and hashes the image at most once.
internal/ingestion/pipeline/pipeline.go (1)

509-509: 🚀 Performance & Scalability | 🔵 Trivial | 🏗️ Heavy lift

deriveDocumentProgress queries the DB on every progress event — O(N²) log reads.

taskLogProgressCallback calls deriveDocumentProgress on every component start/done/fail event. Each call invokes logDAO.AggregateProgress which reads all ingestion_task_log rows for the task. For a pipeline with N components, this results in ~2N events × O(N) rows per query = O(N²) total log reads on the hot path.

Consider maintaining incremental counters (doneCount, runningCount, failedCount) in the closure and computing progress/run without a DB round-trip. On resume, re-initialize the counters from a single AggregateProgress call.

Also applies to: 521-539

🤖 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/ingestion/pipeline/pipeline.go` at line 509, Refactor
taskLogProgressCallback and deriveDocumentProgress to avoid querying
AggregateProgress on every progress event: initialize doneCount, runningCount,
and failedCount once from a single AggregateProgress call when resuming, then
update these counters as components start, complete, or fail and compute
progress/run from them. Remove the per-event logDAO.AggregateProgress call while
preserving existing progress semantics.
internal/deepdoc/parser/pdf/pdfoxide/pdf_oxide_adapter.go (1)

325-375: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Consider moving pixel processing outside the PDFium mutex.

renderPageFromDoc (lines 356–375) performs the native RenderPageRaw call followed by a pure-Go pixel alpha-premultiplication loop. Both the standalone RenderPage (line 334) and Document.RenderPage (line 349) invoke it inside pdfsync.With, so the pixel loop holds pdfsync.Mu for the entire render+process duration. Since the loop is pure Go and touches no PDFium state, it doesn't need the lock. Moving it outside would let the next concurrent render acquire the mutex while the previous pixel processing runs, improving pipeline throughput for multi-page parsing.

♻️ Proposed refactor: split native render from pixel processing
 func RenderPage(pdfData []byte, pageIdx int, dpi float64) (*RenderResult, error) {
 	if len(pdfData) == 0 {
 		return nil, fmt.Errorf("pdfplumber: empty PDF data for rendering")
 	}
 	var res *RenderResult
 	var rerr error
+	var pixmap *pdfoxide.Pixmap
 	pdfsync.With(func() {
 		doc, e := pdfoxide.OpenFromBytes(pdfData)
 		if e != nil {
 			rerr = fmt.Errorf("pdfplumber: open for render: %w", e)
 			return
 		}
-		defer doc.Close()
-		res, rerr = renderPageFromDoc(doc, pageIdx, dpi)
+		pixmap, rerr = doc.RenderPageRaw(pageIdx, int(math.Round(dpi)))
+		doc.Close()
 	})
+	if rerr != nil {
+		return nil, fmt.Errorf("pdfplumber: render page %d: %w", pageIdx, rerr)
+	}
+	res = processPixmap(pixmap)
 	return res, rerr
 }

Extract the pixel loop into a standalone processPixmap(pixmap *pdfoxide.Pixmap) *RenderResult function and call it outside pdfsync.With in both RenderPage and Document.RenderPage.

🤖 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/deepdoc/parser/pdf/pdfoxide/pdf_oxide_adapter.go` around lines 325 -
375, Move pixel processing out of the pdfsync.With critical sections: update
RenderPage and Document.RenderPage to call only RenderPageRaw under the mutex,
retain error wrapping, then pass the resulting pixmap to a new standalone
processPixmap function outside the lock. Move the premultiplied-alpha conversion
and RenderResult construction from renderPageFromDoc into processPixmap, and
adjust or replace renderPageFromDoc accordingly.
internal/deepdoc/parser/pdf/parser_ocr.go (1)

248-252: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Doc comment no longer matches the code path.

The comment states the fallback runs "a direct doc.OCRRecognize call," but line 292 now routes through p.inferOCRRecognize (the limiter-wrapped primitive). Update the wording to reflect the current path.

As per coding guidelines: "Keep Go package comments and doc comments aligned with the current runtime path, not with migration history."

🤖 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/deepdoc/parser/pdf/parser_ocr.go` around lines 248 - 252, Update the
comment for buildTextBoxes to remove the claim that fallback uses a direct
doc.OCRRecognize call and accurately state that empty regions are recognized
through p.inferOCRRecognize, the limiter-wrapped OCR primitive.

Source: Coding guidelines

🤖 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/deepdoc/parser/pdf/parser_parallel_integration_test.go`:
- Around line 28-42: Close each ParseResult after its comparisons complete to
release the native PDF engine resources. In the per-fixture test using runParse,
ensure both baseline and parallel are deferred or explicitly closed, handling
any Close errors consistently with the test’s failure reporting.

In `@internal/deepdoc/parser/pdf/parser_pipeline_integration_test.go`:
- Around line 596-613: TestIntegration_MultiChunk leaks native PDF resources
because the ParseResult is not closed. Add a deferred result.Close() immediately
after the successful Parse call, before accessing result.Sections or
result.Tables, matching the cleanup pattern used in the parallel integration
test.

In `@internal/deepdoc/parser/pdf/parser.go`:
- Around line 499-507: Propagate cancellation errors returned by runPageWorkers
instead of continuing with nil pageResults. In the processPages flow, after
calling runPageWorkers, return the error when it is context.Canceled or
context.DeadlineExceeded (or otherwise preserve and return the worker error as
appropriate) before invoking assembleDocument, while retaining logging for
non-fatal page failures.
- Around line 127-131: Restore a per-page upper bound for the zoom retry in the
PDF page-processing logic: before multiplying Config.Zoom by DlaScale, ensure
the retry is only performed when the configured zoom is below 9 and clamp the
resulting retryZoom to the intended maximum. Update the retry render/OCR path
near the per-page retry condition so unusually large zoom settings cannot
produce unsafe DPI or excessive memory usage.

In `@internal/deepdoc/parser/pdf/table_extract.go`:
- Around line 42-50: Prevent nil dereferences before calling Health in
enrichOnePageWithDeepDoc: detect both a nil DocAnalyzer interface and typed-nil
implementations, returning pageBoxes, nil, nil immediately; alternatively make
DocAnalyzerCache.Health nil-safe while preserving this guard for direct
Parse/ParseRaw inputs.

In `@internal/utility/workerpool.go`:
- Around line 116-148: Handle panics from p.handler within WorkerPool.worker by
recovering around the handler invocation, converting the recovered value into an
error, and ensuring activeWorkers is decremented even when a panic occurs.
Continue the normal result-processing path so j.out receives a result containing
the error and markDone is always called, allowing StopWait and Submit().Wait to
complete.

---

Outside diff comments:
In `@internal/parser/parser/pdf_parser_common.go`:
- Around line 650-673: Ensure parsePDFWithDeepDocOptions releases the
successfully parsed native engine when outputFormat is unsupported: in the
default branch, close parsed (or its engine) before returning the error,
matching the cleanup performed by the JSON and Markdown processing paths.

---

Nitpick comments:
In `@internal/deepdoc/parser/pdf/inference/cache.go`:
- Around line 156-171: Compute the cache key once at the start of each
method—DLA, TSR, OCRDetect, and OCRRecognize—when caching is enabled, store it
in a local variable, and reuse it for both cache lookup and result storage.
Remove the repeated cacheKeyOrEmpty calls so each invocation encodes and hashes
the image at most once.

In `@internal/deepdoc/parser/pdf/parser_ocr.go`:
- Around line 248-252: Update the comment for buildTextBoxes to remove the claim
that fallback uses a direct doc.OCRRecognize call and accurately state that
empty regions are recognized through p.inferOCRRecognize, the limiter-wrapped
OCR primitive.

In `@internal/deepdoc/parser/pdf/pdfoxide/pdf_oxide_adapter.go`:
- Around line 325-375: Move pixel processing out of the pdfsync.With critical
sections: update RenderPage and Document.RenderPage to call only RenderPageRaw
under the mutex, retain error wrapping, then pass the resulting pixmap to a new
standalone processPixmap function outside the lock. Move the premultiplied-alpha
conversion and RenderResult construction from renderPageFromDoc into
processPixmap, and adjust or replace renderPageFromDoc accordingly.

In `@internal/ingestion/pipeline/pipeline.go`:
- Line 509: Refactor taskLogProgressCallback and deriveDocumentProgress to avoid
querying AggregateProgress on every progress event: initialize doneCount,
runningCount, and failedCount once from a single AggregateProgress call when
resuming, then update these counters as components start, complete, or fail and
compute progress/run from them. Remove the per-event logDAO.AggregateProgress
call while preserving existing progress semantics.
🪄 Autofix (Beta)

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

Run ID: 242880d8-e466-411e-8c6e-76dfe4626a93

📥 Commits

Reviewing files that changed from the base of the PR and between 8236f2c and 92b321f.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (97)
  • go.mod
  • internal/agent/canvas/compile.go
  • internal/agent/canvas/compile_test.go
  • internal/agent/canvas/node_body.go
  • internal/agent/canvas/run_tracker.go
  • internal/agent/runtime/helpers.go
  • internal/agent/runtime/helpers_test.go
  • internal/agent/tool/code_exec.go
  • internal/agent/tool/qweather.go
  • internal/agent/tool/retrieval.go
  • internal/agent/workflowx/r3_interrupt_test.go
  • internal/cli/user_command.go
  • internal/dao/ingestion.go
  • internal/deepdoc/parser/pdf/batch_smoke_test.go
  • internal/deepdoc/parser/pdf/inference/cache.go
  • internal/deepdoc/parser/pdf/inference/cache_test.go
  • internal/deepdoc/parser/pdf/inference/client.go
  • internal/deepdoc/parser/pdf/layout/boxes_sections.go
  • internal/deepdoc/parser/pdf/layout/layout.go
  • internal/deepdoc/parser/pdf/layout/layout_test.go
  • internal/deepdoc/parser/pdf/mock_doc_analyzer.go
  • internal/deepdoc/parser/pdf/mock_engine.go
  • internal/deepdoc/parser/pdf/ocr_merge_test.go
  • internal/deepdoc/parser/pdf/ocr_recognize_batch_test.go
  • internal/deepdoc/parser/pdf/page_batch_test.go
  • internal/deepdoc/parser/pdf/parse_cgo.go
  • internal/deepdoc/parser/pdf/parser.go
  • internal/deepdoc/parser/pdf/parser_concurrency.go
  • internal/deepdoc/parser/pdf/parser_mock_test.go
  • internal/deepdoc/parser/pdf/parser_ocr.go
  • internal/deepdoc/parser/pdf/parser_ocr_test.go
  • internal/deepdoc/parser/pdf/parser_parallel_integration_test.go
  • internal/deepdoc/parser/pdf/parser_parallel_test.go
  • internal/deepdoc/parser/pdf/parser_pipeline_integration_test.go
  • internal/deepdoc/parser/pdf/parser_test.go
  • internal/deepdoc/parser/pdf/pdfium/pdfium.go
  • internal/deepdoc/parser/pdf/pdfium/pdfium_test.go
  • internal/deepdoc/parser/pdf/pdfium_integration_test.go
  • internal/deepdoc/parser/pdf/pdfoxide/pdf_oxide_adapter.go
  • internal/deepdoc/parser/pdf/pdfsync/pdfsync.go
  • internal/deepdoc/parser/pdf/pdfsync_shared_mutex_test.go
  • internal/deepdoc/parser/pdf/pipeline_parity_test.go
  • internal/deepdoc/parser/pdf/snapshot_test.go
  • internal/deepdoc/parser/pdf/table/table_annotate.go
  • internal/deepdoc/parser/pdf/table/table_annotate_test.go
  • internal/deepdoc/parser/pdf/table/table_cells_group_test.go
  • internal/deepdoc/parser/pdf/table/table_construct_test.go
  • internal/deepdoc/parser/pdf/table/table_orient_test.go
  • internal/deepdoc/parser/pdf/table/table_post_test.go
  • internal/deepdoc/parser/pdf/table_extract.go
  • internal/deepdoc/parser/pdf/table_rotate_integration_test.go
  • internal/deepdoc/parser/pdf/table_section_test.go
  • internal/deepdoc/parser/pdf/type/types.go
  • internal/deepdoc/parser/pdf/util/crop.go
  • internal/deepdoc/parser/pdf/util/crop_matrix_test.go
  • internal/deepdoc/parser/pdf/util/crop_test.go
  • internal/deepdoc/parser/pdf/util/eng_detect.go
  • internal/deepdoc/parser/type/types.go
  • internal/entity/ingestion_task.go
  • internal/ingestion/component/chunker/pdfcrop_cgo.go
  • internal/ingestion/component/chunker/pdfcrop_cgo_test.go
  • internal/ingestion/component/chunker/pdfcrop_nocgo.go
  • internal/ingestion/component/chunker/token.go
  • internal/ingestion/component/document_storage.go
  • internal/ingestion/component/extractor.go
  • internal/ingestion/component/extractor_test.go
  • internal/ingestion/component/parser.go
  • internal/ingestion/component/parser_dispatch.go
  • internal/ingestion/component/parser_dispatch_test.go
  • internal/ingestion/component/parser_test.go
  • internal/ingestion/component/schema/chunker.go
  • internal/ingestion/pipeline/PROGRESS_LOG_RESUME_PLAN.md
  • internal/ingestion/pipeline/pipeline.go
  • internal/ingestion/pipeline/pipeline_test.go
  • internal/parser/parser/doc_parser.go
  • internal/parser/parser/docx_parser.go
  • internal/parser/parser/docx_parser_cgo_test.go
  • internal/parser/parser/html_parser.go
  • internal/parser/parser/markdown_parser.go
  • internal/parser/parser/office_parsers_cgo_shared.go
  • internal/parser/parser/office_parsers_no_cgo.go
  • internal/parser/parser/office_routes_cgo_test.go
  • internal/parser/parser/parse_result_test.go
  • internal/parser/parser/parse_with_result_test.go
  • internal/parser/parser/parser_type.go
  • internal/parser/parser/pdf_parser_common.go
  • internal/parser/parser/pdf_parser_mineru.go
  • internal/parser/parser/pdf_postprocess.go
  • internal/parser/parser/pdf_postprocess_test.go
  • internal/parser/parser/ppt_parser.go
  • internal/parser/parser/pptx_parser.go
  • internal/parser/parser/text_parser.go
  • internal/parser/parser/xls_parser.go
  • internal/parser/parser/xlsx_parser.go
  • internal/service/file.go
  • internal/utility/workerpool.go
  • internal/utility/workerpool_test.go
💤 Files with no reviewable changes (11)
  • internal/deepdoc/parser/pdf/layout/boxes_sections.go
  • internal/deepdoc/parser/pdf/table/table_orient_test.go
  • internal/ingestion/component/extractor_test.go
  • internal/deepdoc/parser/pdf/type/types.go
  • internal/deepdoc/parser/pdf/table_rotate_integration_test.go
  • internal/parser/parser/office_parsers_cgo_shared.go
  • internal/deepdoc/parser/pdf/ocr_recognize_batch_test.go
  • internal/deepdoc/parser/pdf/inference/client.go
  • internal/deepdoc/parser/pdf/mock_doc_analyzer.go
  • internal/ingestion/component/parser_dispatch_test.go
  • internal/deepdoc/parser/pdf/page_batch_test.go

Comment thread internal/deepdoc/parser/pdf/parser.go Resolved
Comment thread internal/deepdoc/parser/pdf/parser.go Resolved
Comment thread internal/utility/workerpool.go Resolved
- Close leaked ParseResult native resources in integration tests
  (parser_parallel and parser_pipeline MultiChunk 52-page fixture).
- Cap per-page retry zoom (math.Min(Zoom*DlaScale, 9.0)) to avoid unsafe
  DPI / memory spikes on large pages.
- Preserve runPageWorkers cancellation/error instead of letting
  assembleDocument's empty result swallow it.
- Guard nil docAnalyzer before Health() call; make DocAnalyzerCache.Health
  nil-safe.
- Recover from handler panics in workerpool so results are delivered and
  StopWait/Submit().Wait do not hang.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant