Files
hermes-agent/apps
BearHuddleston cd2500abad fix(desktop): give the gateway ticket helper the launchers' bytecode cache
Since #141490 (dbfdfe5ec1), Desktop mints gateway tickets by running the
bundled payload's Python directly (`-P -u -c`) with PYTHONPATH only. The
bin/hermes launchers it otherwise spawns export PYTHONPYCACHEPREFIX
(${XDG_CACHE_HOME:-$HOME/.cache}/hermes-pycache, scripts/build/launchers.py),
so the CLI writes nothing into the app; the ticket helper had no prefix. On a
real Mac with the shipped Nov 10 canary, the helper's import block rewrote 94
stdlib pycs inside the signed app, after which codesign reported "file
modified" and spctl rejected it ("a sealed resource is missing or invalid").
The same spawn with the launchers' prefix wrote nothing into the app (99 pycs
went to the user cache) and both checks still passed.

payloadTicketRuntime now adds the prefix the POSIX launchers use, keeping a
user's own PYTHONPYCACHEPREFIX. On Windows it adds none, as the Windows
launcher does for a baked payload, whose install tree is read-only.

The other payload-Python spawns are the App Installer and Store update
checkers, both Windows-only. Everything else Desktop starts goes through the
bin/hermes launcher.
2026-11-12 22:34:16 -06:00
..