Repository navigation
feat(windows): opt-in Job Object supervisor prototype for Docker-free desktop runtime - #7953
vaibhavsrv wants to merge 19 commits into
Conversation
…add supervision design note
…e stub sleep interruptible
|
@Lightheartdevs , following up on #7952, I've opened this PR as a verified, self-contained prototype evaluating Win32 NT Job Objects ( • Core Problem Solved: Eliminates orphaned Would appreciate your guidance on whether you'd prefer to merge this as an opt-in experimental prototype under |
|
Ran this on a real Windows 11 PC (Python 3.10): the offline suite passes 6/6. A few things I hit while reviewing the non-stub path:
|
|
Thanks for this. On 2026-10-24 we re-audited every open PR against current main and are merging only fixes for failures that users or our test fleet actually hit. Superseded: the native-Windows supervisor work continues in one series behind the host agent. If you've seen this fail on a real install of current main, please open an issue with the steps and logs, and a focused PR for it is very welcome. 🤖 Generated with Claude Code |
Summary
Adds an opt-in, headless Win32 Job Object process supervisor prototype under
ods/experimental/windows-supervisor/for runningllama-server.exeanddashboard-apitogether as background services in a Docker-free, WSL-free native Windows environment.Key capabilities:
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE. When the supervisor exits, terminates, or crashes, the Windows kernel terminates all managed child processes automatically, preventing orphaned background services.AssignProcessToJobObjectfails (e.g. Win32 error 5 access denied), compensation teardown immediately terminates spawned children before raising.CTRL_BREAK_EVENTfor cooperative SIGBREAK shutdown on Windows before closing the Job Object.api_key.txt,llama_key.txt) to owner-only permissions viaicaclson Windows (chmod 600on POSIX);pids.jsoncontains zero secrets or API keys.ods/experimental/windows-supervisor/and.github/workflows/experiment-windows-supervisor.yml. All production code paths (ods.ps1,install-windows.ps1, Compose manifests, and dashboard API) remain 100% untouched.AI Assistance
AI drafted the fix and tests and ran the checks. The human author did not review each line before submission.
Release Lane
release/2.6.xmainStable hotfix reason:
Changed Surface
Risk And Validation
git diff --checkrelease/2.6.xCommands/results:
Operational Change Check
If this PR touches installer phases, bootstrap logic, compose stack generation,
service manifests, dashboard API control flows, Hermes, model routing, GPU or
runtime detection, lifecycle commands, host mutation, or network exposure, it
requires release-grade fleet validation before release unless the PR explains a
narrower equivalent.
Notes For Reviewers
[Windows] Evaluate Job Object supervision for the Docker-free desktop runtime, filed by @vaibhavsrv).ods/experimental/windows-supervisor/.tang-vu, OPEN, 32 files): Implements Portal text chat preview in native Windows desktop (ods/desktop/windows/) using a C#ChildJobhelper. In contrast, PR feat(windows): opt-in Job Object supervisor prototype for Docker-free desktop runtime #7953 evaluates a headless Python supervisor orchestrating bothllama-server.exeanddashboard-apias background services for the Docker-free server stack.tang-vu, OPEN, 0 comments): Tracks Windows native desktop opt-in chat milestone. Zero code changes.tang-vu, OPEN, 2 files): Tests POSIX signal shutdown for host agent. Does not test Win32 Job Objects.tang-vu, OPEN, 3 files): Diagnostic report fallback when Docker is missing. Zero overlap with supervision.tang-vu, OPEN, 3 files): PowerShell STT cache verification. Zero overlap with process supervision.Lightheartdevs, OPEN, 47 files): Draft CUDA arm64 support for RTX Spark. Zero overlap.Lightheartdevs, OPEN, 18 files): Lean installer defaults. Zero overlap with standalone supervisor prototype.python -c ...) rather than real llama-server binaries for fast deterministic execution.sys.platform == 'win32'; on POSIX, it explicitly skips (SKIP: Win32 Job Object KILL_ON_JOB_CLOSE is Windows-only; skipped on POSIX). Linux CI proves only that the CLI contracts and stub process lifecycle execute cross-platform.lambda s, f: sys.exit(0)) is tested against stub child processes simulating ASGI lifespan teardown; full end-to-end Uvicorn integration remains an offline stub prototype in this PR.ods/experimental/windows-supervisor/README.md(verified to exist in tree).