Repository navigation
feat(photos): add upload and app-created album commands - #1185
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 maintainer review before merge. Reviewed October 7, 2026, 1:18 AM ET / 05:18 UTC (Revision 4). ClawSweeper reviewWhat this changesAdds Google Photos uploads and app-created album listing and creation, with explicit OAuth write opt-in, preserved narrowed grants, tests, and command documentation. Merge readiness✅ Ready for maintainer review This PR remains useful: uploads and album management are absent from main and v0.43.0. Prior findings are resolved, live proof is sufficient, and no blocking defect was found. Likely related people: steipete and higginz777 are routing candidates based on Photos and OAuth history; historical introduction is unverified. Priority: P2 Review scores
Verification
How this fits togetherThe Photos CLI sends user-selected media and album requests through gogcli’s account authentication and HTTP transport to Google Photos. OAuth scopes and runtime read-only enforcement control writes, and the CLI returns structured results. flowchart TD
A[Files and album commands] --> B[Photos CLI validation]
C[Account OAuth grant] --> D[Authenticated transport]
B --> D
D --> E{Read-only enforcement}
E -->|Allowed| F[Google Photos API]
E -->|Blocked| G[Error output]
F --> H[Album and upload results]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain the opt-in Photos write commands while preserving read-only defaults and narrowed grants. Do we have a high-confidence way to reproduce the issue? Not applicable to this feature request; the contributor’s live transcript demonstrates successful writes and rejection after grant narrowing. Is this the best way to solve the issue? Yes. Extending the existing Photos client with explicit append-scope opt-in preserves the established read-only path without creating a competing implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5bfd65948284. 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 (3 earlier review cycles)
|
|
Thanks for the review. This addresses all three items: the P1 grant narrowing, the changelog, and the real-behaviour proof. Fix: narrowing Photos no longer keeps an earlier append grant
Authority-chain proof (live)This uses one real consumer Google account and one Desktop OAuth client throughout, with a generated test image and a throwaway app-created album. The account, client ID, album and media IDs, and local paths are redacted. Generated authorization URLs ( A. Append grant: album create and upload succeed. The stored scopes include B. Narrow the same account and client to read-only (default Drive/Gmail modes): C. Writes after narrowing, without D. Re-widening needs the explicit opt-in, and then works again: Automatic reauthorization runs only after |
5c40088 to
23b7f7d
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Keep read-only authorization as the default, require explicit append scope for writes, and preserve narrowed grants during reauthorization. Accept documented video formats and cover the upload/album workflows with tests and docs. Co-authored-by: beyondzero <4196148+beyondzero@users.noreply.github.com>
23b7f7d to
d18bfcb
Compare
|
Landed with contributor credit and read-only authorization preserved by default. The maintainer pass added DIVX/M2T/MMV support after reproducing their rejection through failing dry-run regressions; the corrected test and full Exact-head Linux, minimum-Go, macOS, Windows, worker, and Docker checks passed at Live upload/grant-narrowing evidence remains the contributor’s documented account/client proof: #1185 (comment). Thanks @beyondzero. |
Add Google Photos media upload and app-created album list/create commands. Uploads use the raw-bytes endpoint followed by bounded media-item creation, report per-file results, support an album and description, and return nonzero on failures.
Photos authorization stays read-only by default.
--photos-scope=appendis required to request write access, and it cannot be combined with--readonly. Narrowing an existing grant disables incremental scopes; automatic reauthorization preserves that narrowed grant. Runtime read-only request enforcement continues to reject the new write endpoints.The contributor supplied live evidence from one account/client: append-authorized upload and album creation succeeded, narrowing rejected writes at Google while reads continued, and explicit re-widening restored uploads. Automatic invalid-grant reauthorization is covered by regression tests rather than revoking the live account.
Maintainer review also corrected the extension filter to accept Google-documented DIVX, M2T, and MMV videos, with failing-before/passing-after dry-run regression coverage that still rejects unrelated file types. Command docs and the Photos agent skill describe the new commands. Thanks @beyondzero for the implementation and live proof.
Live authority-chain evidence: #1185 (comment)
Final maintainer validation: the supported-video regression failed before the filter correction and passed afterward; the complete
make cigate passed on AWS Crabbox; independent Codex review is clean through P2.