fix(paths): resolve the herdr socket under the host-root run dir #38

Merged
clawdie merged 2 commits from fix/socket-under-host-root into main 2026-10-05 15:17:10 +02:00
Owner

What

A socket does not belong in a config directory.

internal/paths/paths.go: CanonicalSocketPath now resolves under RunDir() —
<CLAWDIE_HOST_ROOT>/run when a host root is set, else $XDG_RUNTIME_DIR/herdr,
else /tmp/herdr-<uid> — instead of ~/.config/herdr/herdr.sock. Explicit
sessionName and the HERDR_SOCKET_PATH / HERDR_SESSION overrides are
unchanged.

Tests

  • go test ./internal/paths/ → ok, incl. new TestSocketPathNotInConfigDir
    (regression guard) and TestSocketPathRuntimeDir.
  • go vet ./internal/paths/ and gofmt clean; go build ./internal/... ok.
    (go build ./... links libghostty-vt.a, absent in this env — pre-existing.)

Rule: colibri docs/wiki/host-paths.md (light mode = host root; hive = colibri service).

## What A socket does not belong in a config directory. `internal/paths/paths.go`: `CanonicalSocketPath` now resolves under `RunDir()` — `<CLAWDIE_HOST_ROOT>/run` when a host root is set, else `$XDG_RUNTIME_DIR/herdr`, else `/tmp/herdr-<uid>` — instead of `~/.config/herdr/herdr.sock`. Explicit `sessionName` and the `HERDR_SOCKET_PATH` / `HERDR_SESSION` overrides are unchanged. ## Tests - `go test ./internal/paths/` → ok, incl. new `TestSocketPathNotInConfigDir` (regression guard) and `TestSocketPathRuntimeDir`. - `go vet ./internal/paths/` and `gofmt` clean; `go build ./internal/...` ok. (`go build ./...` links `libghostty-vt.a`, absent in this env — pre-existing.) Rule: colibri `docs/wiki/host-paths.md` (light mode = host root; hive = colibri service).
fix(paths): resolve the herdr socket under the host-root run dir
Some checks failed
go-ci / linux (build, vet, test) (pull_request) Failing after 1m58s
verify-evidence / verify evidence reports (pull_request) Successful in 3s
e26dda5ced
A socket does not belong in a config directory. CanonicalSocketPath now
resolves under RunDir(): <CLAWDIE_HOST_ROOT>/run when a host root is set, else
$XDG_RUNTIME_DIR/herdr, else /tmp/herdr-<uid>. Explicit sessionName and the
HERDR_SOCKET_PATH/HERDR_SESSION overrides are unchanged.

Adds TestSocketPathNotInConfigDir (regression guard) and TestSocketPathRuntimeDir.
See colibri docs/wiki/host-paths.md for the light-mode vs hive rule.
chore: gofmt internal/wire (pre-existing drift on main)
Some checks failed
go-ci / linux (build, vet, test) (pull_request) Failing after 1m45s
verify-evidence / verify evidence reports (pull_request) Successful in 2s
af6c8234d0
rect.go, wire.go and wire_test.go (from 410e816) were unformatted on main,
which red-lights the repo-wide gofmt check for every PR. Whitespace only.
clawdie deleted branch fix/socket-under-host-root 2026-10-05 15:17:10 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clawdie/bherdr!38
No description provided.