Skip to content

fix(qsys-mac-installer): probe loopback for real instead of inferring it - #14

Merged
reowens merged 2 commits into
mainfrom
fix/loopback-probe
Jul 28, 2026
Merged

reowens merged 2 commits into
mainfrom
fix/loopback-probe

Conversation

@reowens

@reowens reowens commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Blocked 127.0.0.1 is the most confusing failure this wrapper produces: CEF and the embedded server ride loopback, so the Monaco script editor, help, and splash panes render blank with no error anywhere.

The existing advisory inferred this from Little Snitch being installed, and only in the installer's .idle state. That meant it:

  • fired for every Little Snitch user whether or not anything was actually blocked (noise → learned to ignore),
  • said nothing about LuLu, Radio Silence, pf rules, or an MDM-pushed firewall,
  • was absent from the surface a user with blank panes actually reaches — the installer app may well be in the trash by then.

Changes

  • qsys-mac doctor gains a TCP loopback line backed by a real probe (bind a listener, connect to it). doctor is the support-diagnostics surface someone with blank panes is pointed at.
  • EnvChecks gains the same probe via POSIX sockets on port 0 (kernel-assigned, so it cannot collide with anything in use). A measured block now leads; the Little Snitch notice becomes the fallback and is reworded — loopback working for the installer does not mean it works for Designer, because these filters are per-process.
  • Stays an advisory, not a blocker: provisioning and launch still work, only the web panes break, so it must not gate the install.

Fails safe

Both probes report inconclusive for every outcome they can't confirm, never blocked — the tool must not send someone hunting a firewall problem they don't have.

Two traps found while building this, both now covered by a hermetic test in scripts/test.sh:

  1. nc -l lingers instead of exiting when a port is already taken (verified on macOS 26), so process-is-alive is not a bind test. The bash probe confirms LISTEN via lsof before drawing any conclusion.
  2. A busy probe port is not evidence of blocking — if the connect still succeeds, loopback is demonstrably fine. That case must stay ok.

No python3: the native-helper work removed that runtime dependency and this deliberately does not reintroduce it.

Verification

  • scripts/test.sh — all checks pass, including the new probe test (ok / busy-ports-still-ok / inconclusive branches).
  • Swift Launcher + Installer both build.
  • Repo pnpm run typecheck + pnpm test green.

Note: this ships to users only with a new signed DMG (qsys-mac-installer 0.1.8) + a qsys-mac DEFAULT_RELEASE bump — merged-but-unshipped until then.

🤖 Generated with Claude Code

reowens and others added 2 commits July 28, 2026 00:29
Blocked 127.0.0.1 is the most confusing failure this wrapper produces: CEF and
the embedded server ride loopback, so the Monaco script editor, help, and splash
panes render BLANK with no error anywhere. The existing advisory only inferred
this from Little Snitch being *installed*, and only in the installer's idle
state — so it fired for every LS user whether or not anything was blocked, said
nothing about LuLu / Radio Silence / pf / MDM firewalls, and was absent from the
surface a user with blank panes actually reaches.

- qsys-mac doctor gains a "TCP loopback" line backed by a real probe (bind a
  listener, connect to it). doctor is where someone with blank panes is sent,
  and the installer app may well be in the trash by then.
- EnvChecks gains the same probe via POSIX sockets on port 0 (kernel-assigned,
  so it cannot collide). A measured block now leads; the Little Snitch notice
  is the fallback and is reworded — loopback working for the installer does not
  mean it works for Designer, because these rules are per-process.
- Stays an advisory, not a blocker: provisioning and launch still work, only the
  web panes break, so it must not gate the install.

Both probes fail SAFE — every inconclusive outcome reports "inconclusive", never
"blocked", so the tool never sends someone hunting a firewall problem they don't
have. Two traps found while building this and now covered by a hermetic test:
`nc -l` LINGERS rather than exiting when a port is taken (so process-alive is
not a bind test — the bash probe confirms LISTEN via lsof), and a busy probe
port is not evidence of blocking (loopback is demonstrably fine if the connect
still succeeds).

No python3: the native-helper work removed that runtime dependency and this
deliberately does not reintroduce it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The 'two things that bite' section described the symptom but gave no way to
confirm it. Blank Monaco/help panes look exactly like a render bug, so the
troubleshooting path now names 'qsys-mac doctor' → Host → TCP loopback, and
states what the verdicts mean: BLOCKED is definite, inconclusive is not an
accusation, and 'ok' only covers the helper because these rules are per-process.

Also drops the Little-Snitch-specific framing where it was misleading — the
probe covers LuLu, Radio Silence, pf, and MDM firewalls too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@reowens
reowens merged commit 115d60e into main Jul 28, 2026
3 checks passed
@reowens
reowens deleted the fix/loopback-probe branch July 28, 2026 08:10
reowens added a commit that referenced this pull request Jul 28, 2026
Ships the loopback probe merged in #14 (squash 115d60e): `qsys-mac doctor`
gains a "TCP loopback" line backed by a real bind+connect probe, and the
installer's setup UI leads with a measured block instead of inferring one from
Little Snitch being installed.

Bumps both bundle plists, the generated launcher plist in lib/recipe.sh, and the
README release link to 0.1.8.

DMG sha256 b5c95937aeb3ce925b3c38216eb644b10fa83c2ab4c2c51f4e88213d65fba133

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
reowens added a commit that referenced this pull request Jul 28, 2026
Points DEFAULT_RELEASE at the qsys-mac-installer 0.1.8 signed DMG
(sha256 b5c95937aeb3ce925b3c38216eb644b10fa83c2ab4c2c51f4e88213d65fba133)
and bumps CLI_VERSION, the manifest, the README, and the CHANGELOG.

That DMG carries the loopback probe from #14: `qsys-mac doctor` gains a
"TCP loopback" line, so a blocked 127.0.0.1 — which renders Designer's script
editor, help, and splash panes blank with no error — is finally diagnosable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant