feat(browser): default multi-file source uploads to ZIP - #406
feat(browser): default multi-file source uploads to ZIP#406tristanmanchester wants to merge 3 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93a0687a9f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs changes before merge. Reviewed August 29, 2026, 11:09 AM ET / 15:09 UTC. ClawSweeper reviewWhat this changesThis PR refines browser-mode file upload planning, preserving flattened automatic text bundles while adding ZIP handling, extraction guidance, lazy fallback creation, and bundle cleanup. Merge readinessKeep open: the final branch resolves the two prior review findings and preserves the established automatic text-bundle contract, but remote inline-fallback runs still leave a generated source bundle outside the per-run cleanup directory. Priority: P2 Review scores
Verification
How this fits togetherOracle turns selected local files into pasted composer text or browser attachments before automating a signed-in ChatGPT conversation. The changed planner also serializes fallback attachments to remote browser hosts, where the remote server stages them and invokes browser automation. flowchart LR
A[Selected local files] --> B[Browser prompt planner]
B --> C{Inline or upload}
C --> D[Composer text]
C --> E[Text or ZIP bundle]
E --> F[Local browser run]
E --> G[Remote browser host]
F --> H[ChatGPT submission]
G --> H
Before merge
Findings
Agent review detailsSecurityNeeds attention: The new remote fallback path can retain uploaded source content in a generated system-temporary bundle after the request lifecycle ends. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the compatible upload behavior, and make remote fallback bundles part of the remote request lifecycle so they are deleted after either success or failure, with a regression test that triggers preparation. Do we have a high-confidence way to reproduce the issue? Not applicable as an issue report; source inspection establishes the remote fallback cleanup failure, while the supplied live run demonstrates the explicit ZIP submission behavior. Is this the best way to solve the issue? No: the restored automatic text-bundle contract is the maintainable direction, but remote materialization must join the existing cleanup lifecycle before this implementation is complete. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bbc1b3b0261d. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
This PR keeps Review defects from the last pass are fixed in ea6cc37:
Dry-run proof (default The generated |
|
Live ChatGPT proof for the ZIP default is in. Session Oracle uploaded one @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Browser uploads previously flattened multiple text/source files into a single Markdown-style text bundle, discarding the directory tree that ChatGPT needs to navigate a codebase. Multiple text/source files are now packed into a byte-preserving ZIP with relative paths intact, and the composer carries a short instruction to extract the archive before inspecting it. A single text/source file stays a native upload, and images, PDFs, and archives remain separate attachments while the 10-attachment cap permits. The legacy flattened bundle remains available via --browser-bundle-format text. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
--browser-bundle-files now selects the upload plan under auto, so small files become one ZIP instead of an inline paste. Fallback archives are created only when ChatGPT rejects the inline paste, and generated oracle-browser-bundle-* directories are removed after browser runs and dry-runs.
ea6cc37 to
37ddbb2
Compare
Restore the established auto bundle format: flattened text for text-only uploads, ZIP when raw files are present or format is zip. Remote clients no longer materialize a fallback archive before the primary submit.
|
Addressed the remaining ClawSweeper items in 0f0ff3b:
Kept
Remote no longer materializes a fallback archive up front. Unbundled fallback files are sent to the host, and the ZIP/text bundle is created there only if ChatGPT rejects the inline paste. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Summary
autobundle format for text-only uploads, matching the previous contract--browser-bundle-format zipis set, and tell ChatGPT to extract that archive into its sandbox--browser-bundle-filesactually select the upload plan under defaultautooracle-browser-bundle-*directories after the runWhy
autoalready had a text-only contract: flatten text uploads into one Markdown-style bundle. Switching that to ZIP would have forced existing CLI and MCP workflows to extract an archive before reading source. This branch keeps that contract and treats ZIP as the format for mixed/raw inputs and for callers that opt in.ZIP still matters when the files are not plain text. An unexplained archive is otherwise treated as an opaque attachment, so ZIP submissions include a short extract instruction.
Bundling is still narrower than
--browser-bundle-files. Images and PDFs lose their native handling inside an archive, so they stay separate unless the flag is set or the attachment cap forces a single bundle.resolveBrowserBundleScopereturnsnone,text-only, orall.Behavior change
--browser-bundle-format autostill chooses flattened text for text-only uploads and ZIP when raw files are present. Use--browser-bundle-format zipwhen you want a filesystem tree for source files.--browser-bundle-filesnow bypasses auto's inline path so small files are uploaded as one bundle instead of being pasted.Review follow-up
autotext-only bundle format (ClawSweeper P1)--browser-bundle-filesnow selects the upload plan under defaultautooracle-browser-bundle-*directories are deleted after browser runs and dry-runsVerification
pnpm vitest run tests/browser/prompt.test.ts tests/browser/sessionRunner.test.ts tests/browser/index.test.ts tests/remote/server.test.ts— 144 passedtsc --noEmitcleanLive proof
Session
zip-bundle-extract-proofon GPT-5.5 browser (--browser-attachments always, two small source files, 57.9s). That run used the ZIP path (now--browser-bundle-format zipfor text-only inputs). Oracle uploaded oneattachments-bundle.zip, the composer included the extract instruction, and ChatGPT quoted both relative paths and sentinels. The generated bundle directory was gone after the run.Submitted composer:
Answer: