Skip to content

test(wework): harden cloud terminal e2e workspace roots - #2492

Merged
qdaxb merged 1 commit into
mainfrom
agent/harden-cloud-terminal-e2e
Aug 7, 2026
Merged

qdaxb merged 1 commit into
mainfrom
agent/harden-cloud-terminal-e2e

Conversation

@qdaxb

@qdaxb qdaxb commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

问题

Wework 云端桌面 E2E 偶发在首次打开项目终端时失败。远端 executor 返回 Project path is outside allowed workspace roots,导致终端卡片进入“启动失败”状态,测试最终以等待终端窗口超时结束。

根因

测试创建的云端项目 workspace 位于临时结果目录中,但远端 executor 只通过 LOCAL_WORKSPACE_ROOT 间接获得较宽泛的目录边界,没有使用 executor 为额外工作区提供的显式 allow-list 配置。环境状态异常时,session 路径校验可能无法确认该 workspace。

同时,通用快照超时诊断没有保留 workspace 面板相关的 test ID,失败日志只显示 composer 控件,掩盖了实际的终端启动失败状态。

修改

  • 启动测试用远端 executor 时,通过 WEGENT_WORKSPACE_ROOTS 显式声明本次云端 workspace。
  • 快照超时诊断保留 workspace-* 和 bottom-workspace-* test ID,便于直接识别终端、launcher 和底部面板状态。

影响

云端桌面 E2E 的终端路径边界配置变得确定,不再依赖隐式目录覆盖;若终端流程再次失败,CI 日志也会包含直接相关的 UI 状态。

验证

  • node --check wework/e2e/desktop/task-flow.e2e.mjs
  • pnpm --filter wework exec prettier --check e2e/desktop/task-flow.e2e.mjs
  • pnpm --filter wework exec eslint e2e/desktop/task-flow.e2e.mjs
  • pnpm --filter wework e2e:desktop:cloud
    • 18 个模型协议组合全部通过
    • 云端项目创建、首次终端启动、历史终端恢复及任务流程通过
  • pre-push Wework ESLint、TypeScript 和全量单测通过

Summary by CodeRabbit

  • Bug Fixes
    • Desktop end-to-end diagnostics now retain workspace-related test identifiers in snapshots.
    • Cloud execution now consistently uses the configured workspace path.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 42234a0c-5605-478a-bea3-0b99d724b092

📥 Commits

Reviewing files that changed from the base of the PR and between 1edb23c and b72b463.

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

📝 Walkthrough

Walkthrough

The desktop E2E flow now retains workspace-related test IDs in snapshot diagnostics and sets WEGENT_WORKSPACE_ROOTS for the cloud executor.

Changes

Workspace E2E flow

Layer / File(s) Summary
Workspace diagnostics and executor configuration
wework/e2e/desktop/task-flow.e2e.mjs
Snapshot diagnostics include workspace- and bottom-workspace- test IDs. The cloud executor environment sets WEGENT_WORKSPACE_ROOTS to the configured workspace path.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: earthalone2026, sdadunderscoresdad

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes hardening the Wework cloud terminal E2E workspace root handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/harden-cloud-terminal-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 7, 2026 10:17
@qdaxb
qdaxb enabled auto-merge August 7, 2026 10:17
@qdaxb
qdaxb added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit ff4d80f Aug 7, 2026
72 of 74 checks passed
@qdaxb
qdaxb deleted the agent/harden-cloud-terminal-e2e branch August 7, 2026 10:49
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