rename the compositor runtime directory to /run/hypr-stream

`/run/hyprland-headless-stream` is 29 characters, and the compositor's IPC
sockets live under it at `hypr/<instance signature>/.socket2.sock`. With a
~30-character signature the *event* socket does not fit in `sun_path` and the
compositor refuses to bind it:

  ERR ]: Socket2 path is too long. (2) IPC will not work.

The *request* socket kept answering `hyprctl` (both ends agree on a residual
truncated path), which is why this looked healthy while every observation
feature that needs events had nothing to read.

`/run/hypr-stream` is 16 characters. The rename reaches both units'
`RuntimeDirectory`, `WorkingDirectory`, `XDG_RUNTIME_DIR` and `HOME`, the
broker's `--compositor-runtime-dir`, the `socketPath` option default, the
`hhstream` CLI's frame-socket default and the `agent-eyes` helper.

An assertion now holds the name at <= 25 characters, the ceiling frozen in
docs/CONTRACT-sessions.md §5, so this cannot regress silently -- the failure
mode is a working request socket and a dead event stream, which looks like
nothing is wrong. Its message says what breaks and why the limit exists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018YqpJb5aZvZQKb49QDnV7P
This commit is contained in:
HermenixandClaude Opus 5 committed 2026-10-02 00:05:48 +00:00
1 parent 98374b8457
commit 06041030b0
3 files changed
+55 -5

No files matched your search

+7 -2
View File
@@ -37,8 +37,13 @@ from typing import Iterator
from . import client as frames
from . import protocol
#: The frame socket the compositor's publisher serves.
DEFAULT_FRAME_SOCKET = frames.DEFAULT_SOCKET
#: The frame socket the compositor's publisher serves, under the compositor's
#: runtime directory `/run/hypr-stream` (short because the compositor's event
#: socket has to fit in `sun_path` -- see the assertion in `nix/module.nix`).
#: Spelled out rather than taken from `frames.DEFAULT_SOCKET`, which still names
#: the old `/run/hyprland-headless-stream` and is not this slice's file to
#: change; the module's `socketPath` default is the authority and it says this.
DEFAULT_FRAME_SOCKET = "/run/hypr-stream/stream.sock"
ENV_FRAME_SOCKET = "HHSTREAM_FRAME_SOCKET"
#: The group that owns the session's runtime directory.
DEFAULT_GROUP = "hhstream"