Skip to content

fix: batch Gateway Connector target scans - #1979

Open
aidandaly24 wants to merge 1 commit into
refactorfrom
fix/gateway-connector-pagination
Open

fix: batch Gateway Connector target scans#1979
aidandaly24 wants to merge 1 commit into
refactorfrom
fix/gateway-connector-pagination

Conversation

@aidandaly24

Copy link
Copy Markdown
Contributor

Summary

  • scan Gateway Targets in service-max 1000-item batches when building logical Connector pages
  • replay only the exact Target prefix needed when a scan contains Connector overflow, preserving AWS pagination tokens without custom cursor state
  • treat the 101-scan limit as a request safety cap rather than tying it to the adjustable default Target quota

Follow-up to #1956, addressing the late review comments about raised Target quotas and one-request-per-Target behavior with --max-results 1.

Testing

  • bun test src/core/gateway.test.ts src/handlers/gateway/gateway.fixture.test.tsx (22 pass)
  • bun run typecheck
  • bun run lint:check
  • bun run format:check
  • bun run build
  • bun test src (1100 pass; 7 unchanged local src/io/exec.test.ts process-runner failures on files identical to refactor)

@aidandaly24
aidandaly24 requested a review from notgitika August 12, 2026 01:45
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 12, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.94%. Comparing base (5e03551) to head (33b3459).
⚠️ Report is 1 commits behind head on refactor.

Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #1979   +/-   ##
=========================================
  Coverage     96.94%   96.94%           
=========================================
  Files           325      325           
  Lines         17869    17884   +15     
=========================================
+ Hits          17323    17338   +15     
  Misses          546      546           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added agentcore-harness-reviewing AgentCore Harness review in progress and removed agentcore-harness-reviewing AgentCore Harness review in progress labels Aug 12, 2026

@notgitika notgitika left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for addressing it!

Comment thread src/core/gateway.tsx
options: CoreOptions,
): Promise<ListGatewayTargetsResponse> {
const pageSize = maxResults ?? DEFAULT_CONNECTOR_PAGE_SIZE;
const connectorPageSize = maxResults ?? DEFAULT_CONNECTOR_PAGE_SIZE;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maxResults should be validated as an integer from 1–1000. currently 0, -1 or 1.25 is being accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants