mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
fix(file-sync): resolve 4 bugbot findings in sync-back
1. Tar paths now match _pushed_hashes keys — backends tar from / so entries have full absolute paths (e.g. root/.hermes/skills/f.py) instead of relative ./skills/f.py that never matched hash lookups 2. _infer_host_path simplified — removed broken grandparent match that computed garbled suffixes for new remote files 3. Lock path uses get_hermes_home() instead of Path.home() — fixes wrong lock path when HERMES_HOME is overridden or using profiles 4. SIGINT trap guarded by threading.current_thread() check — skips signal.signal() on non-main threads (gateway workers) instead of crashing with ValueError on every retry attempt
This commit is contained in:
parent
37c478cf2f
commit
a562550af3
5 changed files with 38 additions and 28 deletions
|
|
@ -115,7 +115,8 @@ class TestSSHBulkDownload:
|
|||
cmd = mock_run.call_args[0][0]
|
||||
cmd_str = " ".join(cmd)
|
||||
assert "tar cf -" in cmd_str
|
||||
assert "/home/testuser/.hermes" in cmd_str
|
||||
assert "-C /" in cmd_str
|
||||
assert "home/testuser/.hermes" in cmd_str
|
||||
assert "ssh" in cmd_str
|
||||
assert "testuser@example.com" in cmd_str
|
||||
|
||||
|
|
@ -250,7 +251,7 @@ class TestModalBulkDownload:
|
|||
assert args[0] == "bash"
|
||||
assert args[1] == "-c"
|
||||
assert "tar cf -" in args[2]
|
||||
assert "-C /root/.hermes" in args[2]
|
||||
assert "-C / root/.hermes" in args[2]
|
||||
|
||||
def test_modal_bulk_download_writes_to_dest(self, tmp_path):
|
||||
"""Downloaded tar bytes should be written to the dest path."""
|
||||
|
|
@ -368,7 +369,7 @@ class TestDaytonaBulkDownload:
|
|||
env._daytona_bulk_download(dest)
|
||||
|
||||
exec_cmd = env._sandbox.process.exec.call_args[0][0]
|
||||
assert "/home/daytona/.hermes" in exec_cmd
|
||||
assert "home/daytona/.hermes" in exec_cmd
|
||||
|
||||
|
||||
class TestDaytonaCleanup:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue