Skip to content

Automations: Ignore irrelevant unavailable providers - #336333

Open
Ulugbek Abdullaev (ulugbekna) wants to merge 1 commit into
mainfrom
agents/vs-code-automation-warning-fix
Open

Ulugbek Abdullaev (ulugbekna) wants to merge 1 commit into
mainfrom
agents/vs-code-automation-warning-fix

Conversation

@ulugbekna

Copy link
Copy Markdown
Contributor

Summary

  • add provider-neutral evidence for whether a Sessions provider is known to own Automations
  • ignore unavailable providers with no ownership evidence when computing aggregate catalogue completeness
  • retain truthful unavailable state for provider-scoped legacy rows and previously authoritative non-empty Agent Host catalogues
  • preserve migration, routing, tools, and accessible UI behavior by correcting the shared service state rather than suppressing the warning

Validation

  • npm run transpile-client
  • npm run typecheck-client
  • targeted ESLint for all changed TypeScript files
  • 35 focused ProviderAutomationService and AgentHostAutomationStore tests

Only let an unavailable Sessions provider make the aggregate Automation catalogue incomplete when VS Code has evidence that the provider owns automations. Preserve provider-scoped legacy evidence and remember the last authoritative Agent Host catalogue across disconnects.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 29a5d516-b4bf-4a7c-ba34-81afa14d8c6a
Copilot AI balanced review requested due to automatic review settings September 15, 2026 21:11
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Sandeep Somavarapu (@sandy081)

Matched files:

  • src/vs/sessions/services/sessions/common/sessionsProvider.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/sessions/services/sessions/common/sessionsProvider.ts

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.

Copilot review overview

🟡 Changes recommended

Agent Host ownership evidence is lost across provider recreation, allowing a previously non-empty offline catalogue to appear complete after reload.

Get a fresh assessment by requesting another Copilot review.

Review tier: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Adds provider-neutral Automation ownership evidence so unavailable providers without known Automations do not mark the aggregate catalogue incomplete.

Changes:

  • Introduces observable Automation ownership evidence.
  • Preserves evidence across Agent Host disconnects.
  • Updates aggregation behavior, documentation, and tests.
File Description
src/​vs/​sessions/​services/​sessions/​common/​sessionsProvider.ts Adds the provider ownership-evidence contract.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​reconnectableAgentHostAutomationStore.ts Retains Agent Host ownership evidence while disconnected.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​agentHostAutomationStore.ts Derives evidence from projected Automations.
src/​vs/​sessions/​contrib/​automations/​browser/​automationService.ts Derives evidence from persisted legacy rows.
src/​vs/​sessions/​contrib/​automations/​browser/​providerAutomationService.ts Ignores irrelevant unavailable providers during aggregation.
src/​vs/​sessions/​contrib/​automations/​test/​browser/​providerAutomationService.test.ts Tests aggregate catalogue behavior.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHostAutomationStore.test.ts Tests evidence across connection transitions.
src/​vs/​sessions/​AUTOMATIONS.md Documents the revised completeness contract.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

private readonly _runsForCache = new Map<string, IObservable<readonly IAutomationRun[]>>();
private readonly _configurationChanged;
private readonly _authorityState = observableValue<AutomationAuthorityState>(this, { kind: 'disconnected' });
private readonly _lastKnownHostHasAutomations = observableValue(this, false);
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