git -C projects/dotfiles status --short reports two untracked herdr runtime artifacts (home/.config/herdr/herdr.sock.agent, home/.config/herdr/session-snapshots/), and the directory also holds live herdr.sock / herdr-client.sock, herdr-server.log, .plugins.lock and session.json beside the tracked config.toml. The clone reads permanently dirty and keeps falling behind.
Root cause
herdr derives its runtime state from $HOME/.config/herdr (src/config/io.rsconfig_dir()), and the default session directory is that same config directory (src/session.rsdata_dir_for()). Sockets, logs, .plugins.lock, session.json, session-snapshots/ and named sessions/ therefore land beside config.toml. HERDR_CONFIG_PATH relocates only the config file, not the state, and herdr has no state-directory option. home.nix symlinked the whole ~/.config/herdr directory into this repo, so herdr's state directory was the tracked tree.
Fix
home.nix links only ~/.config/herdr/config.toml, so ~/.config/herdr stays a real directory in $HOME and herdr's state resolves outside the repo.
home.activation.herdrConfigDir runs in the write phase (after writeBoundary, before linkGeneration). It migrates the old whole-directory symlink and removes the known leaked runtime artifacts by name. config.toml and any other repo content are never touched; the removals are run-guarded (dry-run safe) and idempotent, and they do not stop or restart the running herdr server.
rebuild.sh follows the target move: ~/.config/herdr/config.toml is rotated as a managed file backup target, and ~/.config/herdr is dropped from the directory-target rotation so a real config.toml cannot later fail checkLinkTargets on config.toml.backup.
AGENTS.md records the deliberate decision.
Scope
The same class of problem exists in the Beacon clone (.backpassrc.json) and for ~/.config/beets/state.pickle; both are out of scope here.
Validation
no-mistakes pipeline on head 2bcaf5fd: outcome passed (intent, rebase, review, test, document, lint, push; pr and ci skipped because this forge is Gitea). No open findings.
The symlink migration was reproduced against home-manager's real generated activate / link scripts: without the migration step home-manager moves the repo's tracked config.toml to config.toml.backup; with it the repo stays clean and herdr's reported session_dir is outside the tree.
Effect is on the next rebuild plus the first natural herdr start; the running server is not driven, and already-leaked artifacts are cleared by the activation.
## Problem
`git -C projects/dotfiles status --short` reports two untracked herdr runtime artifacts (`home/.config/herdr/herdr.sock.agent`, `home/.config/herdr/session-snapshots/`), and the directory also holds live `herdr.sock` / `herdr-client.sock`, `herdr-server.log`, `.plugins.lock` and `session.json` beside the tracked `config.toml`. The clone reads permanently dirty and keeps falling behind.
## Root cause
herdr derives its runtime state from `$HOME/.config/herdr` (`src/config/io.rs` `config_dir()`), and the default session directory is that same config directory (`src/session.rs` `data_dir_for()`). Sockets, logs, `.plugins.lock`, `session.json`, `session-snapshots/` and named `sessions/` therefore land beside `config.toml`. `HERDR_CONFIG_PATH` relocates only the config file, not the state, and herdr has no state-directory option. `home.nix` symlinked the whole `~/.config/herdr` directory into this repo, so herdr's state directory *was* the tracked tree.
## Fix
- `home.nix` links only `~/.config/herdr/config.toml`, so `~/.config/herdr` stays a real directory in `$HOME` and herdr's state resolves outside the repo.
- `home.activation.herdrConfigDir` runs in the write phase (after `writeBoundary`, before `linkGeneration`). It migrates the old whole-directory symlink and removes the known leaked runtime artifacts by name. `config.toml` and any other repo content are never touched; the removals are `run`-guarded (dry-run safe) and idempotent, and they do not stop or restart the running herdr server.
- `rebuild.sh` follows the target move: `~/.config/herdr/config.toml` is rotated as a managed file backup target, and `~/.config/herdr` is dropped from the directory-target rotation so a real `config.toml` cannot later fail `checkLinkTargets` on `config.toml.backup`.
- `AGENTS.md` records the deliberate decision.
## Scope
The same class of problem exists in the Beacon clone (`.backpassrc.json`) and for `~/.config/beets/state.pickle`; both are out of scope here.
## Validation
- no-mistakes pipeline on head `2bcaf5fd`: outcome `passed` (intent, rebase, review, test, document, lint, push; `pr` and `ci` skipped because this forge is Gitea). No open findings.
- The symlink migration was reproduced against home-manager's real generated `activate` / `link` scripts: without the migration step home-manager moves the repo's tracked `config.toml` to `config.toml.backup`; with it the repo stays clean and herdr's reported `session_dir` is outside the tree.
- Effect is on the next rebuild plus the first natural herdr start; the running server is not driven, and already-leaked artifacts are cleared by the activation.
herdr resolves its config directory as ~/.config/herdr and writes all of its
runtime state beside config.toml: herdr.sock, herdr-client.sock,
herdr-server.log, .plugins.lock, session.json and session-snapshots/. It offers
no option to relocate that directory, so linking the whole directory into this
repo made ~/.config/herdr resolve into the tracked tree and left every clone
permanently dirty with herdr's live sockets and snapshots.
Link only config.toml and let ~/.config/herdr be a real directory, so herdr's
state lands in $HOME instead of the working tree.
home-manager links a file by resolving the existing directory symlink, which
would move this repo's own tracked config.toml to config.toml.backup and leave
a symlink inside the tree. Add a one-time activation step that drops the stale
symlink before home-manager checks link targets; it is a no-op once
~/.config/herdr is a real directory.
~/.config/herdr moved from a whole-directory home.file target to a file
target, so rebuild.sh must follow. Treat ~/.config/herdr/config.toml as a
managed file backup target and stop listing ~/.config/herdr as a directory
target, otherwise a real config.toml backed up to config.toml.backup would
fail the next switch with "would be clobbered".
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
git -C projects/dotfiles status --shortreports two untracked herdr runtime artifacts (home/.config/herdr/herdr.sock.agent,home/.config/herdr/session-snapshots/), and the directory also holds liveherdr.sock/herdr-client.sock,herdr-server.log,.plugins.lockandsession.jsonbeside the trackedconfig.toml. The clone reads permanently dirty and keeps falling behind.Root cause
herdr derives its runtime state from
$HOME/.config/herdr(src/config/io.rsconfig_dir()), and the default session directory is that same config directory (src/session.rsdata_dir_for()). Sockets, logs,.plugins.lock,session.json,session-snapshots/and namedsessions/therefore land besideconfig.toml.HERDR_CONFIG_PATHrelocates only the config file, not the state, and herdr has no state-directory option.home.nixsymlinked the whole~/.config/herdrdirectory into this repo, so herdr's state directory was the tracked tree.Fix
home.nixlinks only~/.config/herdr/config.toml, so~/.config/herdrstays a real directory in$HOMEand herdr's state resolves outside the repo.home.activation.herdrConfigDirruns in the write phase (afterwriteBoundary, beforelinkGeneration). It migrates the old whole-directory symlink and removes the known leaked runtime artifacts by name.config.tomland any other repo content are never touched; the removals arerun-guarded (dry-run safe) and idempotent, and they do not stop or restart the running herdr server.rebuild.shfollows the target move:~/.config/herdr/config.tomlis rotated as a managed file backup target, and~/.config/herdris dropped from the directory-target rotation so a realconfig.tomlcannot later failcheckLinkTargetsonconfig.toml.backup.AGENTS.mdrecords the deliberate decision.Scope
The same class of problem exists in the Beacon clone (
.backpassrc.json) and for~/.config/beets/state.pickle; both are out of scope here.Validation
2bcaf5fd: outcomepassed(intent, rebase, review, test, document, lint, push;prandciskipped because this forge is Gitea). No open findings.activate/linkscripts: without the migration step home-manager moves the repo's trackedconfig.tomltoconfig.toml.backup; with it the repo stays clean and herdr's reportedsession_diris outside the tree.