Skip to content

Test the guided check's executable and argv at the executor boundary - #200

Merged
bcourbage merged 2 commits into
mainfrom
test/remote-check-argv-baseline
Nov 8, 2026
Merged

bcourbage merged 2 commits into
mainfrom
test/remote-check-argv-baseline

Conversation

@bcourbage

@bcourbage bcourbage commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

What

Adds Tests/RemoteCheckArgvBaselineTests.swift: a test-only change that pins the ssh executable and full argument vector the guided remote check hands to the executor, for both sessions (discovery and verification).

Cases: user + port + quoted sshargs + addversionno; host only with defaults; multi-word servercmd; and a selected candidate becoming the verified servercmd. The quoted-sshargs case pins upstream's tokenizer as ported (split on whitespace, quote characters kept in the words).

Why

Step 1 of the low-risk cleanup plan. The existing tests check only the first six arguments, or checkArguments in isolation. The next PR removes the unused upstream-style members of RemoteCommand (upstreamArguments, remoteCommandWords, remoteCommandString, shellCommand, rpcServerCmdlineOverride) and Prepared.effective. These assertions must pass unchanged after that removal.

Size

+117 lines, one new test file, no production code touched.

Verified

make test on Heracles: 1539 tests, 0 failures.

Not in this PR

The archive Reset/Delete candidate baseline. locateArchives and the inline gates are private and tied to modal alerts, so pinning the actual selection and the withheld offer needs a small production seam. That is proposed separately.

🤖 Generated with Claude Code

bcourbage and others added 2 commits November 7, 2026 08:53
…undary

Pins the ssh executable and full argument vector that discovery and
verification hand to the executor, for three configurations: user, port,
quoted sshargs and addversionno; host only with defaults; and a multi-word
servercmd. Also pins that a selected candidate becomes the verified
servercmd. The existing tests check only the first six arguments, or
the builder in isolation.

This is the baseline for removing the unused upstream-style members of
RemoteCommand: the same assertions must pass unchanged afterward.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…efault-settings case accurately

The discovery assertion stopped at the sh -c prefix, so the script could
stop carrying the configured remote executable unnoticed. Assert the
candidate-list fragments that hold it (the marker varies, these do not);
for a bare-name servercmd the assertion pins that the name is absent from
the list and the first well-known path leads. Rename the host-only case:
it supplies an explicit ssh executable with default remote settings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bcourbage
bcourbage merged commit 1c17116 into main Nov 8, 2026
2 checks passed
@bcourbage
bcourbage deleted the test/remote-check-argv-baseline branch November 8, 2026 00:00
bcourbage added a commit that referenced this pull request Nov 8, 2026
…d.effective (#202)

RemoteCommand rebuilt the command line Unison runs for its server
(shellCommand, upstreamArguments, remoteCommandWords, remoteCommandString,
rpcServerCmdlineOverride), but the guided check sends its own diagnostic
command through checkArguments and versionCommandString. Nothing outside
the tests read those members. Prepared.effective had no readers either.

The struct keeps what the check sends: the executable words, host, user,
port and ssh argument words. The tests that pinned the removed members now
assert the live equivalents (versionCommandString, remoteExecutableWords,
checkArguments). The executor-boundary tests added in #200 are unchanged.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant