Repository navigation
fix(qsys-mac-installer): fail fast on headless-SSH .NET installs - #13
Merged
Merged
Conversation
The .NET runtime installer needs a macOS GUI (Aqua) session for its window; over a headless SSH login Wine's winemac.drv can't create one (nodrv_CreateWindow) and the runtime installs nothing. install_dotnet's landing assertion already catches this, but only after a ~250 MB download and two install attempts. Add a high-precision preflight probe (is_headless_ssh) that refuses up front only when we're confident it's headless: reached over SSH AND no user owns the GUI console (/dev/console == root). A local Terminal, a screen-sharing/VNC session, and the GUI app path all read as NOT headless, so a working setup is never false-blocked. QSYS_ASSUME_GUI=1 overrides. `launchctl managername` was rejected because it returns "Background" in a plain local Terminal too. The install_dotnet assertion stays as the correctness backstop. Adds a hermetic test (mocks console owner via a PATH stat shim, varies SSH_CONNECTION) covering all three paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
reowens
added a commit
that referenced
this pull request
Jul 28, 2026
Ships the installer fixes that landed after 0.1.6: - fail-fast pre-flight for headless-SSH .NET installs (#13, 85d3950) - MSI path containment, allowlisted provisioning env, launcher WINEDLLOVERRIDES parity (7a20a2c — audit QTA-01/06/11) Bumps both bundle plists, the generated launcher plist in lib/recipe.sh, and the README release link to 0.1.7. DMG sha256 5968ff8d7a58cee2d247773069b347a885305aa7a3cbfd2f729730564e481998 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Problem
The .NET runtime installer needs a macOS GUI (Aqua) session to create its window. Over a headless SSH-only login, Wine's
winemac.drvcan't reach one (nodrv_CreateWindow), so the runtime installs nothing.install_dotnet's landing assertion already catches this — but only after a ~250 MB download and two install attempts.Change
Add a high-precision preflight probe
is_headless_ssh()topreflight()that refuses up front, and only when we're confident it's headless:SSH_CONNECTION/SSH_TTYset), and/dev/consoleowned byroot).So a local Terminal (no
SSH_CONNECTION), a screen-sharing/VNC session (owns the console), and the GUI app path (Provisioner →provision.sh, SSH unset) all read as NOT headless — a working setup is never false-blocked.QSYS_ASSUME_GUI=1overrides. Theinstall_dotnetlanding assertion stays as the correctness backstop.launchctl managername == Aquawas rejected during verification: it returnsBackgroundin a plain local Terminal too, which would hard-block valid local runs — a regression worse than the status quo.Tests
Adds a hermetic test in
scripts/test.sh(mocks the console owner via a PATHstatshim, variesSSH_CONNECTION) asserting the probe fires on SSH + unowned console, stays silent on local and screen-sharing sessions, and honors the override. Fulltest.shsuite green locally including the Xcode build legs.Verification
QSYS_ASSUME_GUI=1🤖 Generated with Claude Code