Skip to content

test(wework): split slow desktop e2e checkpoints - #2569

Merged
qdaxb merged 2 commits into
mainfrom
test/speed-up-wework-e2e
Aug 11, 2026
Merged

qdaxb merged 2 commits into
mainfrom
test/speed-up-wework-e2e

Conversation

@qdaxb

@qdaxb qdaxb commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • split the automation lifecycle out of core-task-flow into an independently bootstrapped automation-lifecycle checkpoint
  • split local model switching, provider retry, vision sidecar, and protocol matrix coverage into a model-routing checkpoint
  • classify automation and model-routing changes to the smallest relevant desktop E2E matrix jobs
  • run cloud Backend preparation in parallel with Executor compilation, then run remote Executor registration in parallel with the Tauri build
  • document the updated checkpoint order and cloud startup dependencies in Chinese and English

Why

Recent successful CI runs showed core-task-flow taking roughly 6.5–7 minutes and the cloud desktop suite taking roughly 10.5–11 minutes. Model routing accounted for about three minutes of the serialized core flow, while cloud startup performed independent build and service-preparation work sequentially.

The new checkpoints preserve the existing assertions and establish their own minimal fixtures, allowing GitHub Actions to execute the slow sections in parallel. The unsegmented complete desktop flow still executes every scenario.

Impact

  • the core task-flow critical path no longer includes automation or the local model protocol matrix
  • automation and model-related changes select focused CI jobs
  • cloud cold-start work overlaps without changing application startup prerequisites
  • no E2E assertions are skipped or weakened

Validation

  • bash .github/scripts/test-classify-ci-changes.sh
  • pnpm --filter wework exec prettier --check e2e/desktop/task-flow.e2e.mjs e2e/desktop/checkpoints.mjs
  • pnpm --filter wework exec eslint e2e/desktop/task-flow.e2e.mjs e2e/desktop/checkpoints.mjs
  • pnpm --filter wework test — 344 files, 3325 tests passed
  • pre-push ESLint, TypeScript, and unit-test checks passed
  • focused real-Tauri model-routing checkpoint passed locally

Local macOS runs of longer desktop flows also exposed an existing harness issue where the WebView control client can stop polling after otherwise successful UI commands. Failures occurred at unrelated actions in separate runs; Linux GitHub Actions remains the authoritative full desktop validation environment.

Summary by CodeRabbit

  • Tests

    • Expanded desktop end-to-end coverage for automation lifecycle and model routing scenarios.
    • Added validation for model switching, provider retries, vision workflows, request history, and automation execution.
    • Improved cloud test startup coordination to reduce setup delays and improve reliability.
  • Documentation

    • Updated English and Chinese guides with new test checkpoints, focused commands, coverage details, and parallel startup guidance.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@qdaxb, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 368fe5d4-250f-42e3-a985-2ab3d081e26a

📥 Commits

Reviewing files that changed from the base of the PR and between 1087dff and a9d9173.

📒 Files selected for processing (1)
  • wework/e2e/desktop/task-flow.e2e.mjs
📝 Walkthrough

Walkthrough

Desktop E2E adds automation-lifecycle and model-routing checkpoints. CI classification, focused execution, documentation, model-routing verification, automation gating, and cloud startup orchestration are updated.

Changes

Desktop E2E checkpoint expansion

Layer / File(s) Summary
Checkpoint definitions and CI routing
.github/scripts/classify-wework-desktop-e2e.sh, .github/scripts/test-classify-ci-changes.sh, wework/e2e/desktop/checkpoints.mjs, docs/.../wework-e2e-automation.md
The checkpoint list and CI classifier now route automation paths to automation-lifecycle and model-related paths to model-routing. Tests and English and Chinese documentation cover the new segments.
Cloud executor startup separation
wework/e2e/desktop/task-flow.e2e.mjs, docs/.../wework-e2e-automation.md
Cloud backend startup and remote executor startup use separate operations. Executor and application preparation now run in parallel with infrastructure setup.
Model-routing verification flow
wework/e2e/desktop/task-flow.e2e.mjs, docs/.../wework-e2e-automation.md
Local model-routing checks move into verifyLocalModelRouting, which validates protocol switching, retries, provider changes, vision sidecars, request history, and verification artifacts.
Automation lifecycle checkpoint execution
wework/e2e/desktop/task-flow.e2e.mjs
Automation verification runs for AUTOMATION_ONLY or the automation-lifecycle checkpoint. Core task flow now gates this execution by checkpoint selection.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ExecutorBuild
  participant CloudBackend
  participant DesktopBuild
  participant RealCloudEnvironment
  ExecutorBuild->>RealCloudEnvironment: provide executor binary
  CloudBackend->>RealCloudEnvironment: start backend
  DesktopBuild->>RealCloudEnvironment: prepare desktop application
  RealCloudEnvironment->>RealCloudEnvironment: start remote executor
Loading

Possibly related PRs

Suggested labels: ci:all

Suggested reviewers: lvmowei

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: splitting slow WeWork desktop E2E coverage into separate checkpoints.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/speed-up-wework-e2e

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qdaxb
qdaxb marked this pull request as ready for review August 11, 2026 03:45

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
wework/e2e/desktop/task-flow.e2e.mjs (1)

15410-15413: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the unreachable MODEL_SWITCH_ONLY branch.

The block at Line 14971 runs and returns whenever MODEL_SWITCH_ONLY is true. Execution never reaches Line 15410 with MODEL_SWITCH_ONLY set, so this branch is dead code. Keep the single focused entry point at Line 14971.

♻️ Proposed cleanup
-      if (MODEL_SWITCH_ONLY) {
-        console.log(`Wework desktop six-way model-switch E2E passed. Evidence: ${resultDir}`)
-        return
-      }
       if (shouldStopAfterDesktopCheckpoint('model-routing')) {

As per coding guidelines: "Delete dead code and do not add compatibility shims or fallback paths without agreement; correct the primary path."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wework/e2e/desktop/task-flow.e2e.mjs` around lines 15410 - 15413, Remove the
unreachable MODEL_SWITCH_ONLY conditional block near the end of the E2E flow,
including its success log and return. Keep the existing focused
MODEL_SWITCH_ONLY entry point earlier in the flow unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@wework/e2e/desktop/task-flow.e2e.mjs`:
- Around line 14977-14986: Update the project selection flow around
projectSnapshot and projectMenuTestId to record existing project-menu- test IDs
before creating the model-routing project, then select the newly added test ID
from the snapshot rather than the first matching row. Preserve the existing
assertion and projectId extraction, following the established pattern used later
in the file.

---

Nitpick comments:
In `@wework/e2e/desktop/task-flow.e2e.mjs`:
- Around line 15410-15413: Remove the unreachable MODEL_SWITCH_ONLY conditional
block near the end of the E2E flow, including its success log and return. Keep
the existing focused MODEL_SWITCH_ONLY entry point earlier in the flow
unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ca4297b9-50c6-4e47-8667-13c5ea763e5a

📥 Commits

Reviewing files that changed from the base of the PR and between 237403f and 1087dff.

📒 Files selected for processing (6)
  • .github/scripts/classify-wework-desktop-e2e.sh
  • .github/scripts/test-classify-ci-changes.sh
  • docs/en/wework/developer-guide/wework-e2e-automation.md
  • docs/zh/wework/developer-guide/wework-e2e-automation.md
  • wework/e2e/desktop/checkpoints.mjs
  • wework/e2e/desktop/task-flow.e2e.mjs

Comment thread wework/e2e/desktop/task-flow.e2e.mjs Resolved
@qdaxb
qdaxb added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 16ea68c Aug 11, 2026
52 checks passed
@qdaxb
qdaxb deleted the test/speed-up-wework-e2e branch August 11, 2026 04:24
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.

1 participant