Repository navigation
feat(runner): deliver Windows execution machine lifecycle - #875
Draft
AaronWangCong wants to merge 8 commits into
Draft
AaronWangCong wants to merge 8 commits into
AaronWangCong wants to merge 8 commits into
Conversation
AaronWangCong
marked this pull request as ready for review
November 15, 2026 01:28
Yanami-2K
requested changes
Nov 15, 2026
Yanami-2K
left a comment
Collaborator
There was a problem hiding this comment.
首次审查(head f830312)结论:需要修改。
cmd/agentflow-runner/main.go:Windows 上显式开启-auto-update时只打日志,没有关闭开关。 现在默认值改成了goruntime.GOOS != "windows",但用户显式传-auto-update=true时,代码只是log.Printf("automatic Runner updates are unavailable on Windows..."),*autoUpdate仍为 true 并传给runner.Config。之后如果真的下载了新版本,会走到restartRunner,而 Windows 实现固定返回错误,进程随即log.Fatal退出。也就是说,提示「不可用」的功能实际仍会执行,并以进程退出收场。建议打印警告后紧接着*autoUpdate = false,并在update_windows_test.go中断言 Windows 上 Config 的 AutoUpdate 为 false。deploy/bind-cli.ps1Get-PlatformUrl允许http://。 安装和-Update都会从这个地址下载 Runner/Gate 可执行文件,并用同一来源返回的 SHA-256 做校验。走明文 HTTP 时,中间人可以同时替换二进制和摘要,校验起不到保护作用,bind code 也会明文传输。建议与 #174 VS Code 扩展的normalizeBaseUrl保持一致:只对localhost/127.0.0.0/8/::1放行 HTTP,其余地址强制 HTTPS,并在scripts/test-windows-installer.py中补拒绝用例。- PR 体量过大,难以有效审查。 111 个文件、+6260/−273,同时包含:Unix 侧的行为等价重构(
processgroup、procwatch、assistant_native_lock_*、preview/archive_links_*、gitwork/ssh_transport_*)、Windows 新实现(MSYS AF_LOCAL 兼容的 SSH agent、进程树、审批 hook)、安装器与下载端点、新的 Windows CI。审查工具只返回了前 100 个文件,其中大部分 patch 被省略。建议至少拆成三部分:(a) 抽出平台适配层、Unix 行为不变;(b) Windows SSH transport 与进程管理;(c) 安装器、下载端点和 CI。这样每一步都能单独验证「Unix 行为不变」。 - 文档冲突:#163 正在 README 中写入「Windows 暂不支持」,本 PR 在同一位置新增 Windows Runner 入口。两者先后合入会互相矛盾,请与 #163 协调措辞,例如改成「平台需部署在 Linux,Windows 可作为执行机接入」。
已确认的优点:msysSSHListener 用 DACL 限制目录、使用随机 cookie,私钥只放在内存;configuredBinaryPath 兼容无扩展名和 .exe 两种部署形态,并有测试覆盖。
AaronWangCong
marked this pull request as draft
November 15, 2026 02:09
This was referenced Nov 15, 2026
AaronWangCong
force-pushed
the
codex/windows-runner-lifecycle
branch
from
November 15, 2026 04:53
f830312 to
c7977a4
Compare
AaronWangCong
force-pushed
the
codex/windows-runner-lifecycle
branch
from
November 15, 2026 05:37
d880303 to
cda1608
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.
What changed
Adds installation and lifecycle management for Windows execution machines connecting to the existing platform. A machine can bind, execute tasks with its account's tools and CLI login, reconnect with the same identity and workspace, update with rollback, renew an expired binding, and uninstall while preserving user data.
Split review
This is part 3 of the Windows execution-machine work:
This integration branch retains the complete feature for acceptance. It stays draft until the foundations merge, then will be rebased to the delivery-only changes. The delivery-only comparison contains 28 files.
Scope
Compatibility
The platform runs on Linux/macOS; Windows joins as an execution host. The guide distinguishes these roles consistently with #163. No frontend or database migration changes are included.
Windows native tasks own their complete process tree. Linux Docker images used from Windows need Python 3 at a standard image path; personal container Git SSH also needs the OpenSSH client tools. Successful Docker script nodes retain services for subsequent nodes in the same reused sandbox. Active commands stop when canceled or when their Runner owner exits. The web interactive PTY uses a Unix execution machine.
Validation
All acceptance below ran on the local Windows amd64 machine and its Docker Desktop Linux engine, using real binaries and zero-cost loopback model gateways:
OwnProcessGroup=falseand byte-exact JSON stdin passed.git diff --checkand Gitleaks 8.30.1 passed across the full PR stack. Linux amd64 platform/Runner/Gate and Windows/Darwin ARM64 Runner/Gate builds passed; executable headers confirm the ARM64 targets.All 19 official checks passed on
4e6b77d. The Windows job ran all seven installed lifecycle cases, 46 installer cases under each PowerShell version, all nine actual Codex hook cases, and vet.Safety