Repository navigation
fix(remote): #1507 远程工作区、构建与插件执行适配 - #1515
Open
xiaoyumuxi wants to merge 6 commits into
Open
xiaoyumuxi wants to merge 6 commits into
xiaoyumuxi wants to merge 6 commits into
Conversation
xiaoyumuxi
marked this pull request as ready for review
October 26, 2026 07:44
Lithe Review结论: ⛔ 有阻塞 Findings
Scope Check
Suggestions
Summary远程工作区适配范围较大,契约、能力矩阵和架构 Note 均有相应更新;Draft 也清楚标出未完成部分。资源启动期间的取消竞态会留下远端进程,修复前不建议合并。 Verification
|
…ation Integrate PR #1515 onto the preview baseline, preserving plugin live activation and shared i18n changes. Reserve pending process, terminal and watch starts before dispatch; retain cleanup ownership across cancellation, worker saturation, disconnect and session shutdown. Add deterministic lifecycle and declarative remote launch regressions; isolate the empty connection registry test, fix Swift fixture shadowing and synchronize terminal resize with shell readiness. Update contracts, Agent Notes and partial/pending capability evidence. Java/JDT integration remains out of scope.
The original PR implementation is already incorporated in the preceding preview-based commit. Retain its ancestry without overwriting the integrated and locally verified tree, so the existing PR can be updated by a normal fast-forward push.
xiaoyumuxi
marked this pull request as draft
October 27, 2026 11:47
…cycles Resolve RuntimeLocator by retaining remote discovery defaults and the upstream platform search-path port. Preserve both remote asynchronous preparation regressions and the upstream hosted workspace-command tests. Import preview's PATH-boundary correction without expanding remote Java integration. Validate the merged tree with full Core timing and focused Swift timing.
xiaoyumuxi
marked this pull request as ready for review
October 27, 2026 12:23
Lithe Review结论: ❓ 审查未完成 任务: 374 审查失败:Review timed out 可以重新评论 |
Add session-owned run directory allocation and cleanup with retryable errors, original-session macOS deployment cleanup, and per-upload I/O isolation. Cover lifecycle and upload ordering regressions, update contracts/resource boundaries and capability evidence, and record optional transfer/environment candidates without expanding Agent or Java scope.
Collaborator
Author
|
@lithe review |
Lithe Review结论: 未发现需要阻塞合并的问题。 Scope Check
Suggestions
Summary本次静态检查未发现明确的代码缺陷。此前关于启动期间取消可能遗留远端进程的阻塞问题,在当前 head 中已通过服务端预登记关闭请求、创建者负责迟到资源清理及对应并发回归测试处理。整体实现仍处于 PR 明确标注的阶段性范围。 Verification
|
This branch has not been deployed
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.
关联 #1507。远程项目此前有多条工作流访问本机占位目录、运行本机工具,导致终端、环境发现、Git 和搜索无法使用真实主机数据。本 PR 将这些流程的文件和进程 I/O 接到工作区所属连接,并加入构建及通用插件执行的基础适配。
这是阶段性实现,尚未完成整个 issue,不关闭 #1507,也不宣称达到合并/发布条件。 当前 PR 实际为非 Draft;本次只追加提交和更新说明,不切换 Draft/Ready 状态。 已接入的代码、自动化 fixture 与真实 SSH 验收分开记录;功能矩阵保持
partial / pending。本次改动
工作区身份、文件树与监听
remoteWorkspace { sessionId, localRoot, remoteRoot },只映射类型化路径字段;拒绝跨主机混合操作。长期历史、进程及清理持有原连接,重连或切换项目不会改投另一台主机;远端失败不回退到本机占位目录。trash,不可用时失败而不变成永久删除。终端、环境、Git 与搜索
构建、插件部署与 stdio
remote.hostInfo、remote.uploadFile与可选upload主机能力:256 KiB 分块、每文件最多 2 GiB、四个上传槽、五分钟绝对期限、精确 offset、SHA-256 和禁止覆盖的原子发布。失败/取消尝试 abort,断线与到期清理暂存文件,未提高协议单帧上限。~/.lithe-server/plugin-runs/<UUID>/package,普通文件只读、可执行文件只读可执行;提供者可写状态独立放在state/plugins。不写 app bundle 或安装资源,进程销毁后才删除快照。包体、契约与资源维护
2026-10-27:通用插件 / LSP 续作
本轮只继续通用远程能力,不新增 Java/JDT、JDK 目标包或 SVN 专属实现。原 PR 已有适配保留;Java/SVN 的语言或工具专属验收不作为本轮完成条件。Agent 按用户要求后续单独处理,不关闭 #1507。
BUSY、客户端两秒清理等待到期或连接断开均不撤销已记录的清理;关闭等待本身最多 60 秒。cdeec1949并保留原 PR 提交祖先,使用普通 fast-forward push,无 force push。两处合并冲突分别保留远程 RuntimeLocator 默认实现与上游平台搜索路径端口、远程启动准备测试与上游 hosted workspace-command 测试。2026-10-27:插件完整快照与上传隔离(本批新增)
已实现
runDirectories能力及fs.createRunDirectory / fs.releaseRunDirectory。客户端在请求前生成身份,分配回复丢失或取消后仍能按原连接、原身份释放;不接受客户端传入任意删除路径。Core 有限方法白名单同步放行,并有测试保护。~/.lithe-server/plugin-runs/<id>下新建 0700 目录,每会话最多 256 个;不接管已有目录。父目录必须是当前用户所有的真实私有目录,拒绝符号链接或宽松权限,不用 chmod 接管用户目录。upload + runDirectories;旧主机明确提示升级,不降级为不受会话管理的路径删除。校验返回路径,捕获原会话并使用未取消任务清理;已安装插件及 bundle 保持只读。BUSY,其他文件可独立完成;取消、断线和到期先标记,慢 I/O 工作线程继续负责暂存文件清理。partial / pending。仅记录、未实现的候选计划
按用户要求,将 27 项候选(T01–T14、E01–E07、X01–X06) 写入远程工作区 Host 提案的“待评估能力候选”章节。全部待评估、未排期,不代表已批准开发,也不自动成为本 PR 的合并条件:
Agent 的本地/远端执行抽象、钩子或桥接方式留到后续独立讨论;不从这份计划自动扩展。
TODO:通用能力剩余 5 类
这些是工作包,不是五个小修补;已实现代码、fixture 和真实主机验收分别记录。新增候选与以下已有缺口分开,不能用“候选未定”豁免安全和验证 gate。
trashDocument(expectedIdentity:);Git 大文件临时内容/原子写入仍限 8 MiB,尚未接入分块上传。本轮明确排除
当前代码的本地验证(2026-10-27)
--locked --tests -- -D warnings当前五条计时 lane 合计 1,448 条,均通过,无超时或硬预算超限。新增 server 用例中取消/上传隔离约 9–32 ms,目录释放/权限/隔离/重试约 33–65 ms;持久会话销毁 1,367 ms、空闲到期清理 1,860 ms 为软性能预警,未超过硬预算。报告为
.artifacts/test-stability/remote-snapshot-{core,rust,swift,remote-protocol,remote-client}.json及相邻 HTML/JUnit,聚合视图为remote-snapshot-validation.html/index.html;生成报告不提交进源码。上轮的 140 项 Swift、69 项 server 和 1,548 条旧聚合属于先前修订,不与当前五条 lane 累加。Core 全量复跑使用进程级
GIT_CONFIG_*指定 fixture 默认分支 master,没有修改用户全局 Git 配置。之前的 PTY resize 回归使用命令边界握手,未降低断言。已知检查限制与 CI 状态
verify-remote-workspace.sh --static在x86_64-apple-darwin因本机缺失可用的core/std目标库失败,未修改用户工具链;其他三种 target check 和 Linux 两种 release 已另行验证。cargo fmt --all --check仍在本批未修改的lithe-agent-host文件报格式差异;受影响 Core/remote 四 crate 的定向 fmt 通过,不借此改动用户明确跳过的 Agent 模块。git_watch_context::watch_context_distinguishes_linked_worktree_git_and_common_directories在git init -q -b main约 10 秒后得到Some(Cancelled)。本批未修复或证明其根因,不能称 CI 全绿。RunLaunchEnvironment.swiftPATH 服务边界阻断已在前次合入的 preview 中修复,当前服务边界检查通过;没有放宽检查或扩展远程 Java/JDT。gh pr ready或切换 Draft;不关闭 [Bug] SSH 服务的缺陷与待完善的点 #1507。候选计划不是实现完成或合并承诺。