Skip to content

fix(rsync): no tty requests over ssh, and no leaked missing-marker error - #492

Merged
rappdw merged 1 commit into
mainfrom
fix/rsync-tty-and-marker
Oct 27, 2026
Merged

rappdw merged 1 commit into
mainfrom
fix/rsync-tty-and-marker

Conversation

@rappdw

@rappdw rappdw commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Fixes two pieces of noise from sandy --rsync dgx (the copy itself succeeded and verified):

/Users/rappdw/.local/bin/sandy: line 5930: .../earshot-dc2c900c/.sandy_created_version: No such file or directory
Pseudo-terminal will not be allocated because stdin is not a terminal.   (x4)

Pseudo-terminal lines. sandy never passes -t; the destination's ssh_config sets RequestTTY yes, so ssh prints the warning for each non-interactive call. The four were the mkdir ssh plus three rsync transfers (the other ssh calls send stderr to a file or /dev/null). Now every ssh in --rsync/--rsync-from passes -T, which overrides RequestTTY, and every rsync uses -e "${RSYNC_RSH:-ssh} -T", keeping a caller's RSYNC_RSH.

Missing-marker error. cut -d. -f1 < "$f" 2>/dev/null: redirections apply left to right, so the < failed before stderr was redirected. The file is now an argument to cut. A sandbox without .sandy_created_version also skipped the major-version guard silently; it now warns (fail loudly).

Tests. The §154/§187 ssh and rsync stubs are now strict: they refuse a call without -T, so every existing transfer check proves no tty is requested. New §154(13a–d): no-marker sandbox copies, leaks no error, warns; RSYNC_RSH is kept with -T appended. Each fix was mutation-tested (reverting it fails the matching check; the unmutated slice ran all 25 checks). Host group: 2907 passed. SPEC rows for both flags updated.

🤖 Generated with Claude Code

Two bugs seen in `sandy --rsync dgx`; neither affected the copy.

1. "Pseudo-terminal will not be allocated because stdin is not a terminal"
   once per transfer. sandy never asks for a tty, but a destination whose
   ssh_config sets `RequestTTY yes` makes ssh print that for every
   non-interactive call. Every ssh in --rsync/--rsync-from now passes -T
   (a command-line -T overrides RequestTTY), and every rsync uses
   -e "${RSYNC_RSH:-ssh} -T", so a caller's RSYNC_RSH (port, identity) is
   kept.

2. "line 5930: .../.sandy_created_version: No such file or directory".
   `cut -d. -f1 < "$f" 2>/dev/null` opens $f before 2>/dev/null takes
   effect, so the shell's own error reached the terminal. Pass the file
   as an argument instead. A sandbox with no marker also skipped the
   major-version guard silently; it now says so.

Tests: the §154 and §187 ssh/rsync stubs are strict -- they refuse a call
without -T or an rsync transport without -T -- so every existing transfer
check now proves no tty is requested. New §154(13a-d) cover a sandbox with
no marker (copies, no leaked error, warns) and a caller's RSYNC_RSH kept
with -T appended. Mutation-tested: restoring the < redirect fails 13b,
dropping the warning fails 13c, dropping one -T fails 13a/4-12, and
ignoring RSYNC_RSH fails 13d. Host group: 2907 checks passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rappdw rappdw added the bug Something isn't working label Oct 27, 2026
@rappdw
rappdw merged commit 63b3970 into main Oct 27, 2026
4 checks passed
@rappdw
rappdw deleted the fix/rsync-tty-and-marker branch October 27, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant