Repository navigation
feat(plugins): prepare and reuse managed runtimes before installation - #2160
Merged
Merged
Conversation
…-plugin-runtimes-host
…t#96) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
marked this pull request as ready for review
November 18, 2026 11:14
This was referenced Nov 18, 2026
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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
插件升级不应重复下载未变化的大型运行环境,也不应在安装成功之后才发现依赖缺失。用户选择方案 B:先检查符合要求的已有环境,只准备缺失部分;依赖准备失败时保留已安装的可用插件。
本 PR 接入配套 Core 的通用 managedRuntimes 契约。具体工具版本、下载来源和兼容性检查仍由插件声明和实现,宿主不保存某种语言的特殊规则。
改动 / Changes
shared/i18n/features/plugin-managed-runtimes.json,由原生成器合并并执行原有严格校验。基础注册表和两份大语言源与 main 完全一致,不重格式化、不复用语义不同的提示,也不增加运行时字典加载。7f1fc4b(与已测的c08330d代码树一致)。运行环境发现与最终可执行文件选择接入现有 Core 工具路径分类,防止全局准备模式忽略已打开项目的根路径。不在本 PR 范围内 / Out of scope
具体插件的归档版本及资格规则由配套插件 PR 负责。本 PR 不实现所有后端的通用包管理器安装 UI,不宣称完成 #2057 的全部需求或 #1918 的所有插件事务场景。旧完整依赖世代目前随插件状态清理,没有新增自动垃圾回收。本次只提交代码与 PR,不发布版本或更新 Store。
类型专属:feat
多平台对齐
范围检查 / Scope checks
功能矩阵 / Feature matrix
plugin-managed-runtimes:两端 implementationStatus 为 implemented,verificationStatus 保持 pending,列出源码、测试和实机验证动作。.artifacts/产物。插件归属 / Plugin ownership
UI 验证 / UI evidence
统一日志系统 / Structured logging
app.storage.maintenance_failed和LogErrorFields;安装与启动终态沿用已有事件。scripts/logging/门禁已被上游移除,未将其记作通过;限制列在下方。界面文案 / i18n
逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
N/A:没有新增或迁移设置页、配置键、影子配置或默认值;准备流程读取既有有效设置快照。
插件契约 / Plugin contract
PINNED_CORE_REVISION=7f1fc4becd0b4b415aa463abd0ea5e2810b3e964;desktop-go.sh 使用这份契约。plugins.managedRuntimes.plan(Core 内部命令)plugins.managedRuntimes.decodeResolution(Core 内部命令)发行包与资源 / Bundle and resources
无用代码与重构 / Dead code and refactoring
自主 Review / Independent review
分别复核 Core 契约、原生下载解压与缓存、Java 资格检查以及宿主异步生命周期。发现并修复了准备会话函数转发、有效设置遗漏、规范路径比较、取消晚到回调、卸载与提交竞态、进程已销毁但退出报错时永久阻塞、受管候选优先级,以及合入主线后全局准备的项目路径信任边界。词条小文件方案另经独立 review,严格校验与来源唯一性保留。
最终交叉 review 未发现需要阻塞提交的问题。对共享根登记、规范 executable/home、只读工具解析与旧插件路径均作独立复核;关闭后迟到激活/LSP 的四项负例已在修复前复现,修复改为 UI 持有 ContextRef,后台只消费该身份,已关闭或同路径重开的旧任务不能重新登记根。审查范围为
main ece86bd → 2670237045a9491d89979a6d9df3447d42632cce,提交树已与本地已测内容逐字核对一致。验证 / Verification
原生四包测试在主线合并和最后 trust 补丁之前完成;UI/截图在最新 main 合并与词条生成之后完成,最终 trust 补丁不涉及视觉。最终完整两包与 workbench 聚焦回归补齐其后全部代码改动。测试按 write-stable-tests 记录单项时长和进程树退出,未上调预算或删除失败用例。
未能执行的检查和原因:
界面截图 / Screenshots
下载进度(深色 / 中文)
失败与重试(浅色 / 英文)
修复缓存(浅色 / 中文)
启动准备与取消(浅色 / 英文)
提交前确认 / Final checks
main ece86bd创建,目标 main;保留该主线全部改动。.artifacts/、构建包、凭据、个人路径或未脱敏日志。合入前本机复验 / Pre-merge local verification(2026-11-18)
7f1fc4b,树与c08330d相同);本 PR 固定版本改到合入提交,validate-pins.mjs通过。TestDeclaredServesTheBaselineOfEveryWiredCapability补上managedRuntimes;TestPluginSettingsRestartWaitsForTeardownAndHonorsRevocation给后接入的 Service 登记工作区身份。TestDebugAnnouncedAdapterBreakpointPauseContinueStop,单独重跑 5 次都通过,属于已跟踪的偶发问题 [Bug] macOS 整包测试偶发无法观察到 tcpAnnounced 适配器的 disconnect #1981,本 PR 没有改动调试代码。TestClosingAnIntegratedShellRightAfterACommandHangsUpItsJobs失败也出现在其他分支,属于已跟踪的偶发问题 [Bug] Linux 上关闭集成 bash 终端后,后台任务偶尔没有收到挂断而残留 #2054,本 PR 没有改动 localshell。