Repository navigation
fix(rsync): no tty requests over ssh, and no leaked missing-marker error - #492
Merged
Merged
Conversation
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>
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.
Fixes two pieces of noise from
sandy --rsync dgx(the copy itself succeeded and verified):Pseudo-terminal lines. sandy never passes
-t; the destination'sssh_configsetsRequestTTY yes, so ssh prints the warning for each non-interactive call. The four were themkdirssh plus threersynctransfers (the other ssh calls send stderr to a file or/dev/null). Now every ssh in--rsync/--rsync-frompasses-T, which overridesRequestTTY, and every rsync uses-e "${RSYNC_RSH:-ssh} -T", keeping a caller'sRSYNC_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 tocut. A sandbox without.sandy_created_versionalso 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_RSHis kept with-Tappended. 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