Repository navigation
refactor(cmd): share spored-SSH options via helper (#303) - #358
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The four non-interactive spored-over-SSH call sites (status/config/extend/ queue) each repeated the same four ssh -o options. Extract them into a sporedSSHOptions() helper in cmd/utils.go; each site keeps its own -i key handling, host, and trailing command (queue still appends -i only when a key resolves). The interactive connect path and the launch/plugin SSH paths are deliberately left alone — they layer on ControlMaster / accept-new / BatchMode for their own reasons. Closes #303.
scttfrdmn
force-pushed
the
refactor/303-spored-ssh-helper
branch
from
July 15, 2026 20:29
efe01e7 to
bdd97a8
Compare
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.
Extracts the duplicated SSH
-ooption block from the four non-interactive spored-exec call sites into a singlesporedSSHOptions()helper (cmd/utils.go).Sites converted
cmd/status.go—spored statusover SSHcmd/config.go—spored config get/set/listcmd/extend.go—spored reloadcmd/queue.go— remotecatof the queue state fileEach site keeps its own
-i keyPathhandling,ec2-user@host, and trailing command.queuestill appends-ionly when a key resolves.Left alone (by design)
cmd/connect.go— interactive session, addsControlMaster=no/ControlPath=nonecmd/launch.go— addsControlMaster=nopkg/plugin/push_ssh.go/cmd/plugin.go—accept-new+BatchMode=yes(different security posture)Verification
go build ./...clean,gofmt/go vetcleango test ./cmdgreen except the pre-existingTestCatalogValid(feat(plugin): permissions declaration block (#388) #392, private catalog images — fails identically on main, unrelated)Closes #303.