Repository navigation
fix(docs): fail when batch recovery retains failed requests - #1154
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 6:55 AM ET / 10:55 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR makes Google Docs batch recovery return a failure status when requests remain queued, and updates tests, documentation, and the changelog. Merge readiness✅ Ready for maintainer review Keep open: current main still reports success after partial Google Docs batch recovery. The prior compatibility concern has been explicitly accepted in the PR discussion, and this review found no blocking patch defect. Priority: P2 Review scores
Verification
How this fits togetherThe batch command submits locally queued edits to Google Docs and records any requests that fail during recovery. Its summary and process exit status tell scripts whether the submission completed. flowchart LR
A[Queued Docs edits] --> B[Batch end command]
B --> C[Google Docs API]
C --> D{Validation failure?}
D -- No --> G[Summary and exit status]
D -- Yes --> E[Individual recovery]
E --> F[Retained batch state]
E --> G
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Preserve the result summary and retained requests while giving scripts a dependable failure signal and clear guidance for handling partial completion. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows the success return after failed individual requests, and the PR reports a live Google Docs before/after check; this review did not execute the command locally. Is this the best way to solve the issue? Yes. Checking failures after writing the summary and persisting recovery state addresses the defined exit-status contract without changing request handling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7381ec9d1ccb. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Maintainer decision: adopt exit code 1 when recovery retains failed requests. This is a correction to the documented automation contract ( The existing JSON/text summary, successful edits, failed-request retention, and revision handling remain intact. Scripts intentionally tolerating partial completion must handle status 1 and inspect The compatibility tradeoff is accepted for this bug fix. Live Google proof establishes the before/after status and preserved state; independent review found no code defects. No compatibility flag will be added. |
|
Landed as 67094ba. The merged tree matches the expected combination of reviewed head Validation:
Scripts that intentionally tolerate partial recovery must now handle exit 1 and inspect |
batch end --continue-on-errorreported exit 0 even when individual requests failed and remained queued, so scripts could mistake a partially applied batch for success. Write the existing JSON/text summary, then return exit 1 with the retained batch ID and failure count when recovery leaves failures. Successful recovery still returns 0; request retention and revision sequencing are unchanged. This adopts the documented success/failure contract: scripts intentionally tolerating partial completion must handle exit 1 and inspectfailed; the guide explicitly describes the effect onset -e. The compatibility decision is recorded in the PR discussion.Validation:
make cipassed, including lint, deadcode, Go/script tests, docs coverage, and generated skills.requests:2, chunks:1, failed:1summary; the original binary exited 0 and the fixed binary exited 1. Provider readback confirmed no edit before submission and the valid insertion afterward. The failed request remained available, total failure returned 1, and successful submission returned 0. All synthetic batches were aborted or completed and the disposable Doc was trashed with verified cleanup.58691e89efcd0c2bad1418bff2f6207cd38fafbe: Linux, Windows, macOS, minimum Go, and worker, Docker, and CodeQL. ClawSweeper re-reviewed the final head and found no blocking defect after the compatibility decision was recorded.