Skip to content

fix(transfer): name drop_devices in the server-flag classification guard - #7319

Merged
oferchen merged 1 commit into
masterfrom
fix/server-flag-guard-drop-devices
Aug 14, 2026
Merged

oferchen merged 1 commit into
masterfrom
fix/server-flag-guard-drop-devices

Conversation

@oferchen

Copy link
Copy Markdown
Owner

ParsedServerFlags gained a drop_devices field, but the exhaustive destructure in every_parsed_server_flags_field_is_classified never named it. That is a hard E0027, so crates/transfer fails to build under --all-targets and every open PR shows a red fmt + clippy.

Reproduced on pristine origin/master (490134fc1), not on a feature branch. Both contributing changes were green in isolation and red together — a stale-base merge-compile collision. The guard is cfg(test), so only a build that compiles tests sees it; a plain cargo build stays green, which is why it reached master.

Non-vacuity proven both directions on 490134fc1:

MEASURED: cargo check -p transfer --all-targets --all-features
  without this patch -> exit 101, error[E0027]: pattern does not mention field `drop_devices`
  with this patch    -> exit 0

Why this group

drop_devices goes under "⚠ NEITHER MECHANISM": no compact letter, and apply_common_server_flags does not carry it (verified — no match in crates/core/src/client/remote/flags.rs).

Unlike its neighbours, that is not an open question needing a decision. The option is deliberately client-local: no client path emits --drop-D into the argv, which is exactly what made the argv byte-identical. The server decodes --drop-D only so a restricted shell can inject it, upstream's rrsync being the case that forces it. The comment says so, since the group's existing text would otherwise imply an unresolved gap.

The exhaustive pattern is a drift guard working as designed — it refused to let a new field be added without classifying how it reaches the server.

ParsedServerFlags gained a drop_devices field, but the exhaustive
destructure in every_parsed_server_flags_field_is_classified never named
it, so the crate failed to build under --all-targets with E0027. Both
changes were green in isolation and red together: the guard is a
cfg(test) drift check, so only a build that compiles tests sees it.

Classify it under "neither mechanism": there is no compact letter and no
apply_common_server_flags bridge entry. Unlike its neighbours that is not
an open question - the option is deliberately client-local, which is what
makes the emitted argv byte-identical. The server decodes --drop-D only
so a restricted shell can inject it.
@oferchen
oferchen enabled auto-merge (squash) August 14, 2026 05:06
@github-actions github-actions Bot added the bug Something isn't working label Aug 14, 2026
@oferchen
oferchen merged commit 13979a4 into master Aug 14, 2026
66 of 67 checks passed
@oferchen
oferchen deleted the fix/server-flag-guard-drop-devices branch August 14, 2026 06:55
oferchen added a commit that referenced this pull request Aug 24, 2026
…ard (#7319)

ParsedServerFlags gained a drop_devices field, but the exhaustive
destructure in every_parsed_server_flags_field_is_classified never named
it, so the crate failed to build under --all-targets with E0027. Both
changes were green in isolation and red together: the guard is a
cfg(test) drift check, so only a build that compiles tests sees it.

Classify it under "neither mechanism": there is no compact letter and no
apply_common_server_flags bridge entry. Unlike its neighbours that is not
an open question - the option is deliberately client-local, which is what
makes the emitted argv byte-identical. The server decodes --drop-D only
so a restricted shell can inject it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant