Repository navigation
fix(desktop): 固定 Core main 66a1476 (#2231) - #2259
Merged
Merged
Conversation
- #2256 把 Core 固定在 d1a5b82。它是 #145 分支上的提交,不在 Core main 上。 这次换成 main 66a1476,带上已合入的五个 PR: #145 已保存的连接, #146 上传前核对清单哈希(S17), #148 ssh 子进程只保留白名单环境变量(S26), #149 server.state 补关闭确认所需字段, #147 端口转发的开始、停止和列出,以及监听端口所属进程(S28/S29)。 - 测试修复:core 和 workbench 的测试二进制同时充当 AskPass 助手。#148 之后,Core 只把 ssh 需要的环境变量交给助手。包级变量在初始化时读取 LITHE_PLUGIN_CONTRACT_DIR,这发生在 TestMain 判断助手模式之前,所以会崩溃。两处 fixture 路径改为函数,只在测试用到时读取。
xiaoyumuxi
marked this pull request as ready for review
November 21, 2026 04:44
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
#2256 合入时,Core 固定在
d1a5b82。这是 Core #145 分支上的提交,不在 Coremain上。现在 #145 已经合入,Core
main还多了 #146、#147、#148、#149。发版只认main上的提交,所以要把固定版本换成
main的提交。改动 / Changes
scripts/desktop/build-desktop-core.sh:PINNED_CORE_REVISION从d1a5b82换成 Coremain的66a1476。main提交重写,逐项写明带进来的 Core PR:server.state的资源标签、运行时长和终端命令remote.startForward、remote.stopForward、remote.forwards),以及监听端口所属进程(S28/S29)desktop/internal/core/project_generators_test.go和desktop/internal/workbench/new_project_test.go:projectGeneratorFixtures和generatorFixtures改成函数,只在测试用到时才读取 fixture 路径。包级变量在初始化时读取
LITHE_PLUGIN_CONTRACT_DIR,这时TestMain还没判断助手模式,读不到就会崩溃。不在本 PR 范围内 / Out of scope
类型专属:fix
复现与根因
main固定的d1a5b82不在 Coremain上,Core 分支删除或改写后就取不到。期望固定的提交始终能从 Core
main取到。main后,desktop-go.sh test ./internal/core ./internal/workbench中走 AskPass 助手的测试崩溃。崩溃发生在包初始化读取 fixture 路径的时候。期望测试全部通过。
LITHE_PLUGIN_CONTRACT_DIR。检查项
desktop/internal/core和desktop/internal/workbench中通过 AskPass 助手运行的测试。contractfixture.Path的写法。.agents/notes/implemented/bug-fix/记录:只是测试初始化顺序的问题,函数旁的注释已写明原因范围检查 / Scope checks
功能矩阵 / Feature matrix
N/A:只换 Core 固定版本并修测试初始化,没有新增或改变宿主的用户可见能力。
插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空shared/i18n/;插件的构建步骤、资源路径和补丁没有写进docs/ci-builds.md、Agent Note 或 Skill:没有改这些文件UI 验证 / UI evidence
N/A:没有界面变化。
统一日志系统 / Structured logging
N/A:桌面端没有新增或改动日志事件。带进来的 Core 日志事件已在各自的 Core PR 中声明和检查。
界面文案 / i18n
N/A:没有新增或改动界面文案。
逻辑归属 / Logic placement
N/A:没有新增业务逻辑。
性能与内存 / Performance and memory
N/A:没有新增后台功能、子进程、缓存或依赖。
设置 / Settings
N/A:没有改设置。
插件契约 / Plugin contract
N/A:带进来的 Core PR(#145–#149)都没有修改插件契约、能力版本或插件函数协议。
发行包与资源 / Bundle and resources
N/A:没有新增运行时资源。远端服务产物的路径和生命周期在 #2258 里说明,本 PR 没有改变。
无用代码与重构 / Dead code and refactoring
refactor标签的 Issue,没有在本 PR 顺手处理:没有发现验证 / Verification
cd desktop && ../scripts/desktop/desktop-go.sh test ./internal/core ./internal/remoteconn ./internal/remoteserver ./internal/workbench -count=1(固定 66a1476)git ls-remote https://github.com/Lithe-IDEA/Lithe-core-rust.git refs/heads/main核对固定提交就是 Coremain的最新提交66a147629cc9f82fc551a52682b522230e6a8340pgrep -fl -i lithe检查进程残留develop-lithe第三节插件归属自查命令gofmt -l两个改动的测试文件未能执行的检查和原因:
./scripts/desktop/desktop-go.sh test ./...:只运行了受 Core 远程连接改动影响的四个包,其余包交给 CI。提交前确认 / Final checks
main创建;目标分支:feat、fix、docs 为main,release 以发布流程要求为准.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图