move every live default to /run/hypr-stream, and resolve the slices' contract gaps
Slice A renamed the runtime directory in the module, but the old path was still live in the code and checks it does not own, so the VM gates pointed at a directory the module no longer creates. This moves the 21 remaining live occurrences (client/server defaults, the unit tests that pin them, all three VM checks, the diagnostics script, both READMEs) and deliberately leaves the three mentions that are history rather than configuration: the plan's problem statement, module.nix's note about the previous name, and cli.py's explanation for spelling its default out. Also here: docs/CONTRACT-sessions.md is now v2 with every gap the four slices reported resolved as a decision (Monitor.id, stable_id, pid -1, Event.data, mark(), the quarantine argv type, the corrected wlr XML path, and the state dir/frame socket rows), and docs/CONTRACT.md is v2 because its documented socket default moved -- wire format unchanged. Two comments that stated the old, wrong diagnosis (a 'misnamed' IPC socket) now state the measured one: the event socket did not fit in sun_path.
This commit is contained in:
1 parent
d45219994e
commit
e8b3855a05
15 files changed
+102
-35
No files matched your search
@@ -42,7 +42,7 @@ ls -l /dev/dri 2>&1 || echo "[no /dev/dri: this machine has no DRM device at all
|
||||
run cat /proc/fb
|
||||
|
||||
say "socket and runtime directories"
|
||||
ls -la /run/hyprland-headless-stream 2>&1 || echo "[no /run/hyprland-headless-stream]"
|
||||
ls -la /run/hypr-stream 2>&1 || echo "[no /run/hypr-stream]"
|
||||
ls -la /run/user 2>&1 || echo "[no /run/user]"
|
||||
for d in /run/user/*; do
|
||||
[ -d "$d" ] && ls -la "$d" 2>&1
|
||||
@@ -56,7 +56,7 @@ say "wayland socket vs WAYLAND_DISPLAY"
|
||||
systemctl show -p Environment --value "$SERVICE_UNIT" 2>&1 \
|
||||
| tr ' ' '\n' | grep -E '^(WAYLAND_DISPLAY|XDG_RUNTIME_DIR)=' \
|
||||
|| echo "[no WAYLAND_DISPLAY/XDG_RUNTIME_DIR in the unit environment]"
|
||||
for d in /run/hyprland-headless-stream /run/user/*; do
|
||||
for d in /run/hypr-stream /run/user/*; do
|
||||
[ -d "$d" ] || continue
|
||||
found_sock=$(find "$d" -xdev -maxdepth 1 -name 'wayland-*' ! -name '*.lock' 2>/dev/null)
|
||||
if [ -n "$found_sock" ]; then
|
||||
|
||||
@@ -31,7 +31,7 @@ for _path in (str(_HERE), str(_SRC)):
|
||||
from hhstream.server import FrameServer # noqa: E402 (needs sys.path above)
|
||||
|
||||
#: The path named in docs/CONTRACT.md and in the module's option default.
|
||||
CONTRACT_SOCKET = "/run/hyprland-headless-stream/stream.sock"
|
||||
CONTRACT_SOCKET = "/run/hypr-stream/stream.sock"
|
||||
|
||||
# AF_UNIX addresses are capped near 108 bytes; a long tmp_path would fail with a
|
||||
# confusing OSError instead of the assertion the test is about.
|
||||
|
||||
@@ -54,7 +54,7 @@ def wait_for_socket(path: str, proc: subprocess.Popen, timeout: float = 10.0) ->
|
||||
|
||||
def test_server_defaults_match_the_contract():
|
||||
args = server.build_parser().parse_args([])
|
||||
assert args.socket == "/run/hyprland-headless-stream/stream.sock"
|
||||
assert args.socket == "/run/hypr-stream/stream.sock"
|
||||
assert (args.fps, args.format, args.capture_command) == (30, "png", None)
|
||||
assert server.DEFAULT_CAPTURE_COMMAND == ["grim", "-t", "png", "-"]
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ def test_main_rejects_a_negative_count(sock_path, capsys):
|
||||
|
||||
|
||||
def test_default_socket_matches_the_contract():
|
||||
assert client.DEFAULT_SOCKET == "/run/hyprland-headless-stream/stream.sock"
|
||||
assert client.DEFAULT_SOCKET == "/run/hypr-stream/stream.sock"
|
||||
assert client.build_parser().parse_args([]).socket == client.DEFAULT_SOCKET
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user