Skip to content

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

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

Brian Lam (lambrianmsft) wants to merge 336 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 into one PR and one shared branch history. ExTester remains available for existing deep-webview coverage; this is not a wholesale replacement.

The final scope preserves real UI interaction and production behavior while making the ADO baseline and its artifacts deterministic and easier to review:

  • Retains the accepted test-side regeneration fallback: use the foreground prompt first, then reveal Notification Center once and select the exact retained notification.
  • Reacquires Add Action geometry once before input, fits and zooms the workflow so append handles are browser-visible, and never replays input after dispatch starts.
  • Accepts only exact semantic operation-card replacements during React rerenders.
  • Preserves non-target .vscode files, .NET 10 regeneration settings, codeful workflow-type translation, extension-pack readiness, and exact monitoring/panel ownership.
  • Makes Windows evidence-directory identity deterministic when NTFS immediately reuses directory metadata.
  • Runs managed Guardian ESLint on Node 24 independently from the Node 22 E2E jobs.
  • Simplifies ordered evidence to compact e/NNN.{png,json} and d/x-<hash>.{png,json} paths while preserving semantic checkpoint identity in the manifest.
  • Adds root-level evidence.html, a script-free offline report with verified screenshots embedded as data URIs, so reviewers can download one file instead of the Markdown plus image tree. Markdown and JSON remain compatibility/machine contracts; oversized or unavailable image embedding degrades without changing the lane verdict.

Final head is 8fd75e7c13d3dc306d3af499da9aaf48bab6295f. The fork branch lambrian-microsoft-vs-code-test-cli-baseline and Azure ADO branch lambrian/test-cli-baseline-changes point to this exact commit with identical history.

Impact of Change

  • Users: No intended product UI change. Tests continue to drive the real VS Code and Logic Apps UI without synthetic command or DOM-click shortcuts.
  • Developers: Provides the consolidated lifecycle harness, exact trusted-input controls, source-bound evidence, deterministic cleanup contracts, compact artifact paths, and one-file offline evidence review.
  • System: Updates ADO E2E, evidence staging/reporting, and managed SDL configuration. Risk remains High because this is broad extension-test, lifecycle, authentication, evidence, and pipeline consolidation.

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: local Windows controls, offline browser rendering, and source-bound ADO Linux/Windows VS Code 1.148.0 jobs

Completed validation:

  • npx biome check --write <changed-files> — passed.
  • node --test apps/vs-code-designer/scripts/vscode-e2e-evidence-report.unit.test.js — 19/19 passed.
  • node apps/vs-code-designer/scripts/pipeline-contract.unit.test.js — passed.
  • pnpm --dir apps/vs-code-designer run test:e2e-cli:build — passed after the final changes.
  • Replayed the renderer against a real 40-step HTTP artifact: generated a 3.6 MiB self-contained report that opened offline.
  • Canonical ADO 16147694 at exact SHA 8fd75e7c13d3dc306d3af499da9aaf48bab6295f — all 11 Linux suites, all 12 Windows suites, managed Guardian SDL analysis, and the protected both-OS full rollup passed on attempt 1.
  • Downloaded the produced Windows HTTP artifact: evidence.html was 4.63 MiB with embedded images; e/ contained 72 compact files, d/ contained 16 compact files, and no legacy screenshots/ folder was published.

Contributors

Brian Lam (@lambrianmsft)

Screenshots/Videos

Not applicable — this PR changes test infrastructure, lifecycle controls, evidence, and pipeline configuration rather than product UI.

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:47
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Expose truthful original-process closure markers and require retained-original identity proof for acceptance. Permit explicit isolated parent-owned diagnostic execution without deleting fixture/history evidence or promoting GUI/exit-zero observations to cleanup approval. Preserve the exact three phases and blocked retained-identity gate.

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

# Conflicts:
#	apps/vs-code-designer/package.json
#	apps/vs-code-designer/scripts/e2e-cli-batch.js
#	apps/vs-code-designer/scripts/run-e2e-cli.js
Report originalProcessClosureVerified=false and original-identities-unverified in custom direct/archive receipts until a genuine retained-original-identities observer is integrated. Do not promote ordinary exits, removed directories, post-exit ancestry or caller/model flags to acceptance proof. Add controls and preserve diagnostic GUI/phase evidence without framework or pipeline changes.

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>
Accept exact semantic operation-card replacements during trusted input and zoom out once after Fit so append handles remain browser-visible in short Windows viewports.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use a run-owned identity marker so Windows rename-and-recreate controls cannot pass when NTFS immediately reuses directory metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use compact manifest-driven evidence paths and publish a script-free evidence.html with verified screenshots embedded for one-file offline review.

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