Repository navigation
Conversation
Route form-response and Drive-by-mime backup listing through collectAllPages so a repeated Google page token fails closed instead of hanging gog backup push with workspace. Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
|
🦞👀 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: blocked before merge. Reviewed September 5, 2026, 3:40 AM ET / 07:40 UTC. ClawSweeper reviewWhat this changesReuse the shared pagination guard for Forms responses and Drive file listings used by Workspace and Apps Script backups, with four regression tests. Merge readiness⛔ Blocked before merge - 4 items remain The two backup collectors remain unguarded on main and in v0.39.0; the linked pagination fixes cover different paths, so this PR remains useful. Priority: P2 Review scores
Verification
How this fits togetherThe backup adapters collect Google API pages and turn their results into encrypted snapshots. Listing errors flow through existing per-form or optional-service error handling before the backup repository is updated. flowchart TD
A[Backup request] --> B[Workspace and Apps Script adapters]
C[Google API pages] --> D[Shared pagination guard]
B --> D
D --> E{Listing complete?}
E -->|Yes| F[Collected backup rows]
E -->|Error| G[Existing backup error handling]
F --> H[Encrypted snapshot]
G --> H
Decision needed
Why: The repeated-token repair is clear, but the additional ceiling changes successful large-backup behavior and can affect the latest stored snapshot; the submitted proof does not establish acceptance of that tradeoff. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain shared loop protection under an explicitly accepted page-limit policy, with documented and verified error handling for existing Workspace and Apps Script backups. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the failure path: a provider repeatedly returning the same nonempty token keeps both current-main loops requesting pages. The contributor supplies bounded before/after HTTP-fault evidence; this read-only review did not execute tests. Is this the best way to solve the issue? Unclear overall: reusing the shared collector is the narrow repair, but its additional page ceiling needs an explicit compatibility contract for existing backups. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 25703c789da5. LabelsLabel changes:
Label justifications:
EvidenceWhat 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
|
|
Superseded by #1087, which incorporates Workspace and Forms pagination protection without introducing new page limits. Stock-CLI runs verified fatal inventory failures and embedded Forms error records. Thanks @SebTardif. Superseded by #1087, which incorporates contact-dedupe cycle protection while preserving early completion at --max. Repeated tokens stop before a partial plan or contact changes. Thanks @SebTardif. Superseded by #1087, which incorporates recurring-instance cycle protection while preserving immediate success when the requested occurrence is found. Failed lookup performs no event deletion. Thanks @SebTardif. |
What Problem This Solves
gog backup pushwith workspace lists Google Forms responses (Forms.Responses.List) and native Drive files by MIME (Files.List) by walking Google page tokens. Both helpers ininternal/cmd/backup_workspace.gocopiednextPageTokeninto the next request with no seen-set.When Forms or Drive repeats a continuation token, those loops never terminate. Backup collection keeps requesting the same page and never finishes a workspace snapshot.
The same hang class is already closed for Chat and Classroom backup (#1063), Drive sync push listing (#1065), Drive audit permission listing (#1066), calendar and Gmail listing (#1004), and People/Gmail-from-contact/contacts-export listing (#1044, #1045, #1046). Sibling PRs cover Drive backup (#1078), Groups/Admin/Keep (#1079), Drive collaboration (#1080), and Calendar/Contacts/Tasks (#1081). Workspace backup listing was still on the unguarded loop.
Evidence
terminal output from the compiled
internal/cmdlisting binary after the patch. A stuck continuation token is rejected after two list calls, with no third request:Before the patch, the same stuck token made a third list request and returned HTTP 400 from the safety cap (
unexpected extra ... page request after 3 list calls) instead of stopping on the repeated token.Real behavior proof
gog backup pushwith workspace never finished those listings.fix/backup-workspace-page-tokenat current HEAD, compiledinternal/cmdlisting binary.go, then rangogcli-backup-workspace.exewith-test.von the form-response and Drive-by-mime hang-guard cases.pagination loop: repeated page token "stuck"after 2 list calls for bothfetchBackupFormResponsesandfetchDriveFilesByMime.driveFilesListCallWithDriveSupport(corpora=allDrives).--best-efforthandling after the listing error.Summary
Route
fetchBackupFormResponsesandfetchDriveFilesByMimethrough existingcollectAllPages. Keep the original field lists, page sizes, MIME query, order, shared-drive flags, and file sort.Related: #1063, #1065, #1066, #1004, #1044, #1045, #1046, #1078, #1079, #1080, #1081.
Introduced in
068ff0e5(2026-04-27,feat(backup): expand workspace backup coverage).