Repository navigation
fix(contacts): cap contacts search at Google's 30-result limit - #1323
saariuslystoned wants to merge 2 commits into
Conversation
people.searchContacts and otherContacts.search cap pageSize at 30 and return no page token. contacts search and contacts other search defaulted to --max 50 and silently showed at most 30. Default to 30 and note on stderr when a larger --max is clamped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: ready, awaiting a maintainer decision. What this changesBoth contact search commands default to 30 results and explain on stderr when a larger requested limit is capped. Example: Run gog --json contacts search ada --max 50.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⏳ Ready, awaiting maintainer decision Keep open: current main still advertises an unattainable search limit, and this focused patch needs an owner decision on its changed default and stderr behavior. Priority: P3 Decision needed
Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe contacts CLI handlers turn queries and limits into People API searches, then format returned contacts as JSON or tables. flowchart LR
CLI[CLI query and max] --> Handler[Contact search handlers]
Handler --> Limit[Shared limit helper]
Limit --> API[People API search]
Limit --> Stderr[Stderr explanation]
API --> Output[JSON or table stdout]
Technical reviewBest possible solution: Approve the backward-compatible clamp and explanation in the existing search handlers. Do we have a high-confidence way to reproduce the issue? Current-main source requests 50 by default despite both API contracts capping results at 30; the contributor also supplies matching before-and-after CLI output. Is this the best way to solve the issue? The shared helper is a small complete fix that preserves successful existing calls; strict rejection would unnecessarily break oversized-limit callers unless the owner chooses it. 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 9, 2026, 11:33 AM ET / 16:33 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thank you for the fix. I reproduced the claim and consolidated applying and documenting Google’s effective 30-result Contacts search ceiling into #1336, with regression coverage and your coauthor credit retained. The full |
What problem this solves
people.searchContactsandotherContacts.searchboth documentpageSizeas "Values greater than 30 will be capped to 30". Neither returns a page token, so no request can get more than 30 results.contacts searchandcontacts other searchdefault to--max 50and pass any--maxthrough unchanged. By default, and for every--maxabove 30, they show at most 30 contacts with no sign the list was cut short.contacts export --queryalready enforces this cap (--max must be between 1 and 30).Change
--max 30, and their help says Google returns at most 30.--maxabove 30 is clamped to 30 with a stderr note:# Google returns at most 30 contact search results; showing up to 30 of the requested N. Scripts that pass a larger value keep working and see why fewer results came back.If you'd rather reject a value above 30 with a usage error, as
contacts exportdoes, that's a one-line change.Evidence
TestContactsSearch_RespectsThe30ResultCapruns both commands through the CLI against anhttptestPeople server that, like the API, returns at most 30 results. It checks thepageSizesent and stderr for the default and for--max 50.main(e8428c3), all four cases sendpageSize=50.--max 50.The existing contacts tests pass. - Built
gogbinaries frommainand from this branch were run against a local People stand-in throughGOG_GOOGLE_API_BASE_URL. The stand-in is not Google: like the API, it returns at most 30 results.Stdout stays the same JSON either way.
Every
make cistep passed on0c94ae0(go1.27.3); the head8869299only adds this PR's number to the CHANGELOG entry. The Go test suite ran on a second macOS arm64 machine, and the fmt, lint, deadcode, docs, agent-skills and node checks ran locally.☁️
🤖 Generated with Claude Code