Exclude controller from self fan-out, distinguish provision-failed reasons, fix ssh test stub arg capture - #32
Merged
Conversation
…ailed reasons, fix ssh test stub arg capture Excludes the controller from its own Synergy client fan-out (an SSH round-trip to self achieves nothing a local lock-guard invocation wouldn't, per issue #27's follow-up); makes warn=provision-failed distinguish a missing local lock-guard from an actual SSH failure, including the ssh_exit code for the latter (issue #29); and fixes the lock-fanout.bats ssh stub to capture all trailing positional args after user@host instead of only the last one (issue #28). Closes #27 Closes #28 Closes #29 Claude-Session: https://claude.ai/code/session_01GBtkU7NAZXszj4MyLFpi6V
|
No blocking issues found.
VERDICT: PASS |
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.
Summary
Three small, related tech-debt / design-question fixes to
bin/lock-fanoutand its tests.lock-fanoutnow skips the controller if it appears in its own Synergy client list, loggingclient=<host> warn=skip-selfinstead of SSHing to itself. Comparison is againsthostname -s+.local, lowercased, matchinglist-clients' output format. The osascript-permission-check follow-up idea from the same issue is explicitly not implemented here — left for a possible future issue if the original burst recurs.tests/lock-fanout.bats'smake_ssh_stubarg parser, which only kept the last unmatched positional arg afteruser@host(silently dropping any earlier ones for a hypothetical multi-arg remote command). It now accumulates all trailing positional args, space-joined. No currently-passing test's behavior changes, since all current call sites pass the remote command as one quoted string.provision_hostnow reports why it failed viaprovision_fail_reason(missing-local-lock-guardorssh-failed) andprovision_fail_rc(the actual ssh exit code, only set forssh-failed).fanout_host'swarn=provision-failedlog line now includesreason=<...>and, for the ssh-failed case,ssh_exit=<rc>— mirroring the field already present on the fallbackpmsetline.CLAUDE.md and README.md updated where their wording was no longer accurate after these changes (the "SSH-to-self is a no-op — do not special-case it" line now needs the fan-out-level exception called out).
Closes #27
Closes #28
Closes #29
Test plan
bats tests/— 66/66 pass, including 7 new tests (3 self-exclusion, 1 ssh-stub regression, 2 provision-failed reason, plus doc/wording is covered by existing suite)shellcheck -S info bin/*— cleannpx markdownlint-cli '**/*.md'— cleancode-reviewer+adversarial-reviewerhooks — both PASS on commitClaude-Session: https://claude.ai/code/session_01GBtkU7NAZXszj4MyLFpi6V