feat(deploy): drain paginated picker options (lockstep consumer for cloud#2018)#218
Conversation
|
Warning Review limit reached
More reviews will be available in 32 minutes and 12 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b257ee5 to
c2c4150
Compare
There was a problem hiding this comment.
Code Review
This pull request updates the relayfileOptionsResolver to support pagination and forward query/limit parameters when resolving integration options. It also introduces a maximum page cap of 200 to prevent infinite loops and adds comprehensive tests. Feedback suggests refining the validation of the limit parameter to ensure it is a positive integer rather than just any finite number.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| while (true) { | ||
| const params = new URLSearchParams(); | ||
| if (trimmedQuery) params.set('query', trimmedQuery); | ||
| if (Number.isFinite(limit)) params.set('limit', String(limit)); |
There was a problem hiding this comment.
The current check Number.isFinite(limit) allows non-integer values (e.g., 2.5) and non-positive values (e.g., 0 or -5) to be forwarded to the server as the limit parameter. Since API limits should typically be positive integers, it is safer and more robust to validate that limit is a positive integer before setting it.
| if (Number.isFinite(limit)) params.set('limit', String(limit)); | |
| if (Number.isInteger(limit) && limit > 0) params.set('limit', String(limit)); |
|
pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
✅ pr-reviewer applied fixes — committed and pushed pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
Implemented the validated fix for PR #218. Changed:
Verified:
Addressed comments
I am not printing |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. Reviewed PR #218 against the current checkout. I did not make source edits because the only actionable bot finding is already fixed in the checked-out code. Validation run: GitHub metadata observed: PR mergeable state is Addressed comments
|
|
✅ pr-reviewer applied fixes — committed and pushed Implemented one fix from review: The default cloud picker resolver now receives deploy Added a regression test that exercises the real default resolver through Addressed comments
Verification run:
Deploy package tests passed: 188/188. I did not verify GitHub CI status or mergeability from GitHub. |
|
pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
1 similar comment
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
1 similar comment
|
pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. pr-reviewer could not complete review for #218 in AgentWorkforce/workforce. |
Lockstep consumer for AgentWorkforce/cloud#2018 (server-side search + pagination for picker options).
What & why
cloud#2018 upgrades the picker options endpoint to a searchable, paginated
{ options, nextCursor }contract (acceptsquery/cursor/limit). This upgrades the workforce CLI's cloud-backed options resolver to consume that contract, so deploy-time pickers fetch via small fast pages instead of one giant call on big Slack workspaces.Safe to merge before cloud#2018 deploys (true lockstep, not a hard dep)
The resolver is fully backward compatible: against an old/un-deployed cloud whose response has no
nextCursor, it behaves exactly as today — a single fetch, byte-identical normalized output. The pagination simply lies dormant until the server supports it. So this can land independently; the two just unlock the full searchable/paged UX once both are live + deployed.Changes (
packages/deploy/src/connect.ts)IntegrationOptionsResolver.listargs with optionalquery/cursor/limit(additive — existing callers/mocks unaffected; the picker consumer call is unchanged).relayfileOptionsResolvernow drains pages internally and returns the full accumulatedPickerOption[]:URLSearchParams— forwards non-emptyquery, finitelimit, and the activecursor.{value,label,hint?}normalization preserved verbatim); never slices.nextCursorabsent/empty → end (this is the old-cloud path = one fetch); server repeats the same cursor → stop (defensive, no infinite loop);pages >= RELAYFILE_OPTIONS_MAX_PAGES(200) →io.warn+ return truncated.{ options: [], nextCursor: "x" }is a valid keep-paging state (mirrors cloud#2018's query-filtered Slack empty-page case).io?: Pick<DeployIO,'warn'>to the resolver opts for the page-cap warning (mirrorsrelayfileCatalogConfigKeyResolver).Tests (
packages/deploy/src/connect.test.ts, node:test) — full deploy suite green: 186/186nextCursor) → exactly 1 fetch, identical output, nocursorparam sent (the merge-safety guarantee).cursorforwarded per page.nextCursor→ keeps paging (does not stop on empty).RELAYFILE_OPTIONS_MAX_PAGES, warns, returns truncated list.query+limitforwarded as URL params.Review trail
codex-2003 implemented in an isolated worktree off
origin/main; lead-cloud-2003 reviewed the diff + independently re-ran the full deploy suite (186/186). skills-fixer-cloud-2003 runs the provenance-agnostic mutation matrix on the guards.🤖 Generated with Claude Code