Skip to content

The agent that grows with you

fix(backup): make the socket test runner-safe and document the new exclusions

teknium1b97ae5c9b8c9
diff --git a/tests/hermes_cli/test_backup.py b/tests/hermes_cli/test_backup.py
index 9a1cc9c4718..57ff336dc88 100644
--- a/tests/hermes_cli/test_backup.py
+++ b/tests/hermes_cli/test_backup.py
@@ -279,14 +279,16 @@ class TestIterBackupFiles:
assert "hermes-agent" in skipped
@pytest.mark.linux_only
- def test_skips_unix_sockets(self, tmp_path):
+ def test_skips_unix_sockets(self, tmp_path, monkeypatch):
from hermes_cli.backup import _iter_backup_files
root = tmp_path / ".hermes"
root.mkdir()
- socket_path = root / "gateway.sock"
+ # AF_UNIX paths are capped at ~108 bytes; pytest's tmp_path overflows that under the
+ # test runner's deep temp root, so bind by a relative name from inside ``root``.
+ monkeypatch.chdir(root)
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as gateway_socket:
- gateway_socket.bind(str(socket_path))
+ gateway_socket.bind("gateway.sock")
selected = {str(rel) for _, rel in _iter_backup_files(root, tmp_path / "out.zip")}
diff --git a/website/docs/reference/cli-commands.md b/website/docs/reference/cli-commands.md
index 2fee9daf02b..bf2a75d7df4 100644
--- a/website/docs/reference/cli-commands.md
+++ b/website/docs/reference/cli-commands.md
@@ -980,6 +980,8 @@ The backup uses SQLite's `backup()` API for safe copying, so it works correctly
- `*.db-wal`, `*.db-shm`, `*.db-journal` — SQLite's WAL / shared-memory / journal sidecars. The `*.db` file already got a consistent snapshot via `sqlite3.backup()`; shipping the live sidecars alongside it would let a restore see a half-committed state.
- `checkpoints/` — per-session trajectory caches. Hash-keyed and regenerated per session; wouldn't port cleanly to another install anyway.
+- `cache/`, `models/`, `runtimes/`, `node/` at the root of `~/.hermes` (and of each `profiles/<name>/`) — regenerable downloads and tool caches, often tens of GB. Deeper directories with the same names (a skill's `cache/`) are kept.
+- Unix sockets, devices, and symlinks — a zip cannot hold them; before they were excluded, a stray `gateway.sock` made every full backup report `Backup incomplete`.
- The `hermes-agent` code itself (this is a user-data backup, not a repo snapshot).
### Examples