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:
Hermenix committed 2026-10-02 18:11:46 +00:00
1 parent d45219994e
commit e8b3855a05
15 files changed
+102 -35

No files matched your search

+10 -3
View File
@@ -1,4 +1,11 @@
# Wire contract (v1)
# Wire contract (v2)
**v2 changes nothing on the wire.** The published socket's documented *default*
moved from `/run/hyprland-headless-stream/stream.sock` to
`/run/hypr-stream/stream.sock`: the old runtime directory pushed the compositor's
own IPC *event* socket past `sun_path`'s 108-byte limit, so it never bound (see
`docs/CONTRACT-sessions.md` §5). Message sequence, framing and failure semantics
are unchanged, so a v1 reader is still a correct reader.
This file is the interface. Code on either side may change freely; **this
document may not**, without bumping the version.
@@ -7,7 +14,7 @@ document may not**, without bumping the version.
- Transport: `AF_UNIX`, `SOCK_STREAM`.
- Path: whatever `services.hyprland-headless-stream.socketPath` says.
Default `/run/hyprland-headless-stream/stream.sock`.
Default `/run/hypr-stream/stream.sock`.
- Ownership: the service user (`user` option, default `hhstream`), mode `0660`.
- The server accepts **any number of concurrent clients**. Each client gets its
own copy of the header and of every subsequent frame. A client disconnecting
@@ -78,7 +85,7 @@ Namespace: `services.hyprland-headless-stream`
| Option | Type | Default | Meaning |
|---|---|---|---|
| `enable` | bool | `false` | turn everything on |
| `socketPath` | str | `/run/hyprland-headless-stream/stream.sock` | published socket |
| `socketPath` | str | `/run/hypr-stream/stream.sock` | published socket |
| `user` / `group` | str | `hhstream` | owner of the session and the socket |
| `frameRate` | int | `30` | capture target, becomes `fps` in Hello |
| `format` | enum `png`/`jpeg` | `png` | frame encoding |