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:
alt-glitch 2026-04-11 18:06:15 -07:00
parent 37c478cf2f
commit a562550af3
5 changed files with 38 additions and 28 deletions

View file

@ -353,7 +353,7 @@ class ModalEnvironment(BaseEnvironment):
"""Download remote .hermes/ as a tar archive."""
async def _download():
proc = await self._sandbox.exec.aio(
"bash", "-c", "tar cf - -C /root/.hermes ."
"bash", "-c", "tar cf - -C / root/.hermes"
)
data = await proc.stdout.read.aio()
exit_code = await proc.wait.aio()