You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--host means something different in cc-peer than in install.sh #24
$ cc-peer list --host web-01 --host db # → 'db' — last one wins, silently
$ ./install.sh --host web-01 --host db # → both — accumulates
Same project, same flag, opposite behaviour. install.sh documents the repeatable form in the README; cc_peer.py has no action="append", so argparse keeps the last value and discards the rest without a word.
Someone who learned the installer's syntax first types cc-peer list --host web-01 --host db, gets a clean listing of db, and never learns that web-01 was dropped.
The cost when it's the intended behaviour anyway
Checking a four-machine fleet means four invocations, each opening its own SSH connection (two, actually — see the version probe in cmd_list). Yesterday I hand-wrote a for loop three separate times to do this, and --json doesn't help: the output has no host field, so the four results can't be merged afterwards (#G).
Fix
action="append" on --host for list and send
Loop in cmd_list / cmd_send, accumulating partial failures rather than aborting on the first
install.sh:130-138 already has the accumulate-and-report-at-the-end pattern; follow it
send to several hosts needs a decision: fan out the same message, or refuse and require one target? Fanning out is more useful for "tell everyone the deploy landed", but it also makes a typo louder. Leaning toward allowing it with the count stated in the output.
Acceptance criteria
Repeated --host reaches every host named
One host failing doesn't abort the rest; the exit code reflects that something failed
Output says which host each result came from
A decision recorded on multi-host send, either way
Covered by tests (argparse behaviour and the loop are both testable without SSH)
Activity