Repository navigation
fix(build): bound version probes and reject failed output (#2154) - #2162
Closed
lithe-support[bot] wants to merge 1 commit into
Closed
lithe-support[bot] wants to merge 1 commit into
lithe-support[bot] wants to merge 1 commit into
Conversation
2 tasks done
23 of 24 tasks
Owner
|
Superseded and fixed by #2222. |
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
#2154 的 Maven 模型同步可能在启动 Maven 之前挂在
/usr/bin/java -version数分钟。工作台的通用probeBuildTool直接使用模型同步最长 30 分钟的上下文;此外,只要工具打印过内容,原函数即使收到超时、取消或非零退出也会返回成功,导致错误被忽略。改动 / Changes
desktop/internal/workbench/build.go:对任意构建工具的单次版本预检额外施加 10 秒上限;保留父上下文取消(用户停止、项目关闭);复用buildprocess.Start的进程树回收,无额外后台定时任务。withBuildOutput,把工具最后的错误行安全有界地带回失败原因。build_probe_test.go:测试进程以合成工具模拟成功、错误输出后非零退出、先输出文本再挂住;测试独立可执行,不需要机器安装 Java、Maven 或插件。build-model-sync-session功能矩阵的验证路径(原生状态仍pending),以及既有准备阶段生命周期 Agent Note 的约束。不在本 PR 范围内 / Out of scope
/usr/bin/java为什么在 Lithe 子进程中占用 CPU;不声称消除底层卡顿原因。JAVA_HOME的来源一致性;[Bug] macOS Maven 同步在 java -version 探测阶段长时间无进度 #2154 继续开放追踪这些事项。类型专属:fix
复现与根因
java -version子进程;源码中probeBuildTool使用未单独限时的ctx,并在有输出时无条件吞掉waitErr。检查项
probeBuildTool。共享 Go 逻辑同时覆盖 Windows 和 macOS。2026-11-17-run-process-outlives-preparation-timeout.mdAgent Note,避免把该 10 秒时限误用于运行中的服务。范围检查 / Scope checks
功能矩阵 / Feature matrix
build-model-sync-session的证据加入新回归测试,verificationStatus仍是pending。.artifacts文件。插件归属 / Plugin ownership
UI 验证 / UI evidence
N/A:未更改布局、控件、样式、菜单、通知或界面文案;没有生成真实应用截图,不附模拟截图。原生故障场景尚需验证。
统一日志系统 / Structured logging
buildOutputTail限定行数及长度,避免直接灌入整份输出。界面文案 / i18n
N/A:不新增字符串;错误沿用 Go 标准上下文错误和工具原始错误输出(不是新增宿主 UI 文案)。i18n 检查未执行。
逻辑归属 / Logic placement
buildprocess;未把工具或语言专属判断写入宿主或 Core。性能与内存 / Performance and memory
设置 / Settings
N/A:不新增/修改设置项。
插件契约 / Plugin contract
N/A:不改变 API、SDK 或构建插件协议。
发行包与资源 / Bundle and resources
N/A:无新资源、下载或打包文件,也不写 bundle。
无用代码与重构 / Dead code and refactoring
验证 / Verification
go test -race -v -count=1 ./...scripts/desktop/desktop-go.sh test ./internal/workbench -run 'TestProbeBuildTool' -count=1提交前确认 / Final checks
mainc2beeb06112a7045610c2febd02eba58c0dc6205创建独立lithe-support/issue-2154-bounded-build-tool-probe分支,目标main。