From cbd6562506dceace7d105b1f5197367cdc39c85d Mon Sep 17 00:00:00 2001 From: gengruilin Date: Sun, 20 Sep 2026 23:45:19 +0800 Subject: [PATCH] docs(web): clarify browser dependency installation --- .../2026-07-30-web-browser-snapshot-ci-gate.i18n.yaml | 2 +- .../testing/2026-07-30-web-browser-snapshot-ci-gate.zh.md | 2 +- apps/web/tests/README.i18n.yaml | 4 ++-- apps/web/tests/README.md | 6 +++--- apps/web/tests/README.zh.md | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.agents/notes/implemented/testing/2026-07-30-web-browser-snapshot-ci-gate.i18n.yaml b/.agents/notes/implemented/testing/2026-07-30-web-browser-snapshot-ci-gate.i18n.yaml index 8ee011ccaa..aeb64a1a11 100644 --- a/.agents/notes/implemented/testing/2026-07-30-web-browser-snapshot-ci-gate.i18n.yaml +++ b/.agents/notes/implemented/testing/2026-07-30-web-browser-snapshot-ci-gate.i18n.yaml @@ -3,4 +3,4 @@ # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write .agents/notes/implemented/testing/2026-07-30-web-browser-snapshot-ci-gate.md 2026-07-30-web-browser-snapshot-ci-gate.md: 352072bca6e1a9e1d5b72973d2c3c9e96bc58ad9 -2026-07-30-web-browser-snapshot-ci-gate.zh.md: e6a440bc909fa814da4e2a19a344982cc6f330fb +2026-07-30-web-browser-snapshot-ci-gate.zh.md: cd04f33a5db6ddb3c88a235fb34ea31da0e5a869 diff --git a/.agents/notes/implemented/testing/2026-07-30-web-browser-snapshot-ci-gate.zh.md b/.agents/notes/implemented/testing/2026-07-30-web-browser-snapshot-ci-gate.zh.md index e6a440bc90..cd04f33a5d 100644 --- a/.agents/notes/implemented/testing/2026-07-30-web-browser-snapshot-ci-gate.zh.md +++ b/.agents/notes/implemented/testing/2026-07-30-web-browser-snapshot-ci-gate.zh.md @@ -18,7 +18,7 @@ Linux PR 的 `node 24 / snapshots and artifacts` 必须运行完整 Web 浏览 CI 的 `scripts/run-web-snapshots.ts` 单独运行会修改构建产物的 `hmr-live.e2e.ts`。随后由一个六 worker Vitest 池运行其余文件,包括历史 Cordis 卡片渲染。所有子进程继承 stdio,由 `run-gates` 流式转发输出。 -对 PR 而言,门禁仅在 Linux 消费方 job 中运行:这些场景面向 POSIX,其他 PR job 不安装这两种引擎。自托管的默认分支 Linux 串行热备也包含该比较,而 macOS 和 Windows 串行 job 仍不使用浏览器(不存在托管的 Linux 串行聚合)。PR 的 `all checks passed` 已依赖消费方 job,因此浏览器比较失败会阻止合并,无需新增 branch-protection check 名称。 +对 PR 而言,门禁仅在 Linux 消费方 job 中运行:这些场景面向 POSIX,其他 PR job 不会同时安装这两种引擎。自托管的默认分支 Linux 串行热备也包含该比较,而 macOS 和 Windows 串行 job 仍不使用浏览器(不存在托管的 Linux 串行聚合)。PR 的 `all checks passed` 已依赖消费方 job,因此浏览器比较失败会阻止合并,无需新增 branch-protection check 名称。 完整本地 replay 中,6-worker 浏览器命令耗时约 65–71 秒。12-worker 对比约为 50 秒,因此把浏览器 worker 预算减半只增加约 15–20 秒,而不是让墙钟时间翻倍。门禁调度器会在 `built-package-invariants` 成功后立即启动浏览器快照,并发运行彼此独立的门禁,因此既不需要专用 job 超时,也不需要手动制定 YAML 顺序规则。 diff --git a/apps/web/tests/README.i18n.yaml b/apps/web/tests/README.i18n.yaml index 3175a09f6f..dcf5ae1765 100644 --- a/apps/web/tests/README.i18n.yaml +++ b/apps/web/tests/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write apps/web/tests/README.md -README.md: bb6ffa63900388998dfa5aba0ecb466949c46b91 -README.zh.md: 60cb92f7cd505ed3f64964fc70bd01644bb50aca +README.md: d364cdec26e33a9b21076f53f2a9bee32c3459ef +README.zh.md: 2706a3b38143da3a60840261e597d7db5b85af54 diff --git a/apps/web/tests/README.md b/apps/web/tests/README.md index bb6ffa6390..d364cdec26 100644 --- a/apps/web/tests/README.md +++ b/apps/web/tests/README.md @@ -4,13 +4,13 @@ English | [中文](README.zh.md) These tests boot the real web composition in-process and drive it with real browsers over real HTTP. Chromium runs the full lane; the [model and reasoning picker scenario](declared-reasoning.e2e.ts) also runs in WebKit to cover native mouse focus behavior. The lane's mechanics — modes, fixtures, goldens, and the deliberate composition divergences from `dsh web` — are documented in [`scaffold.ts`](scaffold.ts) and the [browser e2e Agent Note](../../../.agents/notes/implemented/testing/2026-07-24-web-gui-browser-e2e-lane.md). -After installing workspace dependencies, install the browser binaries from the repository root: +After installing workspace dependencies, install the browsers and their system dependencies from the repository root: ```sh -pnpm --filter @deepseek-ai/dsh-web-frontend exec playwright install chromium webkit +pnpm --filter @deepseek-ai/dsh-web-frontend exec playwright install --with-deps chromium webkit ``` -Linux also needs Playwright's system packages for both engines. The persistent CI VM must provide them through image maintenance, as required by the [failover runbook](../../../.agents/notes/implemented/process/2026-07-26-ci-failover-runbook.md). +On Linux, `--with-deps` installs dependencies through the system package manager. The persistent CI VM must provide these dependencies through image maintenance; CI installs only the browser binaries, as required by the [failover runbook](../../../.agents/notes/implemented/process/2026-07-26-ci-failover-runbook.md). Ordinary scenarios begin with no registered Workspace or Session and a durable marker recording a removed default Workspace, so explicit folder-selection scenarios retain control of their cwd. `launchWebScaffold({ firstUse: true })` leaves initialization eligible for startup scenarios. diff --git a/apps/web/tests/README.zh.md b/apps/web/tests/README.zh.md index 60cb92f7cd..2706a3b381 100644 --- a/apps/web/tests/README.zh.md +++ b/apps/web/tests/README.zh.md @@ -4,13 +4,13 @@ 这些测试在进程内启动真实的 web 组合,并用真实浏览器通过真实 HTTP 驱动它。Chromium 运行整个 lane;[模型与推理强度选择场景](declared-reasoning.e2e.ts) 还在 WebKit 中运行,以覆盖原生鼠标焦点行为。该 lane 的运行机制——模式、fixture(测试前置数据)、golden,以及与 `dsh web` 之间刻意保留的组合差异——记录在 [`scaffold.ts`](scaffold.ts) 和 [浏览器 e2e Agent Note](../../../.agents/notes/implemented/testing/2026-07-24-web-gui-browser-e2e-lane.zh.md) 中。 -安装工作区依赖后,在仓库根目录安装浏览器程序: +安装工作区依赖后,在仓库根目录安装浏览器及其系统依赖: ```sh -pnpm --filter @deepseek-ai/dsh-web-frontend exec playwright install chromium webkit +pnpm --filter @deepseek-ai/dsh-web-frontend exec playwright install --with-deps chromium webkit ``` -Linux 还需要这两种引擎的 Playwright 系统软件包。持久化 CI VM 必须通过镜像维护提供这些依赖,遵循[故障切换手册](../../../.agents/notes/implemented/process/2026-07-26-ci-failover-runbook.zh.md)的要求。 +在 Linux 上,`--with-deps` 会通过系统包管理器安装依赖。持久化 CI VM 必须通过镜像维护提供这些依赖,CI 只安装浏览器程序,遵循[故障切换手册](../../../.agents/notes/implemented/process/2026-07-26-ci-failover-runbook.zh.md)的要求。 普通场景以没有已登记 Workspace 或 Session、但持久化标记记录默认 Workspace 已被删除的状态启动,使显式文件夹选择场景自行决定 cwd。`launchWebScaffold({ firstUse: true })` 保留初始化资格,供启动场景使用。