Skip to content

feat(windows): 完善插件工作流、Provider 生命周期与 Java 分发 - #1478

Draft
Mucheen wants to merge 90 commits into
previewfrom
codex/windows-plugin-parity-unified
Draft

Mucheen wants to merge 90 commits into
previewfrom
codex/windows-plugin-parity-unified

Conversation

@Mucheen

@Mucheen Mucheen commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

插件网页窗口:聚焦、设置页恢复与生命周期

真实 WebView2 验收发现:再次点击设置页 Open 后,原页面的文档版本被覆盖,后续 ui.getState/ui.setState 被拒绝。现在聚焦保留存活浮动页的版本和待处理请求;已撤销、正在销毁或工作区路径/版本变化的旧窗口不能借此恢复权限,新文档创建仍撤销旧请求。

关闭设置页、切换分类或原生窗口独立关闭后,设置页始终保留打开/聚焦与关闭动作。每行只允许一个在途操作,同步拒绝重复点击,失败就地显示且可重试,已卸载设置页的迟到结果不影响重开的页面。

  • 3 项确定性原生回归覆盖文档权限和待确认文件请求;完整 Windows 宿主 836 passed / 5 skipped,新增测试 75~76 ms。
  • 正式 Release 重建并核对完整 5292 项源码字节清单、EXE 和配置哈希;真实 ui1 文本 9 步通过。ui2 验证重复 Open 后继续读写、双宿主状态隔离、同时停用、启用后空状态、公共 Close Folder 只回收所属页面、同目录新宿主独立状态、卸载及全部资源/进程清理。准备和清理步骤不当作独立功能计数。
  • R45 已补本机中文 IME 的真实 ni 候选/空格落字、Escape 取消、组合 Enter 不提前保存与第二次 Enter 保存,以及原生 Unicode/焦点/374×400 窄窗口;只覆盖本机当前输入法和受控 ui2 页面。
  • 设置页新增 5 项确定性回归,扩大定向 33/33、完整前端 4154/4154、TypeScript 通过;真实浅/深/浅主题同步、720×480 设置页、360×420 插件窗口、设置重开直接关闭和原生关闭后重开已验证。同步原 Agent Note 与网页窗口能力记录,整体仍 partial/pending。
  • macOS/ARM64、物理键盘/其他输入法、正式签名安装升级、完整签名 SDK/Functions、真实可信 HTTPS 市场仍待验收。ui3/buildProviders/buildSystems/backend2/ui4/packageTrust/releaseEnabled 保持关闭,PR 保持 Draft。

Windows 的契约插件现在接入原生安装、市场、设置、工具窗口、Provider 和项目生成工作流。语言与构建事实继续由共享 Core、既有 Java owner 和 JDT/上游工具提供,Windows 宿主负责权限确认、作用域隔离、有界执行和资源清理。

PR 保持 Draft。ui3、buildProviders/buildSystems、backend2/ui4、正式 Java packageTrust 和 releaseEnabled 等尚未准入的生产能力继续关闭;受控签名与隔离镜像只用于验收,不授予正式发布者信任。

功能与行为

  • 安装与市场:验证 Ed25519 发布者签名、完整包摘要和审批字节;支持多仓库来源、来源固定更新、完整权限/程序审查、事务替换、回滚、卸载与清理重试。HTTPS 下载保留重定向、体积和期限约束。磁盘导入审批按原生私有快照的实际验签结论显示签名状态,中英文均覆盖,包自报字段不能赋予信任。
  • 完整运行时包:磁盘与市场归档统一限制压缩 512 MiB、展开 2 GiB、50000 条目和单文件 512 MiB;清单 4 MiB、签名文档 16 MiB 保留独立有界读取。摘要使用流式缓冲并检测文件长度变化,ZIP 在摘要和解压前检查预算;项目生成器下载仍单独限制 128 MiB。
  • 构建、运行与测试:连接 Core catalog/model/plan/decoder、工具候选、审批、诊断跳转、依赖与语言导入;执行前先保存和同步,固定精确项目/目标/case 与运行时配置。只校验实际消费的运行时依赖,无关失效 JDK 不再阻断其他构建,实际使用的显式配置失效仍拒绝回退。成功且仍属于当前代次的模型应用后通知已打开编辑器重试语言导入,拒绝审批、失败和迟到结果不通知。文档 hook 订阅模型修订,重试失败或挂起的 Java 导入,已挂载会话保留。
  • 设置与重载:支持全局/项目来源、草稿、保存/取消、继承重置、字节 CAS、原子替换与读回。全局变更经跨窗口屏障,项目变更固定窗口/工作区/设置修订/包身份;迟到审批失效,清理失败保留精确 owner 和 Retry。保存成功但生效失败时只重试副作用。不可变启动输入变化要求 restart,Later 仅允许已清理完成的状态。
  • 函数与原生界面:设置 action、网页函数和原生面板经正式 Core Provider/typed port 执行,审批、进度、取消、结果和 Retry 固定精确 owner。原生 schema 1 树/列表/表单复用公共控件和虚拟化,values 由 Core 校验,状态按包/窗口/工作区隔离并限制 64 KiB;非 invalidData 错误保留字段快照。
  • 工具窗口和公共控件:ui1 文本、ui2 网页连接 left/bottom/right 停靠槽位,复用稳定原生父子窗口、私有来源、CSP 与桥接。几何每帧合并,遮挡/零尺寸不保留可交互窗口;迟到挂载、替换、隐藏和关闭按精确句柄清理。工具栏图标、InfoTip、清空按钮、菜单、焦点、滚动定位与换行行为复用公共实现,保留草稿和 DOM。
  • 项目生成器:Core 驱动 files/command/archive、JDK、Git 初始化和打开项目;使用私有同级 staging、下载/路径/链接/解压预算与原子不覆盖发布。欢迎页复用原向导,审批显示完整计划和运行时,迟到结果不覆盖新选择器;打开失败可重开已生成项目。原生选择器有界点击并校验结果,JDK 使用可见完整路径断言。
  • Java 与构建候选包:Windows JavaSupport 包含 plain/Maven/Gradle 模板和全部六项 requires;固定 JDT/JDK 来源、SHA、许可、PE 架构及完整库存。MavenSupport 复用既有 hostIntegration,GradleSupport 使用上游 evaluated project/task/source-set/dependency API;模型查询关闭 configuration cache/configure-on-demand,正常构建保留项目设置。相对运行时路径按工作区解析,持久化原值保持不变。
  • 信任、资源与发布恢复:存在的签名始终验证,官方 publisherPackage 与 bundled seal 保持严格边界;同 ID installed 遮蔽 bundled,停用/隔离不回退。JDT 状态经平台 plugin-state 写入,发行目录只读。组装器独立重建并核对签名前后库存,仅允许新增签名文档。官方发布恢复固定完整 target SHA、tag 和资产名称/SHA 集合,拒绝公开版本覆盖,网络/认证失败不当作不存在。
  • VCS Provider:保留 Git 独立流程,插件根、包、窗口/工作区、收据与监听隔离;写入前复验状态、端点、Core ownerOf 和授权,拒绝嵌套根及路径别名。取消或未知回复不自动重发,Retry 只清理原 owner;move 未增加生产入口。
  • 启动恢复:恢复操作在成功、返回 false 或抛错时均释放自己设置的切换标记,避免工作区已就绪时提前返回导致项目标签一直禁用;清理固定原 store,不影响后来激活的工作区。
  • 索引和 LSP 生命周期:编辑器响应 membership/indexing revision,插件扫描完成使语言 owner 缓存及在途查询失效,恢复文档重新发现归属。插件停用与迟到初始化失败共享精确会话的清理结果,避免已销毁会话再次停止后被登记回内存;真正清理失败保留 owner 可重试。取消启动、旧 attachment 关闭与替包不借用新会话。
  • Windows 进程和验收:子进程先挂起、加入 Job 再恢复,线程查询改用当前子进程的系统快照,去掉每条 Git/工具链探测的全机扫描。验收失败先关闭应用再停止 Playwright 事件循环,保留原始失败及清理错误。SkipBuild 绑定源码、配置、架构、EXE、原 ZIP 和资源字节,拒绝跨树共享可变 target/profile,退出后比较发行资源清单与哈希。
  • 测试与 CI:固定 Bun 1.3.14,官方 lock URL 保留版本、依赖图与 SRI,复用上游 tree-sitter 安装器和原生 JDTLS 解压。完整前端通过单次 Bun --isolate 联合执行;修正 Java 无 JDT/JDT 两条测试契约、Monaco 冷加载计时与确定性生命周期夹具。Windows Git 集成仅对实测案例与特定夹具请求设置局部预算,生产期限、断言和套件总预算不变。资源复用清单、CI 路由、Notes、契约与跨平台矩阵同步维护。

Java 产品驱动覆盖生成、JDT ready、编辑保存同步、精确 Core prepareLaunch、真实输出、Stop、编译错误拒绝与恢复;Maven/Gradle 使用各自完整构建插件输入。完整运行时包的目录与 prepare 等待精确可见启用动作,保留案例和工作总期限;JDK 选择复用可见完整路径校验,运行配置及工作区收据只接受当前 version 2 的 toolchain.java.homePath。驱动在 JDT 导入前审批 Maven/Gradle 模型,在保存同步后执行任务;切换工作区后重建审批代次。路径比较兼容 Win32 扩展驱动器/UNC,JDT 归属解析存在资源后核对精确包目录,兼容 MSIX 重定向并拒绝相邻包。plain 默认值须有同包同表单的成功 Core 求值证据;输入使用真实键盘单行 Java 源码,避免多行自动缩进改变夹具;保存前等待当前会话和精确文件同步,保存读冲突或临时替换间隙在原期限内等精确原始字节。切换标签使用其公开 title 解析实际目录并等待选中且可操作。观察器校验 operation/workspace/plugin/generation 和唯一有序终态;failedToStart、取消、错身份、缺失报告或重复终态均不能计为成功。是否通过以各变体的实际产品报告为准。

Plain Java 的 JDT 隐式项目位于可写缓存,当前 Java Debug 的路径限定搜索会提前排除它;入口与 prepareLaunch 现在复用当前 JDT 会话的完整查询,再由既有 Core normalizer 筛选工作区及解析后的目录,拒绝相邻或外部源码,入口语义仍由 JDT 判定。新增真实 plain 文件夹与跨工作区归属回归,保留链接路径验证。驱动遇同会话同文件较新的 close(包括未完成请求)时撤销旧同步证据,重新同步后才保存。

文档生命周期与验收行为

  • 恢复保存:保存先等待当前挂载的初始化和打开完成,再同步当前文本并报告磁盘快照。显式请求立即启动已排队的初始化,无需等待绘制;同一编辑器的稳定缓冲区身份独立于原生 attachment,允许恢复新挂载,拒绝不同编辑器或工作区接管旧通知。同步入口被替换,以及同一入口内部初始化被模型/索引刷新替换时,都继续排空当前入口;连续三次替换明确失败。打开失败保留错误。
  • 保存与关闭:同一 attachment 的保存串行,关闭先等待在途保存成功或失败,重复关闭共享清理,失败仍释放屏障。先就绪再登记保存屏障,登记后不再等待新初始化,避免关闭、保存与初始化循环等待;替换挂载继续拒绝旧通知。
  • 按包撤销语言会话:停用、升级按 pluginId 清理所属就绪会话和在途启动,保留独立撤销代次;不假设 providerId 与包 ID 相同,同 provider 的其他插件保留,迟到启动清理完成后才确认。
  • Java 驱动就绪与清理:公开显示名 Main 与全限定主类分开,仍校验精确源码和 prepareLaunch。Run 面板识别期间等待精确配置的 Run 动作可见且启用,最多六十秒;完整包构建目录验包查询也只允许单次六十秒,其他 IPC 保持十秒。超时或点击结果未知均保留失败,不重发,原案例和套件预算不变。Maven 错误编译分支先审批公开 clean 再执行原 compile,要求真实非零终态和精确错误符号;清理失败停止,独立保存收据,Gradle 保留原任务。按公开 Stop run 名称停止,首次清理在 Playwright 仍有效时完成并保留原始错误,后代退出轮询通过同步桥让出事件循环以排空 CDP 断开事件,仍保留十秒期限与强制清理失败收据;JDK 字段最多等待三十秒的原生探测回显,仍只选择一次。

当前源码验证

  • 单次 Bun 1.3.14 --isolate 完整前端联合测试 4149/4149 通过;最终 TypeScript 检查通过。
  • 保存与插件生命周期定向 86/86 通过:复现文档打开期间保存提前返回、控制替换/失败分支,按包清理不同 provider ID 的就绪与在途会话,并保留同 provider 的其他包;同一编辑器以稳定缓冲区身份等待恢复后的新挂载,拒绝不同编辑器接管;构建目录完整验包查询单次等待最多六十秒,其他 IPC 保持十秒,超时不重发;同挂载关闭等待在途保存成功或失败,并发关闭共享清理;挂载创建前先排空恢复入口、显式请求启动待绘制初始化,入口和同回调内部的初始化替换都继续排空,连续三次明确失败;运行面板识别中等待精确 Run 动作就绪后只点击一次;生成器辅助 27/27 通过,包含慢探测、错误路径、隐藏字段和一次原生选择。
  • Java 入口与启动 Core 定向 29/29 通过,包含真实打包 JDT 对 plain 文件夹的 Main 发现与安装目录不变性;外部工作区源码继续拒绝。
  • 模型重试与启动恢复新增定向 9/9 通过;LSP/生命周期原定向 57/57 通过,包含先复现再修复的迟到初始化/双重清理回归。
  • Java 驱动最终辅助回归 68/68 通过,覆盖动作缺失→禁用→可操作、超时不点击/重试、version 2 运行配置、Windows 扩展路径与实际插件资源归属、Core 默认表单,以及模型审批与任务执行分离、文档挂载后保存、原始字节校验和工作区标签就绪。
  • Windows Rust:Project 48 passed / 1 skipped、Terminal 37 passed、Host 833 passed / 5 skipped;GitHost 10 passed,验收驱动辅助测试 61 passed / 1 skipped。
  • Windows Core 全量在 5870282d9 通过 1557/1557,此前失败或超时的 18 项全部通过。逐项期限采用提交中的 Windows 预算,原失败报告保留。
  • Rust Core 注释、限定改动文件 rustfmt、Windows 边界、共享契约、发行资源只读、i18n 与生成一致性、测试稳定性及计时入口回归、Windows workflow YAML 解析通过;196 条 Agent Notes 与 233 项能力矩阵验证通过。

Maven 冷下载首次超时和增量编译跳过错误源码的原始失败均保留;编译器依赖通过 Maven 严格校验下载并离线复查,错误分支明确审批公开 clean 后执行原 compile,继续要求真实非零终态、精确错误符号、Run 拒绝和恢复。当前结果来自更新驱动后重新冻结并构建的正式镜像;案例与工作流期限未扩大。下表保留各轮实际证据:生产与受控基础验收、Java 三变体来自最终源码库存绑定的 x64 隔离 Release;文本、WebView2 网页桥接回退及设置子集在 5870282d9 的隔离 x64 Release 复验。项目生成器用 aa36f8416 的验收源码复验。原生 Provider 子集沿用较早镜像的独立证据。受控镜像临时固定验收公钥与必要能力,使用正常验签和审批,不等于正式发布准入。

产品验证 执行状态 逐项统计
生产配置产品验收 passed skipped 17, passed 22
受控配置产品验收 passed skipped 17, passed 22
文本工具窗口 passed(process passed) passed 9, skipped 1
WebView2 网页桥接回退 passed passed 9, skipped 1
设置与函数 partial(设置子集通过,完整 Functions 缺签名包和能力准入) passed 11, skipped 25
项目生成器 passed passed 18(含 1 项套件监督), skipped 1
Java plain passed(process passed) passed 14, skipped 4
Java maven passed(process passed) passed 19, skipped 4
Java gradle passed(process passed) passed 19, skipped 4
原生 Provider 工作流 passed(process passed) passed 14, skipped 5

生成器回归通过项目设置核对工作区切回后选中的 JDK 路径和有效版本。首轮旧驱动传入空路径,误把系统自动 JDK 17 当成项目选中的 JDK 21,保留了原始结果和同镜像对照。新增回归拒绝自动结果,即使它碰巧使用同一路径。

产品收尾:隔离 profile 清除=True。每项进程清理与资源哈希检查以独立报告为准,跳过项不计为通过。

临时受控源码已恢复:True。

剩余验收与环境限制

  • 完整 SDK/Functions 外部包仍缺可验收的完整签名 Windows 归档;冻结的上游样例未提供设置动作与网页两个入口。受控 Native 函数子集与设置子集不代表完整 M10 通过。
  • 正式发布者签名、生产 packageTrust/能力准入、签名安装器升级、Windows ARM64 实机、macOS、完整键盘/IME/主题/窄布局支线仍 pending。
  • 市场 HTTPS 真实交易缺少可达主机和已受信任证书,下载、更新与取消支线仍跳过;来源管理与磁盘安装通过不能代替这些证据。
  • macOS service-boundary 检查依赖 PlistBuddy,本机无法完成;Linux Bash/jq/process-group workflow gate 在 native Windows 的未改动 CRLF 输入下未启动测试,需在 Linux 验证,不能计为通过。
  • Gradle 9.2.0 和 Maven 3.9.14 使用本机已安装分发与隔离运行缓存,核对版本和完整文件库存;未声称重新下载并校验 Gradle 上游归档。
  • 本机逐项 HTML/JUnit、失败截图、进程清理及资源清单证据保存在 .artifacts/r42-fixes/,不入库。主工作树原有三个矩阵文件与 .zcode/ 修改未纳入此 PR。

PR 继续保持 Draft,不 ready、merge 或 release;本轮不派发新任务。

@ghfind-review ghfind-review Bot added the review: medium ghfind author score; see https://ghfind.com label Oct 25, 2026
@Mucheen Mucheen changed the title feat(windows): 插件能力对齐 macOS(统一交付) feat(windows): 完善 Windows 插件能力与宿主工作流 Oct 25, 2026
Connect task and test approval, output and cancellation to the native owner; validate passive Maven model snapshots and queued refreshes. Revoke stale editor attachments and queued text across buffer, workspace and package changes. Cover real WebView lifecycle workflows through the product Quit path.
Connect reviewed Provider model/dependency and page build workflows,
workspace test discovery, source-backed plugin settings, transactional
project generation, and passive VCS root ownership. Keep rollout gates
closed until product acceptance is complete.

Retain cleanup owners for Stop retry, preserve framework-specific actions
and Core reply data, and repair page refresh cancellation routing.
Merge preview d369c9a, classify its new debugger fixtures and make the
debug baseline checker resolve Windows file URLs correctly.
Integrate the reviewed R9 changes and preview 32021a8. Preserve typed archive interruptions and staging identity, global settings reload receipts, and isolated VCS session cleanup completion.

Validation: 1252 passed / 5 skipped, Windows x64 Release, shared contracts, runtime bundle immutability, Rust documentation, localization and matrix gates.
Integrate reviewed R10 settings functions, generator requirement interactions and segmented forms, and guarded VCS mappings/watch leases. Preserve original owners on late native completion, invalidate stale reviews and release late watcher publication on window destruction.

Validation: 1061 passed / 6 skipped, complete TypeScript check, Windows x64 Release, contracts, localization, runtime resource immutability and actual-tree matrix gates.
Route web function requests through the existing Core-owned provider lifecycle,
retain exact-window cleanup retries, and retire completed receipts with their
native window instance. Add native tree/list/form rendering and Core data
validation while keeping ui:3 admission closed. Extend VCS short sessions with
read-only history and baseline diffs, cancellation and cleanup recovery.

Cover approval/result shapes, form drafts, virtualized controls, deleted and
renamed paths, junction escapes and late-owner races. Update fixture coverage,
localization, capability evidence and the owning architecture note.
接入原生面板三侧布局、精确关闭与焦点恢复;新增受约束的 VCS resolve/cleanup 及真实 Core stdio 回归。补充设置实包验收驱动、源码身份校验、CI、共享翻译、资源复用规则和功能矩阵。未开放 ui:3/vcsProviders,真实完整包与系统客户端验收继续 pending。
Map all approved host icons to fixed theme resources and reuse a shared accessible InfoTip for disabled fields and actions. Register isolated UI regression suites and record remaining settings runtime and VCS move safety evidence.
Reuse the public input accessory for localized search clearing, preserve native
form draft and focus behavior, and register isolated consumer regressions.

Complete controlled settings package declarations and installation approval
checks, observe frozen Tauri IPC through fetch callbacks, and verify bounded
shutdown before resource snapshots. Record real SVN move counterexamples while
retaining capability gates and explicit runtime evidence limits.

Validation: 946 passed, 5 existing skips; full TypeScript, focused lint/format,
shared contracts, stability and platform gates; formal Windows x64 Release.
Correct primary/normal native button variants and cover shared-fixture actions.
Verify real WebView2 SearchField default keyboard activation in settings acceptance.
Add bounded fixed-input SVN move diagnostics with proven cleanup, path isolation,
and failure reporting; wire timed CI reports and resource reuse exclusions.
Update owning decisions and partial feature matrices without opening gates.
…back

Open the shared context menu for the selected virtual tree row, preserve
outside and action-owned focus, and retain expand-button keyboard navigation.
Add bounded controlled ui:2 fixture and real WebView2 postMessage fallback
acceptance with exact fault injection, identity checks and failure cleanup.
Register helper reports and nonreusable resources; document the SVN upstream
replacement boundary without opening capability gates.
Use native Bun file isolation and explicit SVG file loading, retain reports for absent or partial JUnit, and repair mock exports and deterministic synchronization. Preserve pinned PlantUML bytes on Windows and use a bounded raw-byte DAP fixture. Full integration and Release remain pending the dependency installer and shared native validation mutex; this is a local checkpoint only.
Let native panels and explicitly selected shared-language settings actions borrow
an existing approved Provider through its exact launch review and Core request
guards. Keep editor ownership and cancellation isolated from each invocation.

Preserve immutable startup evidence while tracking only successful same-session
workspace configuration updates for following exact launch comparisons. Retain
saved settings after an effect failure and offer an identity-checked effect-only
Retry with duplicate-click and stale-page protection.

Expand complete dedicated/shared workflow fixtures and product evidence for
registration withdrawal, immediate/restart/reload settings, selectors and
structured errors. Require explicit native Retry after saved settings revoke an
old panel receipt. Keep production capability and release admission closed.

Validation and remaining failures are recorded in the local R37 handoff. Full
Windows Rust retains two Agent tree-cleanup timeouts; no baseline attribution or
full-version/platform admission is claimed.
@Mucheen Mucheen changed the title feat(windows): 完善 Windows 插件能力与宿主工作流 feat(windows): 完善插件工作流、Provider 生命周期与 Java 分发 Nov 2, 2026
Keep exact launch identity and the existing model-only reload lifecycle.
Classify changed immutable startup inputs for the unique shared owner as
restart-required; translate the recovery and allow only that cleaned failure
to be explicitly postponed before Disable/Enable and fresh model consent.

Freeze the complete controlled workflow driver with its fixtures. Exercise
ordinary reload, restart-save then model reload refusal, retained PID/value,
and explicit lifecycle recovery continuously; add keyboard selector, input,
cross-slot narrow layout and close-focus checks without claiming IME proof.

Add ownership/configuration and localized receipt regressions. Lightweight
logic and offline timing passed; React dependency, Rust compilation and
source-bound product execution remain assigned to the integration owner.
…ugin-review-integration-r40

# Conflicts:
#	shared/platform-feature-matrix/features/plugin-functions.json
#	shared/platform-feature-matrix/features/plugin-registered-settings-pages.json
Align archive and expanded package budgets with macOS while retaining file, entry, path and metadata limits. Stream package digests with bounded reads and keep generator downloads on their existing budget.

Add runtime-sized directory/ZIP, deep-path digest and metadata/archive rejection coverage; update the architecture note and feature matrix without opening production capabilities.
Display native publisher verification for disk imports and refresh language
ownership after scans and admitted model changes. Retry pending Java imports
without restarting open sessions, release startup switching indicators, and
revoke ready or pending language sessions by plugin identity.

Separate mounted-buffer identity from native attachment identity. Drain
restored document initialization before saving, serialize saves per attachment,
and let close await their completion without an initialization cycle. Bound
callback and initialization replacement; preserve exact-session cleanup receipts.

Discover plain Java Main entries through the existing JDT session and retain
Core workspace filtering. Align Java and generator acceptance with public
contracts, qualified classes, default form values, approval order and resolved
runtime ownership. Stop applications while their Playwright loop is alive;
yield during descendant waits so queued CDP teardown completes.
wait for the exact Run action and allow one bounded catalog query without
retrying unknown completion. Establish fresh Maven error compilation through
reviewed clean and compile tasks, keeping distinct native receipts.

Use process-local thread snapshots to resume owned Windows children. Keep Git
integration allowances local to measured fixtures and cases, move cold Monaco
setup outside case timing, and update CI, contracts, notes and capability evidence.

Production trust anchors and capability admission remain unchanged. The Draft
PR records validation and remaining platform/external-package limits.
xiaoyumuxi added a commit that referenced this pull request Nov 4, 2026
…1724)

* feat(core): 拆出 #1478 的共享 Core 改动

从 #1478 拆出 Rust Core、共享契约和 macOS 测试部分,基于最新 preview
重新整理;Windows 宿主改动留在 #1478 后续适配。

- LSP:启动失败的会话进入积压,下次启动前最多再清理一次,清理不了就拒绝新启动;
  非法初始配置在启动进程前拒绝;destroy 先确认进程退出再移除会话;
  新增 start_lsp_owned 在注册时交出 session id
- 进程 dispose:非 Windows 在时限内重复 kill 并轮询退出状态;
  RemoteProcess 以强制 PROCESS_KILL 回执完成 dispose
- Java:javaEntrypoints 不再传作用域,结果只保留工作区拥有的源文件;
  java.main 带 javaLaunch 时直接用 JDT 路径启动,Maven 只在没有
  buildPrepared 回执时补资源步骤
- build.detect:根目录不存在或不是目录时返回空,真实目录的 I/O 错误不再吞掉
- 项目归档解压:预检深度与路径字节上限、只走真实目录、分块复制并检查取消、
  区分 Invalid/Interrupted,Windows 拒绝保留设备名
- 插件签名跨平台向量与 macOS 测试;CryptoKit 签名带随机数,
  macOS 改为用验签证明规范载荷一致
- 同步 rust-core-api 契约与相关 Agent Note
- 更新 lsp-lifecycle、run-discovery、build-system-plugins、
  plugin-project-generators、declarative-plugin-contract 五项功能矩阵记录

Co-authored-by: Mucheen <1528136628@qq.com>

* fix(core): 处理 LSP 进程收尾时被丢弃的结果,通过结构化日志门禁

- process.rs:非 Windows 的 dispose 轮询不再丢弃 terminate_native 的错误,
  进程超过期限仍未退出时,把最后一次 kill 失败作为 details 附在
  "Language-server root did not exit." 上返回。
- engine.rs:启动失败后的收尾清理属于“同一次失败已经记录过”的例外,
  补上 log-exempt 标记写明原因;残留仍由 failed_starts 持有,下一次
  启动会先回收并在失败时返回 ProcessFailed。

* test(ci): 给普通 Java 文件夹的真实 JDT 测试单独放宽 Windows 用时上限

- ci-windows.yml:real-JDT 通道给 real_jdtls_lists_entrypoints_in_a_plain_java_folder
  加 240 秒的 --test-budget。它和 Java 25 用例一样要冷启动真实 JDT LS,Windows run
  41817286665 在默认 15 秒看门狗处被终止(无断言失败),同一提交在 macOS arm64 上 6.0 秒通过。
  240 秒覆盖用例自身的 90 秒就绪 + 120 秒入口导入期限,其他用例和整套期限不变。
- write-stable-tests 的 windows-and-rust 参考页记录这项放宽的依据。

* fix(core): 远程构建根经宿主检查,索引取消不记成插件启动失败

- build/detect.rs:scan_directory_root 改用 workspace_io::metadata,远程工作区根
  (包括经宿主符号链接打开的根)在宿主上判断,不再读本机未实体化的投影而返回空检测。
  新增 remote_build_detects_a_root_opened_through_a_host_symbolic_link 回归测试。
- lsp/interface/engine.rs:两条索引策略取消路径先 abandon 启动 attempt 再 session.fail,
  取消不再被 fail 记成 Initialize 握手失败。两个既有取消测试附加 startupOperation
  并断言没有插件操作记录。

---------

Co-authored-by: Mucheen <1528136628@qq.com>
xiaoyumuxi added a commit that referenced this pull request Nov 5, 2026
Windows 的签名验证还在未合入的 Draft #1478,preview 上只有 macOS 的 PluginPackageSignature 测试使用这组向量。
xiaoyumuxi added a commit that referenced this pull request Nov 5, 2026
* docs(contracts): 插件契约 fixtures 按功能分目录并修正能力版本表

- fixtures/ 下的平铺文件按契约领域移入 manifest、languages、backend、editor、ui、
  settings、build-systems、build-providers、debug-adapters、vcs、keymap-import、
  project-generators、toolchains、package-trust、marketplace 子目录
- toolchains.md 移为 toolchains/README.md,proposals/toolchains/ 并入
  toolchains/proposal/(示例与用例在 fixtures/toolchains/proposal/)
- 项目生成器模板移入 fixtures/project-generators/templates/,Java 示例原样保留
- 三个顶层 schema 路径与 $id 不变
- verify-shared-contracts.sh 新增检查:fixtures/ 根目录不得有散落文件、
  fixture 文件名在各子目录间唯一(用例文件只按文件名引用基础清单)
- Rust Core、macOS、Windows 测试与 Agent Note、功能矩阵证据路径同步更新;
  Windows plugin_host 测试改为按文件名在子目录中查找 fixture
- 契约 README 能力版本表:serverProcess 补版本 2,合并重复的
  executableResolution 行,补 keymapImportProviders 行,API 级别补 4;
  schema 的 requires.buildSystems 枚举补 4

* docs(contracts): 注明 serverProcess 2 只有 Core 支持,两个宿主只声明 1

macOS 的 PluginManifest.hostCapabilities 与 Windows 的 host_capabilities() 都只声明 serverProcess 1,需要 serverProcess 2(debugAdapters 的 runSelectedRuntime)的插件目前在两个平台都会被宿主拒绝。

* docs(contracts): litheBuild 协商版本列表补到 11

构建提供者一节写的宿主提供版本还停在 [8…1],与同文件前文和 Core build_provider.rs 的 SUPPORTED_VERSIONS(11…1)不一致;补上 9(语义测试选择器)、10(类型化运行选项与服务/任务运行准备)、11(注册表连接调试)的说明。

* docs(contracts): 修正工具链、快捷键导入、VCS 与 Windows 宿主现状的过时说明

- 契约目录表和工具链 fixtures 说明:macOS 已为设置页、Build 与运行工具使用插件工具链,Windows 未接入
- 工具链一节:Build 工具和运行计划里指向插件定义工具的 toolchain 可执行文件走独立的新鲜解析
- 能力表 toolDefinitions/toolchainProviders/executableResolution 的宿主说明同步
- Shared executable candidates 锚点改为 -12(两处)
- 快捷键导入:macOS 已声明能力,三个官方 SDK 已实现
- Current Windows availability:Windows 声明 ui 1、2,不声明 3、4
- 工具链提案 README 的示例目录改为 fixtures/toolchains/proposal/
- vcs-provider-v1 状态行:macOS 已启动提供者

* docs(contracts): 工具链契约去掉 preview 上不存在的 Windows Build 管道说明

- toolchains/README.md 状态段原说 Windows 已有目录固定、声明式扫描、shell 候选和提供者查询的 Build 管道;这些代码在未合入的 Draft #1722,preview 的 Windows 宿主没有工具链适配器,也不声明 toolDefinitions、toolchainProviders。改为如实说明,并写明 Core 在 Windows 上拒绝需要这两项能力的包。

* docs(contracts): Windows 市场现状与 Lua 模板平台说明对齐 Core 的 validateIndex 规则

Core 的 plugins.marketplace.validateIndex 只在 darwin-* 平台把没有 requires 的级别 2 版本标为可用,Windows 只支持从磁盘安装声明式插件、没有市场浏览入口。Lua 模板第 5 步原写可列 macOS 和 Windows,改为只列 darwin-*;顶部工具链说明不再写死命令数量。

* docs(contracts): 按 Windows 已合入的磁盘安装实现改写其现状说明

Windows #1424 已实现私有快照、installReview 和用户确认的磁盘安装,原文仍写 Windows 没有这套流程。改为写明它做了什么,以及与 macOS 的差距:不验证发布者签名、只比对 plugin.json、不记录已批准程序和来源、没有市场安装入口。

* docs(contracts): 签名向量的说明不再声称 Windows 已有签名模块

Windows 的签名验证还在未合入的 Draft #1478,preview 上只有 macOS 的 PluginPackageSignature 测试使用这组向量。
Keep native open/focus and close commands available after the settings row
unmounts or the native window closes independently. Serialize row actions,
surface native failures for retry, and ignore late updates after unmount.

Cover remounts in both locales, duplicate clicks, failure recovery and stale
owners with deterministic regressions. Update the owning note and matrix.
Keep the existing floating document generation and pending requests when
Open focuses its native window. Reject reuse after revocation or workspace
identity changes; new document creation still retires the old requests.

Add deterministic native regressions and update the owning note and matrix.
Resolve conflicts with preview, preserve current Windows plugin work, and use Core-provided runtime probe arguments. Handoff: architecture gate fails on added language-specific host logic; marketplace HTTPS transaction acceptance is incomplete. The latest runtime probe change has not been compiled or run on Windows.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: medium ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants