Repository navigation
Conversation
Route permission and revision backup listing through collectAllPages. Reuse listDriveComments with all:true for comments so a repeated Google page token fails closed instead of hanging gog backup push --drive-collaboration. 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:07 AM ET / 07:07 UTC. ClawSweeper reviewWhat this changesGuard Drive backup permission, comment, and revision pagination using existing collectors, with regression coverage for repeated tokens, successful pagination, and recorded errors. Merge readiness⛔ Blocked before merge - 3 items remain The fix remains necessary: current main and v0.39.0 still contain the unguarded collaboration loops. The implementation preserves existing error handling, and the supplied production-client fault injection supports the repeated-token fix. Priority: P2 Review scores
Verification
How this fits togetherDrive backup collects collaboration metadata for each discovered file through Google’s Drive client. Successful records and per-file error rows then feed encrypted backup shards. flowchart TD
A[Backup push and Drive file IDs] --> B[Collaboration collector]
B --> C[Google Drive HTTP lists]
C --> D{Pagination result}
D -->|Another unique token| C
D -->|Complete| E[Collaboration metadata]
D -->|Repeated token or page limit| F[Per-file error row]
E --> G[Encrypted backup shards]
F --> G
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the shared pagination guards and existing per-file error contract, with explicit documentation of the inherited page ceiling and partial-backup outcome. Do we have a high-confidence way to reproduce the issue? Yes, from source: returning the same nonempty continuation token repeatedly keeps each current-main helper requesting pages. The contributor supplies bounded before/after HTTP fault-injection evidence; this review did not execute it. Is this the best way to solve the issue? Yes. Reusing the existing collector and the comments all-pages path avoids duplicate guard logic while preserving request and ordinary-error semantics; the additional page ceiling needs disclosure. 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:
EvidenceAcceptance 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
|
|
Superseded by #1087, which incorporates Drive collaboration cycle protection without adding a new page ceiling. Encrypted per-file error records and continued collection were verified. Thanks @SebTardif. Superseded by #1087, which incorporates Calendar, Contacts, and Tasks cycle protection while retaining fetched ACL rows on ordinary API errors. Backup failure and encrypted-row behavior were verified. Thanks @SebTardif. 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. |
What Problem This Solves
gog backup push --drive-collaborationlists Drive permissions, comments, and revisions for each file. The three helpers ininternal/cmd/backup_drive_collaboration.gocopiednextPageTokeninto the next request with no seen-set.When Drive repeats a continuation token, those loops never terminate. Backup collection keeps requesting the same permission, comment, or revision page and never finishes the collaboration 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). Drive backup file listing is covered separately in #1078. Collaboration 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 push --drive-collaborationnever finished permission, comment, or revision pages.fix/backup-collab-page-tokenat current HEAD, compiledinternal/cmdlisting binary against a local httptest Drive endpoint.go, then rangogcli-backup-collab-paging.exewith-test.von the permission, comment, and revision hang-guard cases.pagination loop: repeated page token "stuck"after 2 list calls for permissions, comments, and revisions.listDriveCommentswithall: true. Permission listing still sendssupportsAllDrives=trueandpageSize=100. Revision listing still usespageSize=200.Summary
Route
fetchBackupDrivePermissionsandfetchBackupDriveRevisionsthrough existingcollectAllPages. ReuselistDriveCommentswithall: truefor comments. Keep the original field lists, page sizes, and shared-drive flags.Related: #1063, #1065, #1066, #1004, #1044, #1045, #1046, #1078.
Introduced in
efc3df2e(2026-04-27,feat(backup): expand google backup coverage).