Repository navigation
fix: return CSV output when a PDF isn't split - #185
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 2 files
Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.
View guided diff | Re-trigger cubic
cragwolfe
left a comment
There was a problem hiding this comment.
Oracle Pro review of exact head a5acfc9a8c87d189107d0bfea6b921e61af69e25.
No concrete actionable defects introduced by this change were found. I verified the operation-specific guard against request IDs, split state, the success-hook dispatcher, and JSON/CSV response parsing. Unsplit responses now pass through without cloning or consuming their bodies, while actual split requests keep the aggregation and cleanup path, including zero-success results. The checked-in tests cover the three CSV cases, JSON output, overlapping operation state, and zero-success aggregation.
One low-severity coverage improvement: the overlap test injects hook state directly. A simultaneous public-client split request and unsplit CSV request would give stronger integration coverage of independent completion and downstream hooks. This is not a merge prerequisite. Existing request buffering and instance-wide allowFailed behavior are unchanged by this PR.
Exact-head CI: unit and integration tests, CodeQL and reported security checks succeeded. No local repository tests were run. Oracle's completed original browser conversation returned SAFE TO MERGE; Pro was verified before submission and during processing. CLI capture failed to recognize the submitted prompt, so the full completed response was retained from that same browser conversation.
(authored by codex)
What
partitionwith CSV output now returns the CSV whenever the PDF isn't actually split.Why
The split-PDF hook ran on every response and tried to merge it as JSON, even when no split happened: splitting off, a non-PDF file, or a PDF too small to split. A CSV body can't be read as JSON, so the call failed. The hook now passes the response through untouched when there was no split. Real splits behave as before.
Validation
Tests call the public client for CSV with splitting off, a non-PDF file, and a one-page PDF, plus JSON output and two operations running at once. All 35 unit tests pass.