Repository navigation
fix(parallel): apply combine_under_n_chars to large PDFs split across workers - #591
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
No issues found across 4 files
Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.
View guided diff | Re-trigger cubic
|
Automated review, forwarded by @paulkarayan. Findings are code-verified where they name a file and line; the strong-review gpt-pro leg and cubic did not run. GO -- 0 blocker(s), 0 concern(s), 1 note(s), 1 nit(s). Parallel PDF workers now receive combine_under_n_chars under its form name; correct, tested red/green, CI green. Only queue fact: 589 and 592 also claim 0.1.12. Notes (1)
Nits (1)
Full review |
## What List parameters sent as comma-separated values are now split into separate items. ``` Before: languages=eng,deu → ["eng,deu"] After: languages=eng,deu → ["eng", "deu"] ``` This applies to every list form field, including `ocr_languages` and `skip_infer_table_types`. ## Why The parser was meant to split on `+` or `,`. A typo meant it always picked `+`, so a comma list was passed through as a single invalid language. JSON arrays, `eng+deu`, and repeated fields work as before. When a value contains both `+` and `,`, `+` still wins. ## Validation Tests go through a real FastAPI form for three list fields. The comma cases fail on `main`. Adds a CHANGELOG entry and bumps the version to 0.1.14. Refreshed against main after #591 merged. The non-retryable worker test now checks one attempt per PDF split, avoiding an assumption about executor scheduling. Targeted form-list, worker-error, and parallel-option tests: 40 passed.
## What
`multipart/mixed` responses now end with the closing boundary line that
the MIME format requires.
```
Before (end of response): After (end of response):
<last part data> <last part data>
--3f9c...--
```
## Why
Without the closing line, strict multipart parsers report the response
as incomplete. If processing fails partway through, the closing line is
still left out, so clients can tell a cut-off response from a complete
one.
## Validation
Tests parse the response with Python's `email` parser (no defects) for
one part, several parts, and no parts, and cover an interrupted stream.
They fail on `main`. Adds a CHANGELOG entry and bumps the version to
0.1.15.
Refreshed against main after #590 and #591 merged. Targeted API tests:
43 passed; response compatibility tests: 4 passed. Changed-source lint
passed.
What
combine_under_n_charsnow works for large PDFs that are processed in parallel.Why
Internally, the setting is called
combine_text_under_n_chars, but workers only accept the public form namecombine_under_n_chars. The worker ignored the unknown field and used its default, so short sections could be merged even when the caller asked to keep them separate. Small PDFs processed locally were not affected and are unchanged.Validation
A test sends a request through a real worker form and checks that a threshold of 0 keeps two sections separate while 100 merges them. It fails on
main. Adds a CHANGELOG entry and bumps the version to 0.1.13.