test(web-shell): fix daemon SDK mock path - #10545
Conversation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
⏳ Approval still deferred — 1 PR CI workflow run(s) still in progress for ⏳ 审批仍在延迟中 —— |
|
Thanks for the quick cleanup! Template looks good ✓
Moving on to code review. 🔍 中文说明感谢快速清理! 模板完整 ✓
进入代码审查 🔍 — Qwen Code · qwen3.8-max Reviewed at |
Code reviewIndependent take before judging the diff: the mock must target the specifier the module under test actually imports, and Verified the landing spot too: Test evidence — the PR's own CI, fetched via the API (no PR code run locally)The check that settles this PR is CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 中文说明代码审查独立判断:mock 必须指向被测模块实际 import 的路径,而 落点也已核实: 测试证据——PR 自身 CI(通过 API 获取,未在本地运行 PR 代码)决定本 PR 的检查是 — Qwen Code · qwen3.8-max Reviewed at |
|
Confidence: 5/5 — root cause verified end to end, and the one-line change is exactly the right one. Stepping back: this is the cutover's cleanup arriving a few hours late. The boot test merged with the then-valid The one thing not yet observed is the green Ubuntu unit job on the reviewed commit — CI is still in flight there. Approval is deferred until CI lands green on 中文说明整体回顾:这是切换合并后迟来几小时的收尾。启动测试合入时 mock 的 唯一尚未观测到的是被审提交上变绿的 Ubuntu 单测 job——该 CI 仍在运行。审批将推迟到 — Qwen Code · qwen3.8-max Reviewed at |
🖼️ web-shell visual previewRendered against a mock daemon (no real backend): the PR base vs this PR head Screenshots · before / after✅ No screenshot changes against the PR base. Full-resolution recordings (.webm) are attached to the workflow run. — Qwen Code · web-shell visuals |
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Not reviewed: reverse audit — stopped before round 1 by the review time budget.
Test Plan (not a blocker): client/main-boot.test.tsx — no such file or directory; 2 tests passed — this review observed 5170, 481 passed.
中文说明
未审查:反向审计——评审时间预算不足,未能开始第 1 轮。
Test Plan(非阻断):client/main-boot.test.tsx — no such file or directory; 2 tests passed — this review observed 5170, 481 passed。
— qwen3.8-max via Qwen Code /review (v0.22.3)
qwen-code-dev-bot
left a comment
There was a problem hiding this comment.
Reviewed the current head and the focused test mock-path change. The update matches the package layout and addresses the stale module specifier without unrelated changes. Approving.
chiga0
left a comment
There was a problem hiding this comment.
No blocking findings. Scan tier — single-line test mock path fix.
Change: vi.mock path corrected from @qwen-code/webui/daemon-react-sdk to @qwen-code/web-shell/daemon-react-sdk.
Verified:
@qwen-code/web-shell/package.jsonexports"./daemon-react-sdk": {"types": "...", "import": "..."}— target exists. ✓@qwen-code/webui/package.jsonhas nodaemon-react-sdkexport — old path was a no-op mock. ✓Test (ubuntu-latest, Node 22.x): pass (21m20s) ✓Integration Tests (no-AK): pass (17m32s) ✓
web-shell E2E Smoke failure: pre-existing infra flakiness — same failure visible on unrelated PRs and on the same runner pool across multiple days; not caused by this 1-line test change. CI-bot downgraded to COMMENT citing this failure, but the core test suite (ubuntu, 21 min) passes cleanly.
Heads-up (not a blocker): PR #10541 (open) contains this exact same main-boot.test.tsx change bundled with a runner matrix addition. Whichever merges second will need a rebase to drop the duplicate hunk.
Reviewed with AI assistance.
What this PR does
Updates the Web Shell boot regression test to mock the daemon React SDK from its current package entrypoint.
Why it's needed
The daemon React SDK moved out of the legacy Web UI package, but this test kept the old mock target. Vitest now rejects that removed package subpath before the two boot tests can run, which breaks the Ubuntu CI job on
main.Reviewer Test Plan
How to verify
Run the focused Web Shell boot regression test and confirm both boot scenarios pass without the
Missing "./daemon-react-sdk" specifiererror.Evidence (Before & After)
Before: the Web Shell suite reports one unhandled module-resolution error and skips the two boot tests.
After: the focused boot regression test passes both tests.
Tested on
Environment (optional)
npx vitest run client/main-boot.test.tsx --config vitest.config.ts— 1 test file passed, 2 tests passed. Repository lint also passed.Risk & Scope
Linked Issues
N/A
中文说明
这个 PR 做了什么
将 Web Shell 启动回归测试中的 daemon React SDK mock 更新为当前实际使用的 package entrypoint。
为什么需要
daemon React SDK 已从旧的 Web UI package 迁出,但该测试仍保留旧的 mock 目标。Vitest 会在两个启动测试执行前拒绝这个已移除的 package 子路径,导致
main上的 Ubuntu CI 失败。Reviewer Test Plan
如何验证
运行 Web Shell 启动回归定向测试,确认两个启动场景都通过,且不再出现
Missing "./daemon-react-sdk" specifier错误。证据(修改前后)
修改前:Web Shell 测试报告一个未处理的模块解析错误,两个启动测试未执行。
修改后:启动回归定向测试的两个测试均通过。
测试平台
环境(可选)
npx vitest run client/main-boot.test.tsx --config vitest.config.ts— 1 个测试文件通过,2 个测试通过。仓库 lint 也已通过。风险与范围
关联 Issue
无