Skip to content

feat(daemon): implement --early-input file transmission - #2498

Merged
oferchen merged 1 commit into
masterfrom
feat/early-input
Feb 26, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/early-input

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Wire --early-input file content through the daemon handshake path
  • Client sends #early_input=<len>\n<data> before module selection, matching upstream clientserver.c:266-295
  • Daemon receives and buffers early-input data for pre-xfer exec scripts
  • Backward compatible: connections without early-input work unchanged

Test plan

  • Early-input protocol format tests
  • Daemon-side reception and buffering tests
  • Size limit enforcement (5K max)
  • Backward compatibility with no early-input
  • All workspace tests pass

Wire --early-input file content through the daemon handshake path.
The client sends `#early_input=<len>\n<data>` before module selection,
matching upstream rsync's clientserver.c:266-295 protocol. The daemon
receives and buffers the data for use by pre-xfer exec scripts.
@github-actions github-actions Bot added the enhancement New feature or request label Feb 26, 2026
@oferchen
oferchen merged commit 9b0fe65 into master Feb 26, 2026
52 of 53 checks passed
@oferchen
oferchen deleted the feat/early-input branch February 26, 2026 17:16
oferchen added a commit that referenced this pull request May 1, 2026
Wire --early-input file content through the daemon handshake path.
The client sends `#early_input=<len>\n<data>` before module selection,
matching upstream rsync's clientserver.c:266-295 protocol. The daemon
receives and buffers the data for use by pre-xfer exec scripts.
oferchen added a commit that referenced this pull request May 5, 2026
Wire --early-input file content through the daemon handshake path.
The client sends `#early_input=<len>\n<data>` before module selection,
matching upstream rsync's clientserver.c:266-295 protocol. The daemon
receives and buffers the data for use by pre-xfer exec scripts.
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant