Repository navigation
Conversation
Sites get encoded the Drive file without ForceSendFields. Boolean fields tagged omitempty dropped starred and hasThumbnail when false, and a custom mask dropped trashed the same way. Drive get already calls forceRequestedDriveFileBools before it writes JSON. The regression covers an unstarred site with no thumbnail and a custom mask that requests trashed. 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: needs maintainer review before merge. What this changesPreserve requested false boolean values in Google Sites metadata JSON. Example: Run gog sites get site1 --fields id,name,trashed --json for the untrashed Team Site.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current-main Sites JSON omission with the existing shared helper; the earlier changelog finding is resolved, and no actionable defects remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Sites CLI requests metadata through the Drive client, preserves boolean fields selected by the request mask, and writes a site JSON envelope to stdout. flowchart LR
A[Sites get command] --> B[Drive metadata request]
B --> C[Drive file response]
C --> D[Requested boolean helper]
D --> E[Site JSON envelope]
E --> F[Standard output]
Technical reviewBest possible solution: Land the one-line shared-helper integration with its focused regression coverage and corrected Unreleased entry. Do we have a high-confidence way to reproduce the issue? Current-main Sites get omits the shared preservation step before SDK JSON serialization; the added command regression covers both affected masks, and this review ran no target code. Is this the best way to solve the issue? Reusing the existing helper is the smallest complete fix and preserves the established mask and conditional-field contracts. 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:
Likely related people:
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 5, 2026, 6:10 PM ET / 23:10 UTC (Revision 2). |
AGENTS.md requires a pull request reference and contributor thanks on a user-visible Unreleased change. The sites get line had neither. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thank you for the fix. I reproduced the claim and consolidated preserving requested false values in Sites metadata JSON into #1336, with regression coverage and your coauthor credit retained. The full |
What Problem This Solves
gog sites get --jsondrops requested false booleans. The command asks Drive fordriveFileGetFields(which includesstarredandhasThumbnail) or for a custom--fieldsmask, then JSON-encodes thedrive.File. Those bools are taggedomitempty, and sites get did not setForceSendFields.An unstarred site with no thumbnail therefore omits both
starredandhasThumbnail. A custom mask that namestrashedomitstrashedwhen the file is not trashed.gog drive get --jsonalready callsforceRequestedDriveFileBoolsbefore it writes JSON. Sites list and search go throughwriteDriveFileList, which does the same. Sites get now calls that same helper.This was introduced with Google Sites support in #574 (2026-05-10) and has been present for 179 days.
Evidence
Shipped
bin/gogfrom commit4376d004fd5f12f24951aee000b8909a31ced7f5(v0.48.0-3-g4376d004) was run against a local Drive stand-in athttp://127.0.0.1:61660.GOG_GOOGLE_API_BASE_URLforwarded the Drivefiles.getcall there. The stand-in is not Google. Both requests had no Authorization header, andX-Forwarded-Hostwaswww.googleapis.com.The stand-in returned
starred,hasThumbnail, andtrashedas false on both calls. The default call also returnednameandmimeType.Default JSON includes
"starred": falseand"hasThumbnail": false. It does not includetrashed, even though the stand-in sent"trashed": false. The custom command includes"trashed": falseand does not addstarredorhasThumbnail, even though the stand-in sent both as false.Real behavior proof
gog sites get --jsonomitted requested false booleans. An unstarred site with no thumbnail loststarredandhasThumbnail.--fields id,name,trashedlosttrashedwhen the site was not trashed./tmp/pr-wave/gogcli/bin/gogat4376d004fd5f(v0.48.0-3-g4376d004).GOG_GOOGLE_API_BASE_URLwashttp://127.0.0.1:61660, a local Drive stand-in.GOG_ACCOUNTwas the labellocal@standin.test.GOG_HOMEwas/tmp/gog-f032-proof/home. No Google account was used.cd /tmp/pr-wave/gogcli GOG_HOME=/tmp/gog-f032-proof/home \ GOG_ACCOUNT=local@standin.test \ GOG_GOOGLE_API_BASE_URL=http://127.0.0.1:61660 \ ./bin/gog version GOG_HOME=/tmp/gog-f032-proof/home \ GOG_ACCOUNT=local@standin.test \ GOG_GOOGLE_API_BASE_URL=http://127.0.0.1:61660 \ ./bin/gog sites get site1 --json GOG_HOME=/tmp/gog-f032-proof/home \ GOG_ACCOUNT=local@standin.test \ GOG_GOOGLE_API_BASE_URL=http://127.0.0.1:61660 \ ./bin/gog sites get site1 --fields id,name,trashed --jsonauth Falsemeans the request had no Authorization header."starred": falseand"hasThumbnail": falseand leaves outtrashed. The custom mask includes"trashed": falseand does not add the unrequested false fieldsstarredorhasThumbnail.Testing
CHANGELOG.mdonly.gofmtwas not run because no Go file changed.SitesGetCmdstill callsforceRequestedDriveFileBoolsbeforeWriteJSON.go test ./internal/cmd/ -count=1 -timeout 20m -vet=off -run TestSitesGet_JSONKeepsRequestedFalseBoolscompleted (ok, 0.427s).make buildproducedbin/gogv0.48.0-3-g4376d004.