Skip to content

test(vscode): add test-cli lifecycle baseline - #9592

Open
Brian Lam (lambrianmsft) wants to merge 333 commits into
Azure:mainfrom
lambrianmsft:lambrian-microsoft-vs-code-test-cli-baseline
Open

Brian Lam (lambrianmsft) wants to merge 333 commits into
Azure:mainfrom
lambrianmsft:lambrian-microsoft-vs-code-test-cli-baseline

Conversation

@lambrianmsft

@lambrianmsft Brian Lam (lambrianmsft) commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

Consolidates the VS Code @vscode/test-cli lifecycle baseline, source-bound Linux/Windows E2E orchestration, authentication, diagnostics, evidence, and pipeline controls. ExTester remains available for existing deep-webview coverage; this is not a wholesale replacement.

The final scope removes temporary product-side test accommodations and restores production behavior:

  • Removed D3 durable error storage and D7 diagnostic DOM attributes.
  • Restored the original Run After names (D8).
  • Removed E1 activation bypasses, E2 update suppression, E4 synthetic authentication sessions, E8 feed retry overrides, E10 writer diagnostics, and E11 Func task diagnostics.
  • Retained only a test-side regeneration fallback: use the foreground prompt first, then reveal Notification Center exactly once and select the exact retained notification.

Head 2feee1a1e36211c4adbb829388360c4857d8a94e merges the accepted E2E history through 3b7e2fdee6cca71c60412bc070c3af5063764c57 with main b454249957be387410d5d54f85025f09f69d4836. This includes #9707 consistency-check opt-out and host.json behavior along with recent main changes.

The fork branch lambrian-microsoft-vs-code-test-cli-baseline and Azure mirror branch lambrian/test-cli-baseline-changes point to the exact same commit and history. Risk remains High because this is a broad extension-test and pipeline consolidation; fresh CI and source-bound ADO validation are still required for the final merge SHA.

Impact of Change

  • Users: No intended UI change. Temporary test-only product behavior is removed, original Run After names are restored, and current main host.json behavior is preserved.
  • Developers: Provides the consolidated test-cli lifecycle harness, deterministic retained-notification fallback, cross-platform evidence, and source-bound ADO controls.
  • System: Incorporates latest main and accepted E2E history while preserving exact fork/Azure mirror history. Final-SHA CI and ADO validation remain pending.

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: pnpm 11 local installation/build validation, focused VS Code Vitest, CLI and ExTester compilation, and historical source-bound Azure DevOps Linux/Windows E2E.

Completed validation:

  • Strict pnpm 11 frozen recursive install passed.
  • Focused VS Code Vitest passed: 6 files, 252 passed, 1 skipped.
  • test:e2e-cli:compile passed.
  • ExTester tsup compilation passed.
  • test:e2e-cli:unit passed after the final fixes.
  • test:e2e-cli:build passed, covering the extension build, VS Code React build, compilation, and full controls.
  • Canonical source-bound ADO run 16058353 accepted 11 Linux suites, 12 Windows suites, and the protected rollup at accepted SHA 27123d86. This is historical evidence only; it does not validate final head 2feee1a1.
  • The Guardian SDL failure is an external managed-bootstrap failure, not an E2E test failure.
  • Fresh GitHub CI and source-bound ADO validation are pending for the final SHA.

Contributors

Brian Lam (@lambrianmsft)

Screenshots/Videos

Not applicable — this consolidated PR is primarily test infrastructure and product cleanup with no visual UI change. Existing attached diagnostic screenshots document the retained-notification issue; no additional screenshots are required.

Copilot AI balanced review requested due to automatic review settings September 1, 2026 22:24
@lambrianmsft Brian Lam (lambrianmsft) added the risk:medium Medium risk change with potential impact label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

✅ PR Title

  • Current: test(vscode): add test-cli lifecycle baseline
  • Issue: None — uses the valid test: prefix with a scope and is descriptive.
  • Recommendation: No change needed.

✅ Commit Type

  • Exactly one type selected: test - Test-related changes.
  • This matches the change set (new E2E/test-CLI baseline, pipeline/test infrastructure).

❌ Risk Level

  • You selected High and applied risk:high; the label and body agree with each other, but they do not match the advised estimate of Medium. The diff is CI/test automation and build/release-pipeline plumbing: Azure DevOps YAML templates, a self-contained E2E pipeline, WIF/service-connection credential wiring for CI, and a migration of 1esmain.yml/release.yml to published AzureTools wrappers (release stays dryRun: true). No shipped product/runtime behavior or user-facing auth path changes are present in the diff — the subscription-provider seam explicitly preserves existing authentication. This changes the repo's CI security/permissions posture and extension-distribution pipeline, which is Medium under the rubric; it is not shipped-product/security impact, so it does not reach High. Action: change the body selection to Medium and update the label to risk:medium.

✅ What & Why

  • Current: Detailed explanation of the test-cli baseline, branch-driven E2E pipeline, WIF auth seam, and ADO migration.
  • Issue: None.
  • Recommendation: No change needed.

✅ Impact of Change

  • All three audiences (Users, Developers, System) are addressed.
  • Recommendation:
    • Users: Keep the "no designer UI changes; local sign-in preserved" note.
    • Developers: Keep the Node >=22.13.0 / pnpm >=11.3.0 prerequisites note.
    • System: Keep the production/E2E separation and central-governance note.

✅ Test Plan

  • Unit and E2E tests are both marked and corroborated in the diff (test:e2e-cli:unit, compiled E2E suites, manifest/pipeline contract coverage). Manual testing is also documented. Passes.

✅ Contributors


⚠️ Screenshots/Videos

  • Marked N/A. The diff touches pipeline/test infrastructure and scripts, not libs/designer-ui/src, libs/designer/src, or apps/vs-code-react/src UI components, so screenshots are not required. No action needed.

Summary Table

Section Status Recommendation
Title ✅ None
Commit Type ✅ None
Risk Level ❌ Change body to Medium and label to risk:medium
What & Why ✅ None
Impact of Change ✅ None
Test Plan ✅ None
Contributors ✅ None
Screenshots/Videos ⚠️ Not required (no UI change)

This PR is blocked only by the Risk Level mismatch: the declared High does not match the advised Medium. Re-select Medium in the body and set risk:medium, and this PR will pass.


Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Wed, 04 Nov 2026 19:41:54 GMT

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.

Pull request overview

Adds a latest-stable @vscode/test-cli E2E baseline for the VS Code Logic Apps extension, enabling Create Workspace and select lifecycle tests to run independently of ExTester while improving CI visibility.

Changes:

  • Added root and app-level pnpm scripts plus Node wrappers to run label-based CLI E2E and multi-host lifecycle flows.
  • Introduced new CLI E2E test utilities (dialog guard, CDP helpers, screenshots) and expanded smoke / Create Workspace coverage.
  • Updated CI (vscode-e2e.yml) to run a Create Workspace CLI matrix with structured results + aggregate reporting.

Reviewed changes

Copilot reviewed 33 out of 44 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Adds root-level forwarding scripts for new CLI E2E entry points.
libs/vscode-extension/src/graphify-out/GRAPH_REPORT.md Updates generated graph report snapshot metadata/content.
libs/data-mapper-v2/src/graphify-out/GRAPH_REPORT.md Updates generated graph report snapshot metadata/content.
libs/chatbot/src/graphify-out/GRAPH_REPORT.md Updates generated graph report snapshot metadata/content.
libs/a2a-core/src/graphify-out/GRAPH_REPORT.md Updates generated graph report snapshot metadata/content.
apps/vs-code-designer/src/test/e2e/workspaceArtifacts.ts Adds helpers/assertions for generated workspace artifacts (tasks/launch/settings/csproj).
apps/vs-code-designer/src/test/e2e/webviewTabs.ts Adds helpers to find/wait/close webview tabs in VS Code.
apps/vs-code-designer/src/test/e2e/visibleDelay.ts Adds optional “keep host visible” delay for local debug runs.
apps/vs-code-designer/src/test/e2e/testUtils.ts Adds small string/path helper utilities for tests.
apps/vs-code-designer/src/test/e2e/screenshot.ts Adds screenshot capture utilities (Windows screen + CDP).
apps/vs-code-designer/src/test/e2e/extension.test.ts Expands activation smoke to assert dist loading, dependencies, empty startup, and dialog suppression.
apps/vs-code-designer/src/test/e2e/dialogGuard.ts Adds dialog interception/allowlist to fail tests on unexpected prompts.
apps/vs-code-designer/src/test/e2e/createWorkspaceTypes.ts Adds typed models for Create Workspace test cases.
apps/vs-code-designer/src/test/e2e/createWorkspaceParityMap.md Documents ExTester↔CLI parity mapping for Create Workspace + lifecycle coverage.
apps/vs-code-designer/src/test/e2e/createWorkspaceCases.ts Adds curated Create Workspace case generators and label filtering.
apps/vs-code-designer/src/test/e2e/commands.test.ts Replaces generic command listing with explicit Logic Apps command/config assertions + dialog guard.
apps/vs-code-designer/src/test/e2e/cdpFormHelpers.ts Adds CDP-based Create Workspace webview interaction helpers (fields, dropdowns, radios).
apps/vs-code-designer/src/test/e2e/cdpClient.ts Adds a lightweight CDP client to connect to VS Code’s remote debugging targets.
apps/vs-code-designer/src/test/e2e/azureAuthWarmup.test.ts Adds Azure auth warm-up test for durable local profiles.
apps/vs-code-designer/src/test/e2e/README.md Major documentation expansion for running CLI E2E locally and in CI.
apps/vs-code-designer/src/main.ts Adds env-gated minimal activation and env-gated workspace ensure skip for CLI test runs.
apps/vs-code-designer/src/app/utils/codeless/getAuthorizationToken.ts Adds test-gated env token fallback for silent auth; fixes return type to allow undefined.
apps/vs-code-designer/src/app/utils/codeless/test/getAuthorizationToken.test.ts Adds unit coverage for the new test-gated Azure CLI token fallback behavior.
apps/vs-code-designer/scripts/summarize-e2e-cli-results.js Adds Mocha log parsing + JSON/JUnit/summary generation and aggregate reporting.
apps/vs-code-designer/scripts/run-e2e-cli.js Adds wrapper to run labels/lifecycle flows, filter noise, enforce “no dialogs”, and clean temp workspaces.
apps/vs-code-designer/scripts/open-e2e-cli-vscode.js Adds helper to open latest-stable VS Code with an isolated profile for interactive verification/auth.
apps/vs-code-designer/package.json Replaces direct vscode-test call with wrapper scripts for CLI E2E and lifecycle flows.
apps/vs-code-designer/.vscode-test.mjs Expands @vscode/test-cli config to multiple labels, env forwarding, and per-run user-data settings.
.squad/knowledge/vscode-e2e-testing.md Documents learnings/patterns for CLI Create Workspace CI structured results and parity scripts.
.github/workflows/vscode-e2e.yml Adds Create Workspace CLI matrix job + aggregate report job and wires into overall summary.

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

Comment thread apps/vs-code-designer/.vscode-test.mjs Resolved
@lambrianmsft
Brian Lam (lambrianmsft) force-pushed the lambrian-microsoft-vs-code-test-cli-baseline branch from ef950fb to 097593f Compare September 1, 2026 22:27
@lambrianmsft Brian Lam (lambrianmsft) added risk:low Low risk change with minimal impact and removed risk:medium Medium risk change with potential impact labels Sep 18, 2026
@lambrianmsft Brian Lam (lambrianmsft) added risk:high High risk change requiring careful review and removed risk:low Low risk change with minimal impact needs-pr-update labels Sep 22, 2026
@lambrianmsft
Brian Lam (lambrianmsft) force-pushed the lambrian-microsoft-vs-code-test-cli-baseline branch 2 times, most recently from c683e04 to 262e1da Compare October 2, 2026 00:34
Copilot AI and others added 5 commits October 6, 2026 11:43
Do not certify post-exit ancestry as retained process exit proof. Preserve the family implementation, prevent direct/batch cleanup-green finalization, and stop native launch until case-scoped live Code/Func/task/Azurite identity coverage exists. Add PID1 reparenting, exited-parent, PID-reuse, missing-birth and inaccessible-proof diagnostic controls without an ownership framework or broad kill.

Co-authored-by: Copilot <copilot@github.com>
…ontract

Refresh canonical app-root terminal/cleanup paths before admission and finalize standardized lifecycle evidence only after actual native phase closure, evidence checks and owned-root removal. Include exact ordered phase completeness and missing/unexpected/duplicate/blocked arrays, diagnostics and phase proofs using existing branch wrapper helpers. Add freshness/cleanup/partial-phase controls without copying parent implementation or changing counts/native claims.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Expose originalProcessClosureVerified and processClosureProof solely from the actual observer's retainedOriginalIdentitiesVerified flag. Current legacy post-exit ancestry lacks that proof and therefore reports false/original-identities-unverified even after GUI phases and root cleanup succeed. Assert the truthful marker in existing controls without synthesizing identity proof or changing phase/history outcomes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
cdp.evaluate<Point | null>(
context,
`(() => { ${workbenchVisibleScript}
const found=Array.from(document.querySelectorAll(${JSON.stringify(selector)})).filter(visible)
context,
`(() => { ${workbenchVisibleScript}
const found=Array.from(document.querySelectorAll(${JSON.stringify(selector)})).filter(visible)
.filter(e => ${exact ? 'normalized(text(e))===' : 'normalized(text(e)).includes('}normalized(${JSON.stringify(label)})${exact ? '' : ')'} &&
cdp.evaluate<{ point: Point | null }>(
context,
`(() => { ${workbenchVisibleScript}
const all=Array.from(document.querySelectorAll(${JSON.stringify(selector)}));
const hit=document.elementFromPoint(p.x,p.y);
return {text:text(e),ariaLabel:e.getAttribute('aria-label'),title:e.getAttribute('title'),
visible:visible(e),enabled:!e.disabled && e.getAttribute('aria-disabled')!=='true',
matches:${exact ? 'normalized(text(e))===' : 'normalized(text(e)).includes('}normalized(${JSON.stringify(label)})${exact ? '' : ')'},
enabled: !e.disabled && !e.closest('[aria-disabled="true"], .disabled'),
point: point(e),
}));
const matches=candidates.filter(entry => normalized(entry.text)===normalized(${JSON.stringify(label.replace(/…/g, '...'))}) && entry.enabled && entry.point);
'.explorer-viewlet .monaco-list-row, .explorer-folders-view .monaco-list-row'
)).filter(visible).filter(row => {
const classes = row.className || '';
return text(row).includes(${JSON.stringify(fileName)}) &&
hitTestable:!!point(row)};
};
const candidates=rows.map(read);
const expected=${JSON.stringify(expected)};
`(() => { ${visibleScript}
const rows=Array.from(document.querySelectorAll('.explorer-folders-view .monaco-list-row[aria-level="1"]')).filter(visible);
const roots=rows.map(e=>text(e.querySelector('.label-name') || e));
const matches=rows.filter(e=>text(e.querySelector('.label-name') || e)===${JSON.stringify(label)});
undefined,
`(() => { ${visibleScript}
const ownerPresent = Array.from(document.querySelectorAll('iframe')).some(e => {
try { return new URL(e.src).hostname === ${JSON.stringify(owner)}; } catch { return false; }
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reacquire the live Add Action target once after a pre-input browser hit-test failure, while preserving the original center-point route and preventing retries after trusted input begins.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the designer's trusted Fit view control before resolving the last Add Action target so lower workflow handles are browser-visible on Windows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Set the managed Guardian ESLint runtime independently from the Node 22 E2E jobs, and record the tracked jschardet engine-strict mitigation.

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

This branch was successfully deployed

1 active (outdated) deployment
standalone-ephemeral — 360ffeeb Deployed Sep 15, 2026 by lambrianmsft via select #41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high High risk change requiring careful review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants