Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThe PR splits Gmail batch label modifications into requests containing at most 1000 message IDs. Example: Remove INBOX from 1500 explicitly selected messages.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 2 items remain This PR addresses an oversized-request defect still present on main and merits keeping open. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Gmail CLI normalizes explicit message IDs, resolves labels, and sends authenticated Gmail API requests before producing JSON or text results. flowchart LR
A[CLI arguments] --> B[Normalize message IDs]
B --> C[Resolve label IDs]
C --> D[Split into chunks]
D --> E[Gmail batchModify]
E --> F[Result or failure]
Technical reviewBest possible solution: Keep the focused chunking fix while making partial completion and recovery clear to users. Do we have a high-confidence way to reproduce the issue? Main's single-request construction and the existing 1000-ID batching precedent establish the failure path; no target code or live Gmail reproduction was run. Is this the best way to solve the issue? Sequential chunking is a focused fix that preserves arbitrary labels, dry runs, and output contracts without introducing query-selection behavior. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 701772665989. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 12, 2026, 4:37 PM ET / 20:37 UTC. |
8b5f05b to
71801bc
Compare
|
The batching fix is accepted in principle: it preserves explicit-ID selection, labels and aggregate output, and the current patch explains partial completion and carries the caller's context. I am keeping this PR open solely for the required live Gmail mutation/readback proof, not asking the contributor to redesign it. I tried the documented The remaining maintainer checklist is concrete:
The auth prerequisite is the only missing access. Until it is satisfied, the live-proof hold remains; unit tests alone do not waive it. Thanks @i098 for the focused fix. |
|
Thank you for the checklist and for trying the auth flow. I can run the live proof on a Gmail test account that I control, with only the synthetic fixture drafts. I will rebase onto |
71801bc to
69369ae
Compare
|
Thanks, here's the live proof. I rebased onto I used an authorized Gmail account, with a fresh
Redacted terminal outputReadback is one |
Co-authored-by: Jerry Xiao <optifinecapemain@gmail.com>
69369ae to
6dff213
Compare
6dff213 to
d473dc7
Compare
|
Thanks for keeping this open for the live proof. I dropped the |
|
The head moved again after that note: the branch now carries only the two batching commits, and |
Closes #1199
gmail batch modifynow sends at most 1,000 message IDs per API request. If a later request fails, the error reports the offset of that batch and says the earlier batches were already applied, so a retry can start at the reported ID. A successful call still reports every requested ID, and the JSON output keys (modified,count,addedLabels,removedLabels) are unchanged.Tests:
internal/cmd/gmail_batch_test.gogains three httptest cases: a 1,000-ID split across chunks, a failure in a later chunk reporting its offset, and a failure in the first chunk returning that error.go test ./internal/cmd -run 'GmailBatch|GmailBulk'passes on this head.Live proof: #1209 (comment) ran against a real Gmail account with 1,001 drafts: both chunks applied, 1,001/1,001 rows read back, then every draft and the test label were deleted and the deletions confirmed.
gmail_batch.goandgmail_batch_test.goon this head are byte-identical to the files that proof ran on (c7d5a5c1,edcb3553).I am new to open source, and this pull request was made with AI assistance.