Skip to content

chore(vscode-e2e): group scenarios into named shards#9423

Open
ccastrotrejo wants to merge 4 commits into
Azure:mainfrom
ccastrotrejo:ccastrotrejo-microsoft-group-vscode-e2e-shards
Open

chore(vscode-e2e): group scenarios into named shards#9423
ccastrotrejo wants to merge 4 commits into
Azure:mainfrom
ccastrotrejo:ccastrotrejo-microsoft-group-vscode-e2e-shards

Conversation

@ccastrotrejo

@ccastrotrejo ccastrotrejo commented Jul 17, 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 vscode-e2e matrix from 18 per-scenario shards → 7 human-readable group shards, cutting redundant CI setup while preserving per-scenario isolation and fail-loud gating.

Grouping is safe because isolation lives at the VS Code session level, not the shard level: runScenarioPhases() runs each scenario through prepareFreshSession() (kills lingering VS Code/chromedriver/dotnet) + a fresh ExTester instance. Grouped scenarios run sequentially in isolated sessions, not in one shared flaky VS Code window.

Changes

  • .github/workflows/vscode-e2e.yml — matrix collapsed to 7 named shards; each passes a comma-separated LA_E2E_SCENARIO list. Job name and screenshot artifacts key on matrix.shard.
  • apps/vs-code-designer/src/test/ui/run-e2e.tsLA_E2E_SCENARIO now accepts a comma-separated list (validated and deduped); single-id usage is unchanged.
  • .squad/knowledge/vscode-e2e-testing.md — learning updated from strict per-scenario shards to grouped shards, including the branch-protection check-name caveat.
Shard Scenarios
activation-and-create p40-nonlogicapp, p48b-conversioncreate
workspace-creation p41b-createworkspace-behavior
designer-lifecycle p42 standard / customcode / rulesengine
runtime-actions p43 inlinejavascript / customcode / rulesengine
designer-interactions p44-statelessvariables, p45-designerviewextended, p46-keyboardnav
suite-and-bundle p47-suite, p412-bundlerepair
project-conversion p48a / p48c / p48d / p48e

Flakiness: scenario-level retry (non-masking)

ExTester UI scenarios had no scenario-level retry, so one transient xvfb/focus/cold-start race failed the whole shard. This PR adds opt-in retry in runScenarioPhases() via LA_E2E_SCENARIO_RETRIES (default 0; CI sets 1). Each retry performs a full prepareFreshSession() and deterministic failures still fail the shard after all attempts. Retry-to-pass is emitted as a warning annotation, not hidden with continue-on-error.

Impact of Change

  • Users: No user-facing product changes; this is CI/test automation only.
  • Developers: VS Code E2E CI now runs 7 named grouped shards instead of 18 per-scenario shards. LA_E2E_SCENARIO accepts comma-separated scenario lists, and LA_E2E_SCENARIO_RETRIES enables opt-in per-scenario retry.
  • System: CI setup/runner cost drops because warm-up is paid on about 7 runners instead of 18. The critical-path wall clock may grow by roughly 4–5 minutes because grouped scenarios run sequentially within a shard. Branch protection should require the stable vscode-e2e-summary rollup rather than individual renamed shard checks.

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: Biome passed; workflow YAML was validated for complete one-time coverage of all 18 scenarios; full tsup/type-compile and grouped shard execution run in CI because this worktree has no node_modules.

Contributors

@ccastrotrejo

Screenshots/Videos

N/A — no visual/UI changes.

Consolidate the vscode-e2e matrix from 18 per-scenario shards into 7
human-readable group shards (activation-and-create, workspace-creation,
designer-lifecycle, runtime-actions, designer-interactions, suite-and-bundle,
project-conversion). LA_E2E_SCENARIO now accepts a comma-separated list; each
scenario still runs in its own fresh VS Code session via prepareFreshSession(),
so grouping preserves per-scenario isolation while amortizing the fixed CI
setup cost (pnpm install, xvfb, artifact hydration) across ~7 runners instead
of 18. Failures stay attributable to a shard and fail loudly (aggregate = max
exit). Updates the Squad knowledge entry to the grouped shape and the
branch-protection check-name caveat.

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

Copilot-Session: 1925dce8-22c3-4c33-b8c2-14d99a4d75f7
Copilot AI review requested due to automatic review settings July 17, 2026 22:05
@github-actions

github-actions Bot commented Jul 17, 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: chore(vscode-e2e): group scenarios into named shards
  • Issue: None — valid chore prefix with scope and a clear, descriptive summary of the change.
  • Recommendation: No change needed.

Commit Type

  • chore - Maintenance/tooling is selected (exactly one).
  • Correct choice: this is CI/test-tooling maintenance with no shipped product behavior change.

Risk Level

  • Exactly one box selected (Low) and the risk:low label matches the body. This aligns with the advised estimate: the change touches only CI workflow config, an E2E test runner, and a knowledge doc — no shipped-product/runtime/security impact and no repo-governance changes (no pull_request_target, no new write permissions). Low is correct.

What & Why

  • Current: Clear explanation of collapsing 18 per-scenario shards into 7 named group shards, why isolation is preserved (session-level prepareFreshSession()), plus the added non-masking retry.
  • Issue: None.
  • Recommendation: No change needed.

Impact of Change

  • All three dimensions are filled in (Users: none/CI-only; Developers: grouped shards + new env vars; System: CI cost/wall-clock tradeoff + branch-protection note).
  • Recommendation:
    • Users: As stated — no user-facing changes.
    • Developers: As stated — LA_E2E_SCENARIO accepts comma lists; LA_E2E_SCENARIO_RETRIES opt-in retry.
    • System: As stated — setup cost amortized across ~7 runners.

Test Plan

  • E2E and Manual testing are checked, and the changes themselves are E2E test-runner/CI updates (run-e2e.ts list parsing + retry loop). This satisfies CHECK TESTS.

Contributors

  • @ccastrotrejo credited.

Screenshots/Videos

  • Correctly marked N/A. No visual UI files touched (libs/designer-ui/src, libs/designer/src, apps/vs-code-react/src UI are untouched).

Summary Table

Section Status Recommendation
Title No change needed
Commit Type No change needed
Risk Level Low is correct
What & Why No change needed
Impact of Change No change needed
Test Plan No change needed
Contributors No change needed
Screenshots/Videos N/A is correct

✅ All checks pass. This PR is compliant with the team template and cleared to merge.


Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Fri, 17 Jul 2026 22:34:52 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.

Pull request overview

This PR updates the VS Code ExTester E2E CI pipeline to reduce runner/setup overhead by grouping individual scenario shards into a smaller set of named, human-readable shards, while keeping scenario-level isolation via fresh VS Code sessions per scenario.

Changes:

  • Collapse the vscode-e2e workflow matrix from per-scenario jobs into 7 named shard jobs that pass a comma-separated LA_E2E_SCENARIO list.
  • Update the E2E launcher (run-e2e.ts) so LA_E2E_SCENARIO can select multiple scenario IDs (validated + deduped) and run them sequentially.
  • Refresh the squad knowledge doc to reflect the grouped-shard CI shape and branch-protection/check-name implications.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/vscode-e2e.yml Replaces per-scenario matrix entries with 7 named shard entries; updates job/artifact naming to key off matrix.shard.
apps/vs-code-designer/src/test/ui/run-e2e.ts Extends LA_E2E_SCENARIO parsing to support comma-separated lists and runs the selected scenarios sequentially.
.squad/knowledge/vscode-e2e-testing.md Updates durable CI learnings to the new grouped-shard model and documents the check-name/branch-protection caveat.

Comment thread apps/vs-code-designer/src/test/ui/run-e2e.ts
ExTester UI scenarios had no retry: a single transient xvfb/focus/cold-start
race failed the whole shard. Add scenario-level retry in runScenarioPhases(),
gated by LA_E2E_SCENARIO_RETRIES (default 0 locally; CI sets 1). Each retry is
a full prepareFreshSession() (kills VS Code/chromedriver/func), so it also
clears stale-window/leftover-process flakes. Non-masking: a scenario that fails
every attempt still fails the shard (exit = max); a retry-to-pass is surfaced
via a ::warning:: flake annotation so the race can still be root-caused. The
whole attempt (session prep, preflight, run, p41a bundle verify) is retryable;
deterministic failures re-throw and still fail. Job timeouts widened
(vscode-e2e 35m, setup-fixtures 30m, compat 25m) so a retry isn't killed
mid-run. Documented in the Squad knowledge base.

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

Copilot-Session: 1925dce8-22c3-4c33-b8c2-14d99a4d75f7
@ccastrotrejo ccastrotrejo changed the title ci(vscode-e2e): group scenarios into named shards chore(vscode-e2e): group scenarios into named shards Jul 17, 2026
@ccastrotrejo ccastrotrejo added risk:low Low risk change with minimal impact and removed needs-pr-update labels Jul 17, 2026
… runs

During a grouped shard, LA_E2E_SCENARIO held the full comma-separated list
while each scenario ran, breaking test/helper code that reads it as the active
scenario id via strict equality (e.g. multipleDesigners.test.ts). Re-point
LA_E2E_SCENARIO at the current scenario id for the duration of each scenario
(reusing the existing env-override capture/restore), so per-scenario semantics
are preserved. Selection already parses the list before runScenarioPhases, so
this does not affect which scenarios run.

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

Copilot-Session: 1925dce8-22c3-4c33-b8c2-14d99a4d75f7
@ccastrotrejo
ccastrotrejo enabled auto-merge (squash) July 17, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:low Low risk change with minimal impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants