fix(scripts): skip the portal probe on niri in inject-probe

The injector never offers the RemoteDesktop portal on niri, but inject-probe
ran the portal probe unguarded and reported portal_available: true there.
The probe now reuses the injector's _is_niri_session guard: on niri it skips
the portal and reports portal_skip_reason "niri" with portal_available false.
Off niri the probe runs and reports its answer as before.

Fixes #46
This commit is contained in:
2026-11-06 23:50:46 +05:30
parent a4a831c3c6
commit 3776c4de6e
3 changed files with 114 additions and 14 deletions
+6 -4
View File
@@ -63,10 +63,12 @@ with the installed build's interpreter.
version-probe result and timing, then a session-establishment attempt
(fast failure versus hang matters more than the version answer), plus
the resolved first rung and a no-emission `wtype ""` spawn cost as a
lower bound. End-to-end key-to-screen latency is deliberately not
taken here: emitting keystrokes into a live desktop from a background
run would disturb the session. It belongs to the hardware checklist
with a dedicated target window.
lower bound. On niri the portal probe is skipped, as the injector skips
it, and the report says so with `portal_skip_reason: "niri"` and
`portal_available: false`. End-to-end key-to-screen latency is
deliberately not taken here: emitting keystrokes into a live desktop
from a background run would disturb the session. It belongs to the
hardware checklist with a dedicated target window.
- **Thresholds for the model ladder:** derive free-memory cutoffs from
the maximum observed per-rung footprint (transcribe peak, not just
load) plus explicit headroom for the compositor and other GPU