Skip to content

github: migrate cloud sandbox API operations to shared GitHub clients - #346903

Merged
Dmitriy Vasyura (dmitrivMS) merged 9 commits into
mainfrom
dev/dmitriv/cloud-sandbox-discovery-contract
Nov 9, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 9 commits into
mainfrom
dev/dmitriv/cloud-sandbox-discovery-contract

Conversation

@dmitrivMS

@dmitrivMS Dmitriy Vasyura (dmitrivMS) commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #345234.

Related https://github.com/microsoft/vscode-internalbacklog/issues/9678

Shared client contracts

  • Normalize approved GitHub task pagination links back to the configured Copilot API endpoint, retaining host/path validation. Preserve omitted collection filters and repeated query values without carrying an old page or cursor into the next pagination mode; explicit continuation values take precedence.
  • Support mutually exclusive task-list page/cursor inputs and expose successful Retry-After polling hints.
  • Preserve the earliest valid server date and greatest retry hint across collected pages. Individual page parsers retain their original metadata; final continuations and existing totals are preserved.
  • Keep ordinary bounded paging and failure semantics: callers may explicitly request a partial collection at a page cap, but HTTP, schema, continuation, and cancellation errors reject rather than publishing failed-page fragments.
  • Add the environment deletion/sealing and task reservation/claim contracts, retain creation response metadata and safe failed-create identities across IPC, and restore the missionControlModels catalog client.

Cloud sandbox migration

  • Use retained account-scoped typed clients for discovery, task details, repository enrichment, environment reads/credentials/deletion, token sealing, task creation/reservation/claim, rename/archive/delete, and model discovery.
  • Use native task batches for targeted refreshes. Successful omissions remove discoverability; failed chunks retain prior inventory and identify retries. Individual task GETs remain on-demand resolution, not automatic batch fallbacks.
  • Let shared transport own scheduling, retries, coalescing, and physical request telemetry. Repository enrichment shares one pending lookup per repository within each discovery pass, without another workbench concurrency limiter. Credential telemetry counts logical operations separately from HTTP attempts.
  • Keep response parsing in the shared clients and caller-side policy, presentation, and model normalization in the workbench. Preserve credential-free environment inventory and account-pinned cleanup, including conservative handling of uncertain reservation outcomes.
  • Preserve sandbox HTTP-error adaptation for actual HTTP failures, without relabeling malformed successful responses as HTTP failures. Initialize authorization before registering cold on-demand resolution, retaining cancellation and independent-waiter behavior.
  • Let pass-level generation checks report invalidated discovery; a repository lookup must not turn a task mutation into caller cancellation or cache stale enrichment.
  • Migrated calls use shared default timeouts; higher-level connection/retry budgets remain.

Prepare the existing typed list path for cloud sandbox discovery. Normalize approved task continuation links and retain conservative server timing and polling hints across collected pages. Part of #345234.

Co-authored-by: Copilot <[email protected]>

Copilot AI 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.

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

3 open issues
What changed in this PR

Adds conservative pagination metadata handling (earliest server date + max retry-after), introduces support for cursor-based continuation for task listing, and hardens next-link validation/mapping for Mission Control task pagination.

Changes:

  • Aggregate serverDate and retryAfterSeconds conservatively across collected pages and expose retryAfterSeconds in PaginatedResponse.
  • Add cursor to task list options and extend tests to cover cursor walking, empty pages, IPC propagation, and malformed continuations.
  • Add Mission Control–specific next-page parsing/mapping to safely handle /agents/tasks pagination links.
File Description
src/​vs/​platform/​github/​test/​node/​missionControlClient.test.ts Expands pagination tests for conservative metadata, cursor continuation, and retry-after exposure.
src/​vs/​platform/​github/​test/​common/​githubChannel.test.ts Adds IPC test ensuring conservative metadata and task payload retention across bounded lists.
src/​vs/​platform/​github/​common/​missionControl/​tasks.ts Extends task list options with cursor continuation parameter.
src/​vs/​platform/​github/​common/​missionControl/​missionControlClient.ts Aggregates server-date + retry-after across pages; exposes retry-after in paginated().
src/​vs/​platform/​github/​common/​missionControl/​missionControl.ts Updates PaginatedResponse contract to include conservative semantics + retry-after.
src/​vs/​platform/​github/​common/​client/​localMissionControlRequestProvider.ts Adds specialized next-link parsing/mapping for Mission Control task pagination.

Review effort: Lite

Validate mutually exclusive task page and cursor parameters before request dispatch, compare normalized pagination origins and paths, and retain parsed server timestamps during page collection.

Co-authored-by: Copilot <[email protected]>

Copilot AI 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.

Route task and repository reads through retained typed account clients. Preserve bounded discovery and cached inventory on failed refreshes, reuse repository labels, and use shared transport scheduling and request telemetry. Part of #345234.

Co-authored-by: Copilot <[email protected]>
Read targeted task metadata in batches of at most 50 IDs. Reconcile successful omissions as discoverability changes without per-ID recovery, retain failed chunks for retry, and keep detail reads on demand. Remove discovery-owned repository-enrichment scheduling. Part of #345234.

Co-authored-by: Copilot <[email protected]>
Remove the remaining cloud sandbox API service limiter while preserving per-task coalescing, independent waiter cancellation, and account and lifetime checks. Let the shared GitHub queue own request admission and concurrency.

Co-authored-by: Copilot <[email protected]>
Migrate environment, task mutation and creation, token sealing, and model operations to typed clients. Preserve account-scoped cleanup and sandbox HTTP errors, centralize response validation, and cover the shared transport and IPC contracts.

Co-authored-by: Copilot <[email protected]>
@microsoft Microsoft (microsoft) deleted a comment from github-actions Bot Nov 9, 2026
Include Mission Control models in the account facade expectations and domain attribution coverage. Feed the cloud model picker fixture through the typed account client with a complete test profile while preserving its catalog and rendering.

Co-authored-by: Copilot <[email protected]>

Copilot AI 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.

Preserve collection filters across pagination, retain malformed successful-read errors, authorize cold session resolution before sharing it, and deduplicate repository enrichment within each discovery pass. Keep generation invalidation at the inventory boundary and cover each regression.

Co-authored-by: Copilot <[email protected]>
@dmitrivMS Dmitriy Vasyura (dmitrivMS) changed the title github: preserve Mission Control pagination metadata cloud sandbox: migrate API operations to shared GitHub clients Nov 9, 2026
@dmitrivMS Dmitriy Vasyura (dmitrivMS) changed the title cloud sandbox: migrate API operations to shared GitHub clients github: migrate cloud sandbox API operations to shared GitHub clients Nov 9, 2026

Copilot AI 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.

🔵 Needs a closer look

Human assessment is needed because authentication races and shared-parser compatibility changes can abort authentication or block discovery of all sandbox sessions.

No open issues 🎉

6 resolved since last review

Review effort: Max

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) marked this pull request as ready for review November 9, 2026 21:26
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 53dca6e into main Nov 9, 2026
51 checks passed
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) deleted the dev/dmitriv/cloud-sandbox-discovery-contract branch November 9, 2026 21:34
@vs-code-engineering vs-code-engineering Bot added this to the 1.147.0 milestone Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

network Network related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants