docs(iconv): audit why --iconv is inert and map the wiring plan (#1918)#3526
Merged
Conversation
Document the current state of --iconv in oc-rsync: which surfaces already exist, which are still inert, and how the remaining wiring trackers (#1911-#1919) line up against upstream rsync 3.4.1 behavior. The audit covers parse path, SSH/daemon producer bridge (now landed via PR #3458), local-copy engine consumers, filter-rule path matching, daemon module charset directive, wire encode/decode, and the fallback semantics. Each gap is mapped to the smallest follow-up PR. Closes #1918.
5 tasks
oferchen
added a commit
that referenced
this pull request
May 1, 2026
…1911) Closes #1911 by completing the local-copy bridge between the parsed `IconvSetting` on `ClientConfig` and the engine's `LocalCopyOptions`, mirroring the SSH/daemon bridge that PR #3458 wired through `apply_common_server_flags`. The audit at `docs/audits/iconv-inert.md` (PR #3526) labels #1911 as "Partial" because the local-copy path bypasses `apply_common_server_flags` and therefore had no route by which a resolved `FilenameConverter` could reach the engine. Changes: - `engine::local_copy::LocalCopyOptions` and `LocalCopyOptionsBuilder` gain an `iconv: Option<FilenameConverter>` field with a `with_iconv` setter and `iconv()` accessor on the options struct, plus an `iconv()` setter on the builder. - `core::client::run::LocalCopyOptionsBuilder::build` (the internal wrapper around the engine builder) calls `config.iconv().resolve_converter()` and propagates the result via the new setter. - Unit tests in `crates/engine/src/local_copy/options/filters.rs` cover default-none, attach, and clear. - Unit tests in `crates/core/src/client/run/mod.rs` cover the `IconvSetting -> LocalCopyOptions.iconv` mapping for unspecified, disabled, locale-default, explicit, and unsupported-charset variants. This PR plumbs the converter only; it does not yet apply it on sender file-list emit (#1912), receiver file-list ingest (#1913), or filter-rule path matching (#1914). Those are tracked separately.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
… (#3526) Document the current state of --iconv in oc-rsync: which surfaces already exist, which are still inert, and how the remaining wiring trackers (#1911-#1919) line up against upstream rsync 3.4.1 behavior. The audit covers parse path, SSH/daemon producer bridge (now landed via PR #3458), local-copy engine consumers, filter-rule path matching, daemon module charset directive, wire encode/decode, and the fallback semantics. Each gap is mapped to the smallest follow-up PR. Closes #1918.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
…1911) Closes #1911 by completing the local-copy bridge between the parsed `IconvSetting` on `ClientConfig` and the engine's `LocalCopyOptions`, mirroring the SSH/daemon bridge that PR #3458 wired through `apply_common_server_flags`. The audit at `docs/audits/iconv-inert.md` (PR #3526) labels #1911 as "Partial" because the local-copy path bypasses `apply_common_server_flags` and therefore had no route by which a resolved `FilenameConverter` could reach the engine. Changes: - `engine::local_copy::LocalCopyOptions` and `LocalCopyOptionsBuilder` gain an `iconv: Option<FilenameConverter>` field with a `with_iconv` setter and `iconv()` accessor on the options struct, plus an `iconv()` setter on the builder. - `core::client::run::LocalCopyOptionsBuilder::build` (the internal wrapper around the engine builder) calls `config.iconv().resolve_converter()` and propagates the result via the new setter. - Unit tests in `crates/engine/src/local_copy/options/filters.rs` cover default-none, attach, and clear. - Unit tests in `crates/core/src/client/run/mod.rs` cover the `IconvSetting -> LocalCopyOptions.iconv` mapping for unspecified, disabled, locale-default, explicit, and unsupported-charset variants. This PR plumbs the converter only; it does not yet apply it on sender file-list emit (#1912), receiver file-list ingest (#1913), or filter-rule path matching (#1914). Those are tracked separately.
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.
Closes #1918.
Summary
Adds
docs/audits/iconv-inert.md, a formal audit (~990 lines) documentingwhy
--iconvis currently inert in oc-rsync and how the remaining wiringtrackers (#1911-#1919) line up against upstream rsync 3.4.1.
The audit walks the surface end-to-end, citing concrete
crates/<crate>/src/<path>:<lineno>locations for every claim:
crates/cli/src/frontend/execution/options/iconv.rsparses--iconvintoIconvSetting, with the feature-off hard error guard alreadyin place (closes Switch Windows cross-compilation to native cargo builds #1915 in tree).
IconvSetting::resolve_converter()intoapply_common_server_flags(
crates/core/src/client/remote/flags.rs:228), so SSH and daemon transfersnow feed a real
FilenameConverterthroughConnectionConfig::iconvintothe receiver and generator.
crates/engine/src/local_copy/) doesnot consume
IconvSettingat all - local-mode transfers remain inerteven with the bridge in place.
FilterChain::newtakes no converterparameter (
crates/filters/src/chain.rs:226); pattern matching runs onraw bytes regardless of
--iconv, diverging from upstream'siconv_filter_strings()semantics.charsetdirective. Parsed and stored(
crates/daemon/src/daemon/sections/config_parsing/module_directives.rs:330-337,crates/daemon/src/daemon/module_state/definition.rs:108-109) but neverread at session-setup time.
with citations to
flist/read/name.rs,flist/write/encoding.rs, and theencoding_rs-backedFilenameConverter.The audit closes with a per-tracker wire-up plan (smallest-PR-first
ordering), an interop and golden test surface mapped to #1916/#1919, and
a risks/decisions section covering feature gating, locale detection,
daemon precedence, and the engine-vs-transfer architectural split.
Test plan
crates/<crate>/src/<path>:<lineno>sources at HEAD.