Repository navigation
feat(protocol): implement --secluded-args stdin argument passing - #2499
Merged
Merged
Conversation
Add --secluded-args (-s, --protect-args) support that transmits remote arguments over stdin as null-separated strings instead of the SSH command line, preventing shell expansion issues. Includes protocol module, SSH invocation builder, config wiring, and server-side reception.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
Add --secluded-args (-s, --protect-args) support that transmits remote arguments over stdin as null-separated strings instead of the SSH command line, preventing shell expansion issues. Includes protocol module, SSH invocation builder, config wiring, and server-side reception.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
Add --secluded-args (-s, --protect-args) support that transmits remote arguments over stdin as null-separated strings instead of the SSH command line, preventing shell expansion issues. Includes protocol module, SSH invocation builder, config wiring, and server-side reception.
4 of 5 tasks
oferchen
added a commit
that referenced
this pull request
May 20, 2026
…DeltaApplier (BR-3i.b) Adds a `strategy: Arc<dyn ChecksumStrategy>` field plus a `with_strategy(concurrency, strategy)` constructor so the receiver pipeline can thread the negotiated algorithm into the per-chunk verify step without re-boxing on every rayon worker. `new(concurrency)` keeps its existing signature and defaults to MD5 (seed 0), matching the protocol >= 30 fallback `ChecksumFactory::from_negotiation` resolves when no `NegotiationResult` is present, so the 12 test/bench callers identified by the BR-3i.a audit need zero changes. `verify_chunk` still returns `digest_len = chunk.data.len()` - the dispatch to `self.strategy.compute(&chunk.data)` lands as a one-function-body change in BR-3i.c (#2499). This commit is wiring only. Adds three unit tests: - `new_defaults_strategy_to_md5` pins the default algorithm. - `with_strategy_threads_negotiated_algorithm` verifies the Arc handle round-trips through the constructor. - `with_strategy_does_not_change_verify_chunk_behaviour` proves the stub is byte-identical regardless of the configured strategy. Refs: #2498
oferchen
added a commit
that referenced
this pull request
May 21, 2026
…DeltaApplier (BR-3i.b) (#4616) Adds a `strategy: Arc<dyn ChecksumStrategy>` field plus a `with_strategy(concurrency, strategy)` constructor so the receiver pipeline can thread the negotiated algorithm into the per-chunk verify step without re-boxing on every rayon worker. `new(concurrency)` keeps its existing signature and defaults to MD5 (seed 0), matching the protocol >= 30 fallback `ChecksumFactory::from_negotiation` resolves when no `NegotiationResult` is present, so the 12 test/bench callers identified by the BR-3i.a audit need zero changes. `verify_chunk` still returns `digest_len = chunk.data.len()` - the dispatch to `self.strategy.compute(&chunk.data)` lands as a one-function-body change in BR-3i.c (#2499). This commit is wiring only. Adds three unit tests: - `new_defaults_strategy_to_md5` pins the default algorithm. - `with_strategy_threads_negotiated_algorithm` verifies the Arc handle round-trips through the constructor. - `with_strategy_does_not_change_verify_chunk_behaviour` proves the stub is byte-identical regardless of the configured strategy. Refs: #2498
4 tasks
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…DeltaApplier (BR-3i.b) (#4616) Adds a `strategy: Arc<dyn ChecksumStrategy>` field plus a `with_strategy(concurrency, strategy)` constructor so the receiver pipeline can thread the negotiated algorithm into the per-chunk verify step without re-boxing on every rayon worker. `new(concurrency)` keeps its existing signature and defaults to MD5 (seed 0), matching the protocol >= 30 fallback `ChecksumFactory::from_negotiation` resolves when no `NegotiationResult` is present, so the 12 test/bench callers identified by the BR-3i.a audit need zero changes. `verify_chunk` still returns `digest_len = chunk.data.len()` - the dispatch to `self.strategy.compute(&chunk.data)` lands as a one-function-body change in BR-3i.c (#2499). This commit is wiring only. Adds three unit tests: - `new_defaults_strategy_to_md5` pins the default algorithm. - `with_strategy_threads_negotiated_algorithm` verifies the Arc handle round-trips through the constructor. - `with_strategy_does_not_change_verify_chunk_behaviour` proves the stub is byte-identical regardless of the configured strategy. Refs: #2498
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
--secluded-args(-s,--protect-args) that transmits remote arguments over stdin as null-separated strings instead of the SSH command line, preventing shell expansionSecludedInvocationtoRemoteInvocationBuildersplitting args into minimal command-line + stdin payloadprotocol::secluded_argsmodule withsend_secluded_args/recv_secluded_argsfor null-terminated wire formatprotect_argsthroughClientConfig,ClientConfigBuilder,ConfigInputs, and SSH transfer pipelineTest plan
secluded_argsprotocol module (round-trip, wire format, edge cases)SecludedInvocationbuilder (enabled, disabled, pull mode)protect_argsinClientConfigandClientConfigBuilder