Skip to content

Import SSH recovery, cluster-named ad-hoc sessions, AUR packaging#3

Merged
bthall merged 4 commits into
mainfrom
feat/pending-work
Jul 6, 2026
Merged

Import SSH recovery, cluster-named ad-hoc sessions, AUR packaging#3
bthall merged 4 commits into
mainfrom
feat/pending-work

Conversation

@bthall

@bthall bthall commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Lands three pieces of pending work, each verified with tests and lint-clean:

mox import recovers SSH connections

tmux only exposes a pane's command basename (ssh), not its arguments, so imports silently lost every host. A new internal/proc package reads the pane's process subtree from the OS process table (ps, portable flags, best-effort): a window whose panes are all plain ssh [user@]host collapses to a simple-mode hosts: list, and any other ssh pane keeps its connection as a commands: entry. When process capture fails, import degrades to structure-only exactly as before.

mox new @name names the session after the cluster

mox new @staging used to create tmp-<timestamp>; now, when the sole argument is a configured session's cluster, the session takes that name — so mox new @staging and mox -a staging refer to the same thing.

Arch packaging

  • packaging/aur/PKGBUILD: source build from the release tarball — pinned sha256, PIE build (fixed a cgo/linkmode contradiction in the draft), go test in check().
  • goreleaser aurs publisher for mox-tmux-bin: activates only when an AUR_SSH_KEY repo secret exists; until then releases skip the AUR step rather than failing (verified with goreleaser check).
  • Fixed two goreleaser deprecations (archives.format, snapshot.name_template).

bthall added 4 commits July 6, 2026 16:05
tmux only reports a pane's command basename (ssh), not its arguments, so
imports used to lose every host. Read the pane's process subtree from the
OS process table (new internal/proc package): a window whose panes are
all plain 'ssh [user@]host' connections collapses to a simple-mode
hosts: list, and any other ssh pane keeps its full connection as a
commands: entry. Process capture is best-effort — when unavailable the
import degrades to structure-only as before.
'mox new @staging' used to create tmp-<timestamp>; when the sole
positional arg is a configured session's cluster, use that name so the
ad-hoc session and 'mox -a staging' refer to the same thing. Falls back
to the generated name in every other case.
packaging/aur/PKGBUILD builds mox-tmux from the release tarball (pinned
checksum, PIE build, tests run in check()). The release pipeline gains a
mox-tmux-bin AUR publisher that activates only when an AUR_SSH_KEY
repository secret exists — releases proceed without the AUR step until
then, so an unconfigured key can never break a release.
@bthall bthall merged commit 2f58760 into main Jul 6, 2026
5 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