fix(startup): make recovery independent of profile links - #533
Merged
Merged
Conversation
* fix(ppt): avoid duplicate profile and desktop composition * fix(startup): establish market baseline and isolate recovery boot * fix(recovery): resolve agent presets from host installation * fix(startup): resolve linked plugin host peers
…ilure Field crash reports show the host peer fallback missing its main case: a plugin resolving an older copy of a @deepseek-ai package from the shared Profile tree fails with ERR_PACKAGE_PATH_NOT_EXPORTED, not not-found. The retry is safe because it only succeeds when the installation really exports that subpath. Reports also lose `code` to the loader's wrapper, so the first failure's "imported from <plugin>" is all that still names the faulty plugin; the host retry now augments that error instead of replacing it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two startup faults sent users to Safe Mode with no way out of it. A bundle declared in the manifest but no longer installed fails the boot preflight, and Safe Mode cannot clear it: disabling a plugin writes a patch row, while the fault lives in dsh.profile.bundles. Startup now drops those third-party declarations once and re-checks before giving up, and carries the failing package name through so Safe Mode lists it. Core bundles, host packages, package files, user patch rows and plugin data are never touched; pnpm-lock.yaml is dropped so the next install re-resolves. This is a narrow, declaration-only exception to "startup leaves destructive repair to recovery", recorded in the module docstring and the architecture notes. A market baseline that cannot be installed no longer blocks the boot on its own. pnpm fetch failures, 404s and EPERM are ordinary on restricted networks and account for roughly 130 field reports; startup only enters Safe Mode when the market already in the profile is absent, unreadable or still owned by a generation. The pending marker keeps the repair queued for the next launch, and an unreadable marker no longer throws the boot away either. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The client-modules patch dereferenced ctx.loader without the optional chain its paired agent-presets patch uses. host-module-fallback.mjs is a top-level import of the Harness entry, so leaving it out of extraResources would stop the entry loading rather than degrade the fallback; assert it is packaged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
把 #504 的启动恢复链路直接带到 main。V0.9.2 已废弃,
06f042649c把整条线从 main 撤掉后,这批修复需要单独落地。内容是 #504 本体(合入 V0.9.2 时的 squash
8a5a364754)加上之后针对它的 3 个修复,这 3 个是对同一套代码的修正,单独拿前者意义不大。主要内容
启动恢复
.desktop-market-install-pending.json直到 pnpm 成功且活动包被校验,半成品安装即使版本号看着是新的也会强制重试。宿主依赖解析
@deepseek-ai/*时从当前安装目录重试,不把普通第三方依赖泄漏给插件。ERR_MODULE_NOT_FOUND外也重试ERR_PACKAGE_PATH_NOT_EXPORTED。现网数据里这是主要形态:插件从陈旧的profiles/node_modules解析到旧版宿主包、缺子路径(例如dsh-subprocess-local导入dsh-subprocess/control)。重试只在安装目录确实导出该子路径时才成功。code会被 loader 的包装层吃掉,imported from <插件路径>往往是唯一还能指认肇事插件的信息。安全模式
profiles/node_modules。PPT
dsh-ppt和dsh-ppt-composer——Desktop patch 已经加载 composer,由它挂载 core。避免重复的预览路由和 skill provider。依赖、已安装包、用户 patch 文件和既有kimi-ppt项目都保留。冲突处理
摘到 main 时只有一个冲突,
src/main/index.ts:本 PR 的 repairable 安全模式日志与 main 的migratePersonaPrefixesBeforeStart相邻且互不排斥,两者都保留。验证
npm ci后 28 个补丁全部干净应用、0 失败npm run typecheck通过npm test:129 个测试文件 / 1143 项全部通过尚未执行 Windows 安装包上的 junction、普通用户首次启动和安全模式端到端验收。新增的自动修剪路径建议在真实 Profile 上过一遍。
🤖 Generated with Claude Code