feat(runtime-host): support native Windows managed deployments - #4658
Draft
M4n5ter wants to merge 1 commit into
Draft
feat(runtime-host): support native Windows managed deployments#4658M4n5ter wants to merge 1 commit into
M4n5ter wants to merge 1 commit into
Conversation
M4n5ter
force-pushed
the
feat/runtime-host-windows-task
branch
from
September 3, 2026 12:40
518e566 to
fd3ebfc
Compare
M4n5ter
force-pushed
the
feat/runtime-host-windows-task
branch
from
September 3, 2026 12:44
fd3ebfc to
03d14c3
Compare
M4n5ter
force-pushed
the
feat/runtime-host-windows-task
branch
5 times, most recently
from
September 3, 2026 13:52
0c6b211 to
8eb7a30
Compare
M4n5ter
force-pushed
the
feat/runtime-host-windows-task
branch
from
September 3, 2026 14:27
8eb7a30 to
9ce29a9
Compare
M4n5ter
force-pushed
the
feat/runtime-host-windows-task
branch
from
September 3, 2026 14:41
9ce29a9 to
cd1cfb2
Compare
M4n5ter
force-pushed
the
feat/runtime-host-windows-task
branch
from
September 3, 2026 15:37
cd1cfb2 to
c600e60
Compare
M4n5ter
force-pushed
the
feat/runtime-host-windows-task
branch
from
September 3, 2026 15:59
c600e60 to
b22360a
Compare
M4n5ter
force-pushed
the
feat/runtime-host-windows-task
branch
from
September 3, 2026 16:12
b22360a to
60f4343
Compare
Generated-by: OpenAI Codex
M4n5ter
force-pushed
the
feat/runtime-host-windows-task
branch
from
September 3, 2026 16:26
60f4343 to
f13e5bc
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.
English
Summary
Add a canonical per-user Windows managed Runtime Host lifecycle with
supervised / sessionavailability. The persisted provider projects two owned Task Scheduler tasks: one for Host activation at user logon/on demand, and one for scheduled one-shot reconciliation through the stable operator.Task Scheduler's COM API is handled by typed functions in the existing Runtime Host native addon, with exact semantic verification, ownership markers, locale-independent status, and no private protocol, shell, password, elevation, pidfile, or second lifecycle state machine.
Windows Task Scheduler does not reliably classify a normal ExecAction's nonzero process exit as a restartable task failure. An internal exact-package Node supervisor therefore restarts only unexpected Host exits. An outer kill-on-close Job fences the entire scheduled-task tree on retirement, while each managed Host owns a nested generation Job so its detached descendants are reclaimed before a replacement starts. The native status projection maps Task Scheduler's wrapper PID to the unique Node Host child, preserving the existing
supervisor PID == State Root owner PIDtransaction fence.Closes #4646
Verification
Availability and migration
This provider promises availability only while the Windows user is signed in. It does not use SCM, S4U, stored credentials, or claim machine availability. PR 1 automatically upgrades shipped managed Host and WSL state; no Windows provider state has shipped, so unreleased Windows development artifacts do not add another migration format.
AI use
Tool(s) and scope: OpenAI Codex implemented and verified the Windows provider under maintainer direction.
Checklist
Does this PR entail a change in behavior?
中文
摘要
增加 canonical 的 per-user Windows managed Runtime Host lifecycle,availability 为
supervised / session。持久化 provider 投影两个自有 Task Scheduler task:一个负责用户登录/按需 Host activation,另一个通过稳定 operator 触发定时 one-shot reconciliation。现有 Runtime Host native addon 通过 typed function 直接调用 Task Scheduler COM API,使用精确语义验证、ownership marker 和与 locale 无关的状态读取;不增加私有协议,也不使用 shell、密码、提权、pidfile 或第二套 lifecycle 状态机。
Windows Task Scheduler 不会可靠地把普通 ExecAction 的非零进程退出认定为可重启 task failure。因此,一个 exact-package 内部 Node supervisor 只负责重启异常退出。外层 kill-on-close Job 在 retirement 时 fence 整个 scheduled-task process tree;每个 managed Host 再拥有一个嵌套的 generation Job,使其 detached descendants 在 replacement 启动前被完整回收。native status 将 Task Scheduler 的 wrapper PID 投影到唯一 Node Host 子进程,继续满足既有的
supervisor PID == State Root owner PID事务 fence。关闭 #4646
验证
可用性与迁移
该 provider 只承诺 Windows 用户登录期间可用,不使用 SCM、S4U 或保存的凭据,也不宣称 machine availability。PR 1 会自动升级已发布的 managed Host 与 WSL 状态;Windows provider 状态从未发布,因此不为开发期 Windows artifact 增加另一套迁移格式。
AI 使用
工具与范围:OpenAI Codex 在维护者指导下实现并验证 Windows provider。
检查清单
该 PR 是否改变行为?