listen() bound wayland-N before calling listen, so the socket file existed while connect() still returned ECONNREFUSED. Tests that wait for the file then connect (TestPointerCLI, also seen on main run 1297) flaked in CI, and a client started at session start could hit the same window.
The socket is now bound as a hidden .wl-N, put in listening state, then renamed to wayland-N. Public paths too long for sun_path are rejected before any file is created.
Checks: make check, make race, make mocks-check, staticcheck ./..., TestPointerCLI x20, headless smoke test.
Not covered: Xwayland sockets bind before listening too; tracked separately.
Review (go-reviewer): GO-001 public path longer than sun_path accepted via the shorter staging name — fixed (validated before any file is created, boundary tests 107/108). GO-002 boundary test fragile on long TMPDIR and off by one — fixed (short /tmp root, exact 107 bytes).