Skip to content

docs(iconv): audit why --iconv is inert and map the wiring plan (#1918)#3526

Merged
oferchen merged 1 commit into
masterfrom
docs/iconv-inert-audit-1918
May 1, 2026
Merged

docs(iconv): audit why --iconv is inert and map the wiring plan (#1918)#3526
oferchen merged 1 commit into
masterfrom
docs/iconv-inert-audit-1918

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented May 1, 2026

Closes #1918.

Summary

Adds docs/audits/iconv-inert.md, a formal audit (~990 lines) documenting
why --iconv is currently inert in oc-rsync and how the remaining wiring
trackers (#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:

  • Parse path. crates/cli/src/frontend/execution/options/iconv.rs parses
    --iconv into IconvSetting, with the feature-off hard error guard already
    in place (closes Switch Windows cross-compilation to native cargo builds #1915 in tree).
  • SSH/daemon producer bridge. PR feat: bridge IconvSetting to FilenameConverter #3458 wired
    IconvSetting::resolve_converter() into apply_common_server_flags
    (crates/core/src/client/remote/flags.rs:228), so SSH and daemon transfers
    now feed a real FilenameConverter through ConnectionConfig::iconv into
    the receiver and generator.
  • Local-copy gap. The engine crate (crates/engine/src/local_copy/) does
    not consume IconvSetting at all - local-mode transfers remain inert
    even with the bridge in place.
  • Filter-rule path matching. FilterChain::new takes no converter
    parameter (crates/filters/src/chain.rs:226); pattern matching runs on
    raw bytes regardless of --iconv, diverging from upstream's
    iconv_filter_strings() semantics.
  • Daemon module charset directive. 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 never
    read at session-setup time.
  • Wire encode/decode and fallback semantics. Captured for completeness
    with citations to flist/read/name.rs, flist/write/encoding.rs, and the
    encoding_rs-backed FilenameConverter.

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

  • No code changes; docs-only.
  • All citations verified against actual crates/<crate>/src/<path>:<lineno> sources at HEAD.
  • Hyphens only (no em-dashes) per house style.

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.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 1, 2026
@oferchen oferchen merged commit a2b03c1 into master May 1, 2026
12 checks passed
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 oferchen deleted the docs/iconv-inert-audit-1918 branch May 1, 2026 21:08
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant