Repository navigation
feat(windows): run dashboard-api natively as a windows-desktop profile - #7970
Open
IronicRayquaza wants to merge 3 commits into
Open
IronicRayquaza wants to merge 3 commits into
IronicRayquaza wants to merge 3 commits into
Conversation
Add an opt-in ODS_RUNTIME_PROFILE=windows-desktop so dashboard-api can run as a native Windows process with no Docker, no WSL and no host agent. - Refuse to start without an absolute ODS_DATA_DIR and DASHBOARD_API_KEY; the generated-key fallback no longer writes to /data (C:\data on Windows). - Never dial a host agent: AGENT_URL is empty and the shared client raises AgentUnavailable before any socket, so a Docker or WSL ODS on the same PC cannot answer. - Start no child processes: GPU probes, the curl cluster refresh, Token Spy polling and the Docker preflight are skipped. A windowless process would otherwise flash a console every five seconds. - Load only loopback services, since Compose service names resolve to nothing on a native PC and each failed lookup stalls /api/status. - Report Windows CPU and RAM through kernel32 instead of None. - Add a path-filtered windows-latest workflow that installs the hashed lock wheels-only and runs the profile tests. Refs Osmantic#7968 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 tasks
mypy runs on Linux, where ctypes has no windll or WinError, so assert the Windows platform inside the two kernel32 readers. Count lock hashes in a typed dict instead of a dict mixing names and counters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mypy 2.4 does not treat an assert on sys.platform as unreachable, so define the two readers under a module-level sys.platform == "win32" branch, with stubs that raise OSError elsewhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 22, 2026
7 tasks done
Merged
6 of 24 tasks
8 of 21 tasks
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.
Summary
First milestone of #7968: run the real dashboard-api as a native Windows process, with no Docker, no WSL and no host agent.
ODS_RUNTIME_PROFILE=windows-desktopis opt-in. Without it, nothing changes for the Compose stack.On a native PC, the container defaults are wrong in ways that are easy to miss. This profile corrects each one:
Path("/data"), which isC:\data(the drive root)ODS_DATA_DIRandDASHBOARD_API_KEYfrom the launcherhost.docker.internal(orODS_AGENT_HOST) for the host agent, which can reach a different Docker or WSL ODS on the same PCAGENT_URLis empty.host_agent_clientraisesAgentUnavailablebefore any socket exists, and callers already map that to "unavailable"nvidia-smi,curlanddockerfrom its background loops; 8 child processes in 6 s in the probe below. A windowless app would flash a console for eachgpu.run_command, which returns "not measured"; the curl cluster refresh, Token Spy poll and Docker preflight are skipped/api/statustook 6.8 s/api/statustakes 63–74 msNoneGetSystemTimes/GlobalMemoryStatusEx, the same shape as/proc/api/statusnow includesruntimeProfile./api/preflight/dockerreturnsapplicable: falsein this profile.A new
windows-desktop.ymlworkflow runs onwindows-latest, only whendashboard-api/**changes. It installsrequirements.lockthe way the Desktop installer will (--require-hashes --only-binary=:all:), so a lock without Windows wheels fails there. Then it runs the profile tests. The new tests also run in the existing Ubuntuapijob.AI Assistance
Claude Code drafted the code, tests and this description, and ran the validation below on my Windows 11 laptop. I chose the scope and design (see #7968), and I'm accountable for the diff and for responding to review.
Release Lane
release/2.6.xmainChanged Surface
Risk And Validation
Nonebefore.git diff --checkRun on an ordinary laptop: Windows 11 Home 26200, i5-10500H, 16 GB RAM, Intel UHD + RTX 3050 Laptop, Windows PowerShell 5.1, OneDrive-redirected Desktop, Python 3.13.
Full dashboard-api suite on Windows, one file per process, branch against main:
The extra branch failures, both in
test_status_cloud_mode.py, fail identically on main when run on their own (Statehas nocloud_telemetry_client; it is only set when another test happened to run the lifespan first). These are pre-existing isolation failures on Windows, not regressions. CI runs this suite on Ubuntu.Also pre-existing on Windows:
test_storage_collection.py::test_settings_reads_collect_once_across_timeoutshangs (3/3 runs on main and 3/3 on this branch). I'll report it separately.Operational Change Check
Dashboard API control flow is touched. In the default Compose profile, behavior is unchanged except native-Windows CPU/RAM reporting. No Compose fleet run was done for this PR.
Notes For Reviewers
.ps1changes./api/status(opencode,pixel-agent,tailscale) default tolocalhostand answer instantly as down or not deployed. PR4 hides them in the UI.powershell-lint (ubuntu-latest)fails in its Install PSScriptAnalyzer step, before any repository code runs. This PR has no.ps1changes. The same step has failed intermittently on other PRs (e.g. feat(windows): native Portal app with CPU/CUDA chat and documents #7938's Windows job). Contributors can't rerun it (Must have admin rights). Every other check passes, including mypy and the new Windowsdashboard-apijob.