Skip to content

feat(host): old Rust hosts no longer pile up on ssh machines (#76) - #156

Merged
cachewraith merged 1 commit into
mainfrom
feat/remote-host-cleanup-20261027
Oct 27, 2026
Merged

cachewraith merged 1 commit into
mainfrom
feat/remote-host-cleanup-20261027

Conversation

@cachewraith

Copy link
Copy Markdown
Owner

A machine reached over ssh got a new ~/.wraithgrid/bin/wraithgrid-host-<version> on every Wraithgrid update and kept all of them (#76 leftover from phase 5).

  • Mark in use: each connect's preflight now touches this version's binary when it finds it there, so its date says when it was last used.
  • Clean up: the same preflight deletes other versions unused for 30 days (find … -mtime +30 -delete, errors ignored). Not "all other versions": two Wraithgrid versions sharing one machine (two laptops) would then delete each other's and copy theirs over again on every connect. A host still running a deleted binary keeps running, since Linux keeps the file open for it.
  • command find: commands on the machine run in the user's own shell and config, and a fish function can shadow find (this dev machine's does, which the new test caught). Noted in docs/CONTEXT.md's gotchas.

Tests: the new unit test runs the real preflight in sh and fish against a fake ~/.wraithgrid/bin: the stale version goes, a recently used one stays, the current one is touched. Also typecheck, lint, 493 unit tests, machines.spec.ts e2e.

Refs #76

🤖 Generated with Claude Code

Each connect touches this version's ~/.wraithgrid/bin/wraithgrid-host-<v>
(its date says when it was last used) and deletes other versions unused
for 30 days, so two Wraithgrid versions sharing a machine don't copy
theirs over again on every connect. A host still running a deleted
binary keeps running. `command find`, since a fish config can shadow
find; the new test runs the command for real in sh and fish.

Refs #76

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cachewraith
cachewraith merged commit fd0ecac into main Oct 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant