Repository navigation
fix(drive): accept commas in drive labels file apply field flags - #1319
saariuslystoned wants to merge 2 commits into
Conversation
The --text, --selection, --integer, --date and --user flags were plain string slices, so the CLI split each value on commas before parseDriveLabelFieldAssignment saw it. The documented field=a,b forms and any text containing a comma failed with "label field assignments must be field=value". Mark the flags sep:"none" and keep a text value whole, since a text field holds one value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🦞👀 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. What this changesPreserve commas in Drive label text assignments and pass documented multi-value assignments intact through CLI parsing. Example: Run gog drive labels file apply file1 label1 --text 'note=Hello, world' --selection status=c1,c2.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR fixes a documented parsing bug still present on main, and both earlier review blockers are resolved. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherKong parses CLI flags, the Drive labels command builds field modifications, and the Google API client sends a modifyLabels request after confirmation. flowchart LR
A[CLI arguments] --> B[Kong flag parsing]
B --> C[Drive label field modifications]
C --> D[Confirmation and dry run]
D --> E[Google Drive client]
E --> F[Drive modifyLabels endpoint]
Technical reviewBest possible solution: Land the focused parser correction after the approved workflows pass. Do we have a high-confidence way to reproduce the issue? Main's flag declarations and assignment parser explain the failure, supported by the contributor's base-failure trace; no target code was run during this read-only review. Is this the best way to solve the issue? The change fixes the parsing boundary in the existing command and preserves typed validation, confirmation, and request ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e8428c36dd31. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
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 HistoryReview history (1 earlier review cycle)
Reviewed November 8, 2026, 2:19 PM ET / 19:19 UTC (Revision 2). |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thank you for the fix. I reproduced the claim and consolidated accepting commas inside Drive label field flag values into #1336, with regression coverage and your coauthor credit retained. The full |
What problem this solves
The help for
gog drive labels file applydocuments comma-separated values for multi-value fields, for example--selection field=choiceId[,choiceId],--integer field=123[,456],--dateand--user.--textis documented asfield=value. All five are plain[]stringflags withoutsep:"none", so Kong splits every value on commas beforeparseDriveLabelFieldAssignmentsees it. The second half then has no=:The documented multi-value form never worked from the command line, and neither does a text value with a comma in it. Only
--fields-jsongets either through. The existing tests buildDriveLabelsFileApplyCmdin Go and skip CLI parsing, so they don't see this.Change
--text,--selection,--integer,--dateand--usergetsep:"none", as otherfield=value-style flags in the repo do, for example--rrule. Repeating a flag still adds more fields.--textnow keeps everything after the first=as that value instead of splitting it on commas. The other four keep their documented comma splitting, which now actually runs.Evidence
TestDriveLabelsFileApply_CommaValuesThroughCLIparses--text 'note=Hello, world' --selection status=c1,c2 --integer count=1,2 --user owners=a@example.com,b@example.comthrough Kong and checks themodifyLabelsbody that anhttptestDrive server receives. Onmain(e8428c3) it fails withlabel field assignments must be field=value. With this change it gets["Hello, world"],["c1","c2"],[1,2]and both users. The existing Drive labels tests pass.A built
bin/gogfrommainwas run against a local stand-in throughGOG_GOOGLE_API_BASE_URL.--selection=status=c1,c2and--integer=n=1,2exit 2 with that error before any request; single values reach the--forceconfirmation as expected.The same built-CLI run with a
gogbinary from this branch, against a stand-in that logs request bodies (not Google):make cipassed locally (macOS arm64, go1.27.3).No live Drive label was changed.
🤖 Generated with Claude Code