Import SSH recovery, cluster-named ad-hoc sessions, AUR packaging#3
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 newinternal/procpackage reads the pane's process subtree from the OS process table (ps, portable flags, best-effort): a window whose panes are all plainssh [user@]hostcollapses to a simple-modehosts:list, and any other ssh pane keeps its connection as acommands:entry. When process capture fails, import degrades to structure-only exactly as before.mox new @name names the session after the cluster
mox new @stagingused to createtmp-<timestamp>; now, when the sole argument is a configured session's cluster, the session takes that name — somox new @stagingandmox -a stagingrefer 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 testin check().aurspublisher formox-tmux-bin: activates only when anAUR_SSH_KEYrepo secret exists; until then releases skip the AUR step rather than failing (verified withgoreleaser check).