fix(windows): launch commands on the interactive desktop

This commit is contained in:
cabbage committed 2026-10-27 18:35:29 +00:00
1 parent 30e7bb8545
commit 8d28925e44
20 files changed
+1036 -28

No files matched your search

+49
View File
@@ -216,6 +216,55 @@ Windows console test executable. Inspect the persisted typed loss event itself
when checking evidence: the existing server's GetOutput summary does not yet
derive its incomplete flag/stream details from every incoming peer loss marker.
### Interactive command desktop and visible-window regression checks
`HP-DESKTOP-01` and `BH-DESKTOP-01/02` cover every context's desktop placement,
nonzero-session requirements, rejection of secure/other desktop targets, and
bounded launcher-abort diagnostics. The Windows implementation sets the fixed
interactive target on launcher/shell/signal helper, checks the actual desktop
and GUI access in that selected session, and creates a headless command console
with normal GUI startup visibility. No public protocol fields are added.
`HP-DESKTOP-02` probes actual desktop access from an interactive test thread.
Native `HP-DESKTOP-03/04` require a disposable LocalSystem test process, one
usable unlocked active desktop, and `RVBOX_NATIVE_GUI_PROBE` pointing to the
bundled `skills/rvbox/scripts/windows_gui_probe.ps1` at a user-readable guest
path. Put the console test executable itself at a user-readable test-only path.
It dispatches its child launcher/signal-helper to the production entrypoints.
Build in Docker:
```sh
docker compose -f deploy/compose.yaml run --rm toolchain \
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go test -c \
-o .test-runs/RUN/supervisor.test.exe ./internal/client/supervisor/windows
```
Run native `TestNativeLauncherShowsGUIOnSelectedDesktop` and
`TestNativeHeadlessConsoleStillReceivesTERM` through the fixture's LocalSystem
route with `-test.v -test.timeout 120s`; a skip is not native evidence. The
former uses normal CMD-wrapper execution at both privilege levels and requires
the probe's actual window-visible/input-desktop report. The latter prepares
PowerShell directly through the production launcher (avoiding cmd batch-abort
semantics), waits for its controlled handler, then requires authenticated TERM
delivery without forced escalation plus `RVBOX_CTRL_BREAK_OBSERVED` output.
The fixture uses process-scoped PowerShell execution policy only for its known
diagnostic script; no machine/user policy is rewritten.
`scripts/windows/native-test run --run-id ID` now automatically bundles,
transfers and checksums the probe, and executes it through the production-shaped
Linux Compose server and SCM daemon for active-user, active-user-elevated, and
forced active-system. It requires remote success plus JSON evidence of a real
window on WinSta0/Default/input Default and a hidden console, retaining
`gui-CONTEXT.log/.stat` in that run's artifact directory. The prepared console
must be unlocked; Session 0/locked/ambiguous sessions do not substitute for this
test. Existing collect/reset/purge workflows include the probe and its artifacts.
For a physical-machine visual test, use the standalone probe and commands in
[the RVBox advanced GUI guide](../skills/rvbox/references/windows-gui.md).
Installer v12 and probe/native tests remain pending Windows execution while
Helium is offline. PowerShell syntax/C# binding compilation and Windows test
cross-compilation do not prove the affected uninstallers' dialogs now appear.
### Focused native tray and installer regression checks
`internal/client/windowstray/native_windows_test.go` contains real Win32 tests,