Repository navigation
fix(remote): 重连重验信任并绑定保留会话与完整路由 - #2367
Merged
Merged
Conversation
xiaoyumuxi
marked this pull request as ready for review
November 23, 2026 16:51
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
远程断线重连可能继续使用旧信任,文件保存没有服务端工作区边界,容器工作树重新打开时可能丢失外层连接。保留会话也需要在发送旧凭据之前核验实际目标,避免 SSH 别名改绑后复用另一目标的信任或令牌。
本 PR 保持 Draft,当前不能直接发版。 Core #189 的身份日志仍有持续写入磁盘的资源风险;新增临时证据路径的安装包内运行验证未完成。宿主 main 当前固定 Core #187 的插件增量分支,必须先整合 #187 与 #189,再更新宿主 pin。当前保留已有 pin,避免回退已合入宿主的增量更新功能;本地验证明确使用 #189 检出,不能视作当前生产 pin 已包含修复。
改动 / Changes
revision,由 Core 拒绝根以下父目录及叶符号链接;Core 同时增加读取、响应、目录遍历与监听队列的预算。remoteHost,SSH、WSL、容器及组合路由的工作树重新打开时不丢失外层连接;外层保存连接被删除时拒绝重开。sessionBinding、resumeConsumed与 resume binding;没有核验绑定的会话不作为自动恢复凭据。只有 Core 明确消费过原凭据才删除记录,legacy、目标变化和无法核验的连接保留原记录。不在本 PR 范围内 / Out of scope
类型专属:fix
复现与根因
resumed=false也不能证明原目标的会话已结束。d9969f033(feat(desktop): 远程工作区的编辑器经会话打开、保存和比对主机上的文件 (#2231) #2271,远程编辑器与断线流程)、b32f48490(feat(desktop): 远程工作区里打开和新建 Git 工作树:用同一连接为另一个主机文件夹开新会话 (#2231) #2294,远程工作树)、Core1761f63(fix(windows): suppress console flashes and align project tabs #140,远程信任)、edd0933(【bug】mac上的一些页面优化建议 #160,保留会话)。检查项
remote_git_test.go、remote_worktree_test.go、remote_close_test.go、kept_test.go、remote_session_test.go及 Core trust/save/budget 测试。并非所有新增用例都保存了修复前日志,未将此扩展为全量修复前验证声明。.agents/notes/implemented/bug-fix/2026-11-24-remote-security-boundaries.md。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/remote-workspace.json,真实 SSH 证据和未完成平台验收如实描述,未将 pending 改成通过。verify-platform-feature-matrix.sh与verify-platform-feature-matrix-change.sh origin/main HEAD通过。.artifacts/生成视图。插件归属 / Plugin ownership
UI 验证 / UI evidence
统一日志系统 / Structured logging
界面文案 / i18n
verify-app-language-localization.mjs与generate-i18n.mjs --check通过。逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
N/A:没有新增设置项、设置页或配置写回。
插件契约 / Plugin contract
N/A:修改的是远程工作区应用边界,不是插件协议或宿主插件方法。Core pin 整合依赖已在开头明确列出。
发行包与资源 / Bundle and resources
docs/ci-builds.md已说明临时日志和远端状态标记的生命周期、归属、不可跨目标/工作树复制及剩余风险。无用代码与重构 / Dead code and refactoring
验证 / Verification
--all-features --lib --test server --test watch_and_walktests::remote_sessions::.artifacts/test-stability/,未提交desktop-go.sh test -race:core/remoteconn/workbench,筛选恢复、凭据、信任、文件及工作树未能执行的检查和原因:
Windows 原生、完整容器、真实 ProxyJump、有效第二账户和连接过程中配置变化未验收;没有网络抓包证明 token 的线缆内容,相关结论来自生产选择逻辑和真实会话状态。旧共享契约/日志使用校验的等价门禁未恢复。按用户要求只测改动模块和直接消费者,未跑全仓库;完整 CI 尚未完成。SSH 日志资源阻塞与 Core pin 整合未完成,PR 保持 Draft。
提交前确认 / Final checks
origin/main,目标main。