fix(windows): 修复安装器运行时诊断调用 - #108
Merged
Merged
Conversation
uvwt
force-pushed
the
fix/windows-runtime-diagnostics-20260914
branch
8 times, most recently
from
September 14, 2026 06:44
1f9163e to
26e61d2
Compare
uvwt
force-pushed
the
fix/windows-runtime-diagnostics-20260914
branch
from
September 14, 2026 10:55
26e61d2 to
7c15674
Compare
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.
修复内容
CLSIDFromProgID:从oleaut32.dll改为ole32.dllWTSGetActiveConsoleSessionId改用x/sys/windows官方生成绑定,避免手写错误 DLL 映射Start-Process -Wait等整个长期运行进程树,改为只等待直接测试进程,并设置 10 分钟显式超时与失败日志输出Start-Process -Credential -PassThru的ExitCode可能保持$null;E2E 改用成功哨兵文件,Setup 用户上下文守卫改用结构化Success=false+Code=setup-elevated-context判定service launch-core场景复用现有 Job Object 控制器持有 generation Core;Scheduled Task 被结束时由内核清理 Core,避免孤儿进程原因
#107 将临时 Scheduled Task 的启动收敛到
agentdock service task-start后,正式 Windows Installer workflow 暴露了三层运行时遗漏:launch-windows-process.ps1,缺少必填-AgentDockBinaryCLSIDFromProgID错误绑定到oleaut32.dll,进入原生 Task Scheduler COM 后 panicWTSGetActiveConsoleSessionId错误绑定到wtsapi32.dll;该入口实际由kernel32.dll导出进一步完整验证还发现三处既有测试封装问题:
main上标准用户 E2E 已连续多次在同一步挂满 GitHub 6 小时,因为Start-Process -Wait会等待长期运行的 AgentDock 后代进程-Credential路径真实复现到ExitCode=$null;产品安装、就地升级和 redirected manifest recovery 已实际通过,只是封装误判失败start-agentdock.ps1标记却声称是旧安装,与现在“迁移前必须存在真实 Core/Tray”的生产安全边界冲突;修复测试夹具,不放宽生产保护service launch-core建立 kill-on-close Job,普通 CLI/update 调用保持原行为现在测试链使用有界直接进程等待 + 显式成功/结构化结果,并用完整旧版布局验证一次性迁移。
验证
go test ./scripts/test -count=1go test -c:internal/desktopruntime、scripts/testgo vet:cmd/agentdock-shim、internal/process、internal/desktopruntime、scripts/testgo test -c:cmd/agentdock-shim、internal/process、internal/desktopruntime、scripts/testgit diff --checkStart-Process -Credential -PassThru+WaitForExit()后ExitCode为$null34835544019在当前 head7c15674完整成功