New core spec apps/desktop/e2e/core/local-gateway-attach.spec.ts. It starts
`hermes gateway run` first (detached, windowless, as a login item or console
leaves it). Then it opens Desktop twice and checks each launch:
- it attaches through Electron main's real path: `hermes gateway ensure`,
then the ticket mint (the SID-checked named pipe through the runtime
helper on Windows, the private control socket elsewhere);
- the connection descriptor is local loopback;
- gateway_state.json and the process census name the pre-started pid and
only it;
- a turn completes against the scripted provider and passes the transcript
oracle (launch 2 resumes the session and adds a turn);
- Electron main exits on quit and the gateway it did not start keeps
running.
`hermes gateway stop` then ends it. HERMES_E2E_PACKAGED_EXE runs the same spec
against a packaged build.
.github/workflows/windows-desktop-attach-e2e.yml runs it on
blacksmith-32vcpu-windows-2025 (workflow_dispatch, or a push to
wine2e-desktop/**, which nothing else listens to): first on the dev tree,
then on `electron-builder --dir --win` output of the same commit.
Verified locally on Linux (Xvnc), both census modes (procfs and
HERMES_E2E_PROC_CENSUS=ps, the path Windows takes): 1 passed each.
Refs #134889 (W3)
Refs #140337