Replies: 3 comments
|
You are right on both halves, including the tempting one to get wrong: Independent confirmation
1. A passing run cannot show which checks ranThis one is about the fixture's own shape, and it is the reason this bug was able to sit here. The fixture computes a summary line — The failure path is fine — 2. The payload's other removed-native dependency has no coverage at allYou listed the residue of the
That matters because the failure mode this fixture guards is precisely "the install produced a different native layout than the source tree", and the platform-package contract is the newest and least exercised part of it. So:
3. Runtime-file-policy: removal is right, but it is not freeTo my point above — the Likewise, SummaryThe diagnosis and the minimal patch for the fixture are both correct, and the interesting parts are the boundary cases: the always-false assert, the retained |
|
Thanks — this is exactly the review the report needed. Points 1 and 2 are both fair: the fixture reports a What I re-checked on
|
|
Ran the patch through end to end on Windows 10 x64, so here is the summary line you asked about (the new
Three notes from the run, in case they are useful on your side:
|
Uh oh!
There was an error while loading. Please reload this page.
环境
master@c291e796(@deepseek-ai/dsh-desktop与根包版本均为0.1.5-rc.2)prepare:runtime→prepare:packages→prepare:dsh现象
prepare:dsh在 bundled-runtime payload smoke 处中止,生产 payload 无法产出。本机在每次全新 temp project + 全新 pnpm store 下连续三次运行,都在同一处失败:该错误由
apps/desktop/scripts/prepare-dsh.ts里 smoke 子进程的回调抛出并终止整个脚本,因此resources/dsh闭包不会生成;后续 electron-builder 打包会以ENOENT ...\resources\dsh\desktop-runtime.json失败(verifyDesktopRuntime/afterPack)。根因:
fs-ext已不是任何包的依赖,但 smoke 仍在断言它fs-ext(安装期编译的 NAN addon)已在之前的迁移中被移除:package.json声明fs-ext:git grep -n 'fs-ext' -- '*package.json'无匹配;pnpm-lock.yaml中也没有fs-ext条目(只有fs-extra);@deepseek-ai/node-addon-system/flock:packages/session/session-persistence-jsonl/src/lease.ts:34(
import { tryLockExclusive } from '@deepseek-ai/node-addon-system/flock'),即
.agents/notes/implemented/architecture/2026-09-07-prebuilt-system-primitives.md描述的「用预构建 Node-API system addon 取代安装期编译的 NAN fs-ext」;
fs-ext/seekSync的代码,就是这个 fixture 自己(
apps/desktop/tests/fixtures/runtime-payload-smoke.mjs:69)。也就是说,payload 的
pnpm install --prod --frozen-lockfile永远不会装上fs-ext,checkFsExt()在任何平台都不可能通过,而prepare-dsh.ts把它当硬失败。(同一迁移的残留还有
apps/desktop/scripts/runtime-file-policy.ts里的fs-ext/build/**排除规则与project-manager.ts的allowBuilds: fs-ext: true;它们不影响构建,但语义上已经是死代码。)
建议的最小修复
删除 fixture 中已失效的
fs-ext断言:checkFsExt()函数、它的调用、汇总 JSON 里的fsExt: true,以及因此不再使用的node:fs导入(closeSync/openSync/readSync)。其余 koffi / sharp / turndown+gfm / node-pty 断言针对的模块都在 package set 中真实存在,保持不变。
针对
c291e796的完整补丁(单文件,+2/−19):CONTRIBUTING.md说明暂不接受外部 PR、Issues 已关闭,因此把报告发在这里;若需要其他形式(例如单独的 patch 文件)我再补充。All reactions