You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ingestion): pass the MinerU timeout to the MonkeyOCR file_parse upload - #21930
main currently fails to compile internal/ingestion/component:
internal/ingestion/component/pdf_vision_dispatch.go:844:114:
not enough arguments in call to mineruStreamParse
Root cause: #21832 added a tenth timeout parameter to mineruStreamParse and updated the MinerU call site in dispatchMinerUPDF, but the dispatchMonkeyOCRPDF call site introduced earlier by #20469 still calls the function with nine arguments. The two PRs were merged hours apart into the same file and the gap slipped through: the sep-tests runs on 2c4bbbc72 failed with a runner checkout error (RPC failed; curl 92), so the break never surfaced on CI — it only shows up when compiling the package locally.
Every build that pulls internal/ingestion/component (the ingestor mode and anything depending on it) is broken on current main.
Fix
Resolve the timeout for the MonkeyOCR branch with the same mineruRequestTimeout(setup, apiConfig) the MinerU branches use, and pass it to mineruStreamParse. The MonkeyOCR adapter fronts the same MinerU-compatible /file_parse API, so:
the default stays the pre-merge 30-minute budget (mineruStreamParse used to hard-code it),
no new config surface: the dispatch already mirrors MinerU keys (monkeyocr_parse_method, monkeyocr_backend, monkeyocr_server_url), so sharing the timeout resolution follows the same pattern.
If maintainers prefer a dedicated monkeyocr_timeout key for this dispatch, that can be a follow-up.
Verification
Broken: bash build.sh --test ./internal/ingestion/component/ on pristine 2c4bbbc72 fails at compile with not enough arguments in call to mineruStreamParse.
Fixed: the same command (local ORT-relaxed link flags) compiles and the whole package passes, ok 17.564s, including TestDispatch_PDFMonkeyOCRMarkdown_UsesFileParseEndpoint — the existing test that exercises exactly this dispatchMonkeyOCRPDF → mineruStreamParse path.
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: c674b553-a9e3-4a55-89dd-a95c08512cf1
Commits
Reviewing files that changed from the base of the PR and between 4e83cad and efdfe1c.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The PDF dispatch path now resolves the MinerU-compatible stream request timeout from parser setup and API configuration, then passes it to mineruStreamParse. Formula and table extraction remain enabled.
Changes: MinerU stream timeout
Layer / File(s)
Summary
Resolve and pass request timeout internal/ingestion/component/pdf_vision_dispatch.go
dispatchMonkeyOCRPDF resolves the request timeout and passes it to mineruStreamParse. Formula and table extraction remain enabled.
The timeout fix is mergeable with no identified blocking risk.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title names the change: it passes the MinerU timeout to the MonkeyOCR file_parse upload. The raw summary confirms that dispatchMonkeyOCRPDF now resolves the timeout with mineruRequestTimeout(setup…
Description check
The description explains the problem, the root cause, the fix, and the verification steps. It does not follow the repository template exactly: the template asks for a Summary section with a brief desc…
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the change: it passes the MinerU timeout to the MonkeyOCR file_parse upload. The raw summary confirms that dispatchMonkeyOCRPDF now resolves the timeout with mineruRequestTimeout(setup, apiConfig) and passes it to mineruStreamParse. The title is specific and matches the main change, so it passes. The title uses the conventional fix(ingestion) prefix and is concise, at 74 characters.
Full details: Description check
Explanation
The description explains the problem, the root cause, the fix, and the verification steps. It does not follow the repository template exactly: the template asks for a Summary section with a brief description of the purpose and background. The author uses Problem and Fix headings instead, and the Problem section gives the background. The required information is present, so the check passes. The author could add a heading named Summary to match the template.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit checks the stream timeout, Then watches parsing hop along. With tables and formulas still switched on, It nibbles greens beside the logs. The PDF trail flows on.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 4e6a5ab4-04e7-4ed6-8cef-847ab812a5ec
Commits
Reviewing files that changed from the base of the PR and between 2c4bbbc and 518a09e.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
The reason will be displayed to describe this comment to others. Learn more.
Checked at 518a09e (build + tests executed locally, CGO_ENABLED=0).
Verified: internal/ingestion/component compiles clean at this head and the MinerU/timeout/stream tests pass. This fixes the same main break as #21929 - main (2c4bbbc) does not compile because the MonkeyOCR stream call is missing the timeout argument added in #21832.
Heads-up on the overlap: this touches the exact same call line as #21929, so the two will conflict and only one can merge. One difference worth the maintainers' call: this PR resolves the timeout through mineruRequestTimeout(setup, apiConfig), so the MonkeyOCR path honors the configured timeout, while #21929 currently passes the plain mineruDefaultTimeout constant at this call site. Whichever lands, the other needs a rebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
maincurrently fails to compileinternal/ingestion/component:Root cause: #21832 added a tenth
timeoutparameter tomineruStreamParseand updated the MinerU call site indispatchMinerUPDF, but thedispatchMonkeyOCRPDFcall site introduced earlier by #20469 still calls the function with nine arguments. The two PRs were merged hours apart into the same file and the gap slipped through: thesep-testsruns on2c4bbbc72failed with a runner checkout error (RPC failed; curl 92), so the break never surfaced on CI — it only shows up when compiling the package locally.Every build that pulls
internal/ingestion/component(the ingestor mode and anything depending on it) is broken on currentmain.Fix
Resolve the timeout for the MonkeyOCR branch with the same
mineruRequestTimeout(setup, apiConfig)the MinerU branches use, and pass it tomineruStreamParse. The MonkeyOCR adapter fronts the same MinerU-compatible/file_parseAPI, so:mineruStreamParseused to hard-code it),monkeyocr_parse_method,monkeyocr_backend,monkeyocr_server_url), so sharing the timeout resolution follows the same pattern.If maintainers prefer a dedicated
monkeyocr_timeoutkey for this dispatch, that can be a follow-up.Verification
bash build.sh --test ./internal/ingestion/component/on pristine2c4bbbc72fails at compile withnot enough arguments in call to mineruStreamParse.ok 17.564s, includingTestDispatch_PDFMonkeyOCRMarkdown_UsesFileParseEndpoint— the existing test that exercises exactly thisdispatchMonkeyOCRPDF → mineruStreamParsepath.