Conversation
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Shadow auto-approve: would auto-approve. Optimizes MIME detection to avoid a full-body BytesIO copy by proxying the spooled upload, preserving behavior and filename. Includes regression tests verifying the original stream is used and rewound. A bounded, performance-improving refactor with no observable external change.
Re-trigger cubic
…ection # Conflicts: # CHANGELOG.md # prepline_general/api/__version__.py
Pass the request-owned spool to detect_filetype() with the uploaded filename as metadata_file_path. unstructured 0.27.11 reads spools in place, so the proxy that hid the spool's type is no longer needed.
There was a problem hiding this comment.
No issues found across 3 files
Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.
Re-trigger cubic
0.1.11 is already published from main, and the unstructured fix this depends on ships in the release after 0.27.11.
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.
Re-trigger cubic
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Re-trigger cubic
What
MIME detection for uploads without a usable content type reads the request's upload stream directly instead of copying it into a
BytesIOfirst.The stream is rewound even when detection raises. Explicit MIME hints and unsupported-type handling are unchanged.
Merge dependency
The memory win needs the
unstructuredrelease that includes unstructured#4419 (open; expected to ship as 0.27.12), wheredetect_filetype()stops copying spooled files. On the currently lockedunstructured0.22.18, this change behaves exactly likemain: the library still makes the copy, and the extension hint comes frommetadata_file_pathinstead of the copy's.name. That means it is safe to merge before the bump. This PR does not change the lock.Released as 0.1.12 (0.1.11 is already published from
main).An earlier revision hid the spool's type behind a proxy object. That avoided the copy on any library version, but the same proxy, when used for gzip output in #581, broke
unstructured'sconvert_to_bytes(), so the fix now lives in the library.Stack
#579 (this) ← #581 gzip decompression memory.
Validation
test_filetypes.py: 18 passed on bothunstructured0.22.18 and the unstructured#4419 branch. These include real-detector parity with the old copied-stream path for text, HTML, CSV, JSON, PDF, PPTX and XLSX, for both in-memory and disk-backed spools.